Mopping and puddle tweaks (#13238)

fix undefined
Fixes https://github.com/space-wizards/space-station-14/issues/11830
This commit is contained in:
Leon Friedrich
2023-01-01 19:03:26 +13:00
committed by GitHub
parent 8a02f81c13
commit bce1f9fe89
10 changed files with 322 additions and 334 deletions

View File

@@ -1,6 +1,7 @@
using Content.Shared.StepTrigger.Components;
using Robust.Shared.Collections;
using Robust.Shared.GameStates;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Events;
@@ -16,6 +17,18 @@ public sealed class StepTriggerSystem : EntitySystem
SubscribeLocalEvent<StepTriggerComponent, ComponentHandleState>(TriggerHandleState);
SubscribeLocalEvent<StepTriggerComponent, StartCollideEvent>(HandleCollide);
#if DEBUG
SubscribeLocalEvent<StepTriggerComponent, ComponentStartup>(OnStartup);
}
private void OnStartup(EntityUid uid, StepTriggerComponent component, ComponentStartup args)
{
if (!component.Active)
return;
if (!TryComp(uid, out FixturesComponent? fixtures) || fixtures.FixtureCount == 0)
Logger.Warning($"{ToPrettyString(uid)} has an active step trigger without any fixtures.");
#endif
}
public override void Update(float frameTime)