Shards damage barefoot users + steptrigger-related general cleanup (#9585)

This commit is contained in:
Kara
2022-07-10 02:28:37 -07:00
committed by GitHub
parent 37bf333674
commit 459f8d23eb
22 changed files with 220 additions and 92 deletions

View File

@@ -1,6 +1,7 @@
using Content.Server.Explosion.EntitySystems;
using Content.Shared.Popups;
using Content.Shared.StepTrigger;
using Content.Shared.StepTrigger.Systems;
using Robust.Shared.Player;
namespace Content.Server.LandMines;
@@ -27,6 +28,8 @@ public sealed class LandMineSystem : EntitySystem
private void HandleTriggered(EntityUid uid, LandMineComponent component, ref StepTriggeredEvent args)
{
// This doesn't use TriggerOnStepTrigger since we don't want to display the popup if nothing happens
// and I didn't feel like making an `AfterTrigger` event
if (_trigger.Trigger(uid, args.Tripper))
{
_popupSystem.PopupCoordinates(
@@ -35,9 +38,6 @@ public sealed class LandMineSystem : EntitySystem
Filter.Entities(args.Tripper),
PopupType.LargeCaution);
}
if (component.DeleteOnActivate)
QueueDel(uid);
}
}