Adds construction effect to RCD (#22633)

This commit is contained in:
chromiumboy
2023-12-17 10:08:59 -06:00
committed by GitHub
parent cd8729fe94
commit 58f6086cb7
4 changed files with 70 additions and 1 deletions

View File

@@ -38,6 +38,7 @@ public sealed class RCDSystem : EntitySystem
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly TagSystem _tag = default!;
[Dependency] private readonly TurfSystem _turf = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
private readonly int RcdModeCount = Enum.GetValues(typeof(RcdMode)).Length;
@@ -110,7 +111,9 @@ public sealed class RCDSystem : EntitySystem
};
args.Handled = true;
_doAfter.TryStartDoAfter(doAfterArgs);
if (_doAfter.TryStartDoAfter(doAfterArgs) && _gameTiming.IsFirstTimePredicted)
Spawn("EffectRCDConstruction", location);
}
private void OnDoAfterAttempt(EntityUid uid, RCDComponent comp, DoAfterAttemptEvent<RCDDoAfterEvent> args)