From 54dd273f660d6d8d523d0771bb8d8437373b082e Mon Sep 17 00:00:00 2001 From: KISS <59531932+YuriyKiss@users.noreply.github.com> Date: Sun, 24 Mar 2024 07:33:45 +0200 Subject: [PATCH] Landmine stepoff (#22962) * make landmine work on stepping off * update methods naming * made both step modes possible * updated stepoff event raise to not interfere with game physics internals * added comments * figuring out how audiosystem works * added beep sound effect, updated how stepoff trigger works to make it more consistent * updated source in attributions.yml * made stepoff working every time * introduced suggested changes * updated janitor's WetSignMine to have audio * made cleaner events and bashing my head at OnEndCollide event raise * inverted conditional where applicable * review --------- Co-authored-by: Yurii Kis Co-authored-by: metalgearsloth --- .../Ensnaring/EnsnareableSystem.Ensnaring.cs | 4 +- .../Explosion/EntitySystems/TriggerSystem.cs | 4 +- Content.Server/LandMines/LandMineComponent.cs | 9 +++- Content.Server/LandMines/LandMineSystem.cs | 46 +++++++++--------- Content.Server/Tiles/LavaSystem.cs | 4 +- Content.Shared/Chasm/ChasmSystem.cs | 4 +- Content.Shared/Slippery/SlipperySystem.cs | 4 +- .../Components/StepTriggerComponent.cs | 8 ++- .../StepTrigger/Systems/StepTriggerSystem.cs | 41 ++++++++++++---- Resources/Audio/Effects/attributions.yml | 5 ++ Resources/Audio/Effects/beep_landmine.ogg | Bin 0 -> 6034 bytes .../Entities/Objects/Misc/land_mine.yml | 8 +-- .../Objects/Specific/Janitorial/janitor.yml | 5 ++ 13 files changed, 95 insertions(+), 47 deletions(-) create mode 100644 Resources/Audio/Effects/beep_landmine.ogg diff --git a/Content.Server/Ensnaring/EnsnareableSystem.Ensnaring.cs b/Content.Server/Ensnaring/EnsnareableSystem.Ensnaring.cs index 0c758141a195fe..105a8f9720de9f 100644 --- a/Content.Server/Ensnaring/EnsnareableSystem.Ensnaring.cs +++ b/Content.Server/Ensnaring/EnsnareableSystem.Ensnaring.cs @@ -25,7 +25,7 @@ public void InitializeEnsnaring() { SubscribeLocalEvent(OnComponentRemove); SubscribeLocalEvent(AttemptStepTrigger); - SubscribeLocalEvent(OnStepTrigger); + SubscribeLocalEvent(OnStepTrigger); SubscribeLocalEvent(OnThrowHit); SubscribeLocalEvent(OnAttemptPacifiedThrow); } @@ -49,7 +49,7 @@ private void AttemptStepTrigger(EntityUid uid, EnsnaringComponent component, ref args.Continue = true; } - private void OnStepTrigger(EntityUid uid, EnsnaringComponent component, ref StepTriggeredEvent args) + private void OnStepTrigger(EntityUid uid, EnsnaringComponent component, ref StepTriggeredOffEvent args) { TryEnsnare(args.Tripper, uid, component); } diff --git a/Content.Server/Explosion/EntitySystems/TriggerSystem.cs b/Content.Server/Explosion/EntitySystems/TriggerSystem.cs index 9b9a042641f17f..e24de5a2f66fd2 100644 --- a/Content.Server/Explosion/EntitySystems/TriggerSystem.cs +++ b/Content.Server/Explosion/EntitySystems/TriggerSystem.cs @@ -88,7 +88,7 @@ public override void Initialize() SubscribeLocalEvent(OnTriggerCollide); SubscribeLocalEvent(OnActivate); SubscribeLocalEvent(OnImplantTrigger); - SubscribeLocalEvent(OnStepTriggered); + SubscribeLocalEvent(OnStepTriggered); SubscribeLocalEvent(OnSlipTriggered); SubscribeLocalEvent(OnEmptyTriggered); @@ -228,7 +228,7 @@ private void OnImplantTrigger(EntityUid uid, TriggerImplantActionComponent compo args.Handled = Trigger(uid); } - private void OnStepTriggered(EntityUid uid, TriggerOnStepTriggerComponent component, ref StepTriggeredEvent args) + private void OnStepTriggered(EntityUid uid, TriggerOnStepTriggerComponent component, ref StepTriggeredOffEvent args) { Trigger(uid, args.Tripper); } diff --git a/Content.Server/LandMines/LandMineComponent.cs b/Content.Server/LandMines/LandMineComponent.cs index 63e1e4b99f0925..1c4ba06691a6fc 100644 --- a/Content.Server/LandMines/LandMineComponent.cs +++ b/Content.Server/LandMines/LandMineComponent.cs @@ -1,6 +1,13 @@ -namespace Content.Server.LandMines; +using Robust.Shared.Audio; + +namespace Content.Server.LandMines; [RegisterComponent] public sealed partial class LandMineComponent : Component { + /// + /// Trigger sound effect when stepping onto landmine + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public SoundSpecifier? Sound; } diff --git a/Content.Server/LandMines/LandMineSystem.cs b/Content.Server/LandMines/LandMineSystem.cs index 78c48ef99ec51d..22dedb93375921 100644 --- a/Content.Server/LandMines/LandMineSystem.cs +++ b/Content.Server/LandMines/LandMineSystem.cs @@ -1,43 +1,43 @@ -using Content.Server.Explosion.EntitySystems; +using Content.Server.Explosion.EntitySystems; using Content.Shared.Popups; -using Content.Shared.StepTrigger; using Content.Shared.StepTrigger.Systems; -using Robust.Shared.Player; +using Robust.Shared.Audio; +using Robust.Shared.Audio.Systems; namespace Content.Server.LandMines; public sealed class LandMineSystem : EntitySystem { + [Dependency] private readonly SharedAudioSystem _audioSystem = default!; [Dependency] private readonly SharedPopupSystem _popupSystem = default!; [Dependency] private readonly TriggerSystem _trigger = default!; - public override void Initialize() { - SubscribeLocalEvent(HandleTriggered); - SubscribeLocalEvent(HandleTriggerAttempt); + SubscribeLocalEvent(HandleStepOnTriggered); + SubscribeLocalEvent(HandleStepOffTriggered); + + SubscribeLocalEvent(HandleStepTriggerAttempt); } - private static void HandleTriggerAttempt( - EntityUid uid, - LandMineComponent component, - ref StepTriggerAttemptEvent args) + private void HandleStepOnTriggered(EntityUid uid, LandMineComponent component, ref StepTriggeredOnEvent args) { - args.Continue = true; + _popupSystem.PopupCoordinates( + Loc.GetString("land-mine-triggered", ("mine", uid)), + Transform(uid).Coordinates, + args.Tripper, + PopupType.LargeCaution); + + _audioSystem.PlayPvs(component.Sound, uid); } - private void HandleTriggered(EntityUid uid, LandMineComponent component, ref StepTriggeredEvent args) + private void HandleStepOffTriggered(EntityUid uid, LandMineComponent component, ref StepTriggeredOffEvent 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( - Loc.GetString("land-mine-triggered", ("mine", uid)), - Transform(uid).Coordinates, - args.Tripper, - PopupType.LargeCaution); - } + _trigger.Trigger(uid, args.Tripper); } -} + private static void HandleStepTriggerAttempt(EntityUid uid, LandMineComponent component, ref StepTriggerAttemptEvent args) + { + args.Continue = true; + } +} diff --git a/Content.Server/Tiles/LavaSystem.cs b/Content.Server/Tiles/LavaSystem.cs index 7aee0b65010a01..51bd6f8475faa1 100644 --- a/Content.Server/Tiles/LavaSystem.cs +++ b/Content.Server/Tiles/LavaSystem.cs @@ -11,7 +11,7 @@ public sealed class LavaSystem : EntitySystem public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnLavaStepTriggered); + SubscribeLocalEvent(OnLavaStepTriggered); SubscribeLocalEvent(OnLavaStepTriggerAttempt); } @@ -23,7 +23,7 @@ private void OnLavaStepTriggerAttempt(EntityUid uid, LavaComponent component, re args.Continue = true; } - private void OnLavaStepTriggered(EntityUid uid, LavaComponent component, ref StepTriggeredEvent args) + private void OnLavaStepTriggered(EntityUid uid, LavaComponent component, ref StepTriggeredOffEvent args) { var otherUid = args.Tripper; diff --git a/Content.Shared/Chasm/ChasmSystem.cs b/Content.Shared/Chasm/ChasmSystem.cs index 51299557dbd3f2..86b8d4fc4d778c 100644 --- a/Content.Shared/Chasm/ChasmSystem.cs +++ b/Content.Shared/Chasm/ChasmSystem.cs @@ -24,7 +24,7 @@ public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnStepTriggered); + SubscribeLocalEvent(OnStepTriggered); SubscribeLocalEvent(OnStepTriggerAttempt); SubscribeLocalEvent(OnUpdateCanMove); } @@ -47,7 +47,7 @@ public override void Update(float frameTime) } } - private void OnStepTriggered(EntityUid uid, ChasmComponent component, ref StepTriggeredEvent args) + private void OnStepTriggered(EntityUid uid, ChasmComponent component, ref StepTriggeredOffEvent args) { // already doomed if (HasComp(args.Tripper)) diff --git a/Content.Shared/Slippery/SlipperySystem.cs b/Content.Shared/Slippery/SlipperySystem.cs index d20495cfa6c060..ff8b597a0d5859 100644 --- a/Content.Shared/Slippery/SlipperySystem.cs +++ b/Content.Shared/Slippery/SlipperySystem.cs @@ -31,14 +31,14 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(HandleAttemptCollide); - SubscribeLocalEvent(HandleStepTrigger); + SubscribeLocalEvent(HandleStepTrigger); SubscribeLocalEvent(OnNoSlipAttempt); SubscribeLocalEvent(OnThrownSlipAttempt); // as long as slip-resistant mice are never added, this should be fine (otherwise a mouse-hat will transfer it's power to the wearer). SubscribeLocalEvent>((e, c, ev) => OnNoSlipAttempt(e, c, ev.Args)); } - private void HandleStepTrigger(EntityUid uid, SlipperyComponent component, ref StepTriggeredEvent args) + private void HandleStepTrigger(EntityUid uid, SlipperyComponent component, ref StepTriggeredOffEvent args) { TrySlip(uid, component, args.Tripper); } diff --git a/Content.Shared/StepTrigger/Components/StepTriggerComponent.cs b/Content.Shared/StepTrigger/Components/StepTriggerComponent.cs index f4731bf46abd12..b8483d021a4a71 100644 --- a/Content.Shared/StepTrigger/Components/StepTriggerComponent.cs +++ b/Content.Shared/StepTrigger/Components/StepTriggerComponent.cs @@ -49,8 +49,14 @@ public sealed partial class StepTriggerComponent : Component /// If this is true, steptrigger will still occur on entities that are in air / weightless. They do not /// by default. /// - [DataField] + [DataField, AutoNetworkedField] public bool IgnoreWeightless; + + /// + /// Does this have separate "StepOn" and "StepOff" triggers. + /// + [DataField, AutoNetworkedField] + public bool StepOn = false; } [RegisterComponent] diff --git a/Content.Shared/StepTrigger/Systems/StepTriggerSystem.cs b/Content.Shared/StepTrigger/Systems/StepTriggerSystem.cs index ede39b2aa97ab5..b4ac2cde756372 100644 --- a/Content.Shared/StepTrigger/Systems/StepTriggerSystem.cs +++ b/Content.Shared/StepTrigger/Systems/StepTriggerSystem.cs @@ -11,6 +11,7 @@ public sealed class StepTriggerSystem : EntitySystem { [Dependency] private readonly EntityLookupSystem _entityLookup = default!; [Dependency] private readonly SharedGravitySystem _gravity = default!; + [Dependency] private readonly SharedMapSystem _map = default!; public override void Initialize() { @@ -40,7 +41,9 @@ public override void Update(float frameTime) while (enumerator.MoveNext(out var uid, out var active, out var trigger, out var transform)) { if (!Update(uid, trigger, transform, query)) + { continue; + } RemCompDeferred(uid, active); } @@ -56,7 +59,8 @@ private bool Update(EntityUid uid, StepTriggerComponent component, TransformComp if (component.Blacklist != null && TryComp(transform.GridUid, out var grid)) { - var anch = grid.GetAnchoredEntitiesEnumerator(grid.LocalToTile(transform.Coordinates)); + var positon = _map.LocalToTile(uid, grid, transform.Coordinates); + var anch = _map.GetAnchoredEntitiesEnumerator(uid, grid, positon); while (anch.MoveNext(out var ent)) { @@ -109,8 +113,16 @@ private void UpdateColliding(EntityUid uid, StepTriggerComponent component, Tran return; } - var ev = new StepTriggeredEvent { Source = uid, Tripper = otherUid }; - RaiseLocalEvent(uid, ref ev, true); + if (component.StepOn) + { + var evStep = new StepTriggeredOnEvent(uid, otherUid); + RaiseLocalEvent(uid, ref evStep); + } + else + { + var evStep = new StepTriggeredOffEvent(uid, otherUid); + RaiseLocalEvent(uid, ref evStep); + } component.CurrentlySteppedOn.Add(otherUid); Dirty(uid, component); @@ -130,7 +142,7 @@ private bool CanTrigger(EntityUid uid, EntityUid otherUid, StepTriggerComponent var msg = new StepTriggerAttemptEvent { Source = uid, Tripper = otherUid }; - RaiseLocalEvent(uid, ref msg, true); + RaiseLocalEvent(uid, ref msg); return msg.Continue && !msg.Cancelled; } @@ -163,6 +175,12 @@ private void OnEndCollide(EntityUid uid, StepTriggerComponent component, ref End component.CurrentlySteppedOn.Remove(otherUid); Dirty(uid, component); + if (component.StepOn) + { + var evStepOff = new StepTriggeredOffEvent(uid, otherUid); + RaiseLocalEvent(uid, ref evStepOff); + } + if (component.Colliding.Count == 0) { RemCompDeferred(uid); @@ -230,9 +248,14 @@ public struct StepTriggerAttemptEvent public bool Cancelled; } +/// +/// Raised when an entity stands on a steptrigger initially (assuming it has both on and off states). +/// [ByRefEvent] -public struct StepTriggeredEvent -{ - public EntityUid Source; - public EntityUid Tripper; -} +public readonly record struct StepTriggeredOnEvent(EntityUid Source, EntityUid Tripper); + +/// +/// Raised when an entity leaves a steptrigger if it has on and off states OR when an entity intersects a steptrigger. +/// +[ByRefEvent] +public readonly record struct StepTriggeredOffEvent(EntityUid Source, EntityUid Tripper); diff --git a/Resources/Audio/Effects/attributions.yml b/Resources/Audio/Effects/attributions.yml index a5f91ef10c68fe..4d2ba44925dcef 100644 --- a/Resources/Audio/Effects/attributions.yml +++ b/Resources/Audio/Effects/attributions.yml @@ -221,3 +221,8 @@ copyright: TGStation at 3df5d3b42bfb6b3b5adba1067ab41f83816255bb license: CC-BY-SA-3.0 source: https://github.com/tgstation/tgstation/blob/3df5d3b42bfb6b3b5adba1067ab41f83816255bb/sound/misc/server-ready.ogg + +- files: [beep_landmine.ogg] + copyright: '"beep_landmine.ogg" by kaktuscsc of Discord for SS14' + license: "CC-BY-SA-3.0" + source: https://github.com/YuriyKiss/space-station-14/commit/971a135a9c83aed46e967aac9302ab5b35562b5f diff --git a/Resources/Audio/Effects/beep_landmine.ogg b/Resources/Audio/Effects/beep_landmine.ogg new file mode 100644 index 0000000000000000000000000000000000000000..48bc5e21d962084a1db41c473f30892d914894ae GIT binary patch literal 6034 zcmahtdpy(Y|Iap;VQDc!($vN#9hQknF?Wk%Ojyf3B&C?tNhxzlI9fBMDau4q5u#3x z%B^xuE`>wopmfpcoaUtRdp4cE-|t_)=k{*A{B9;8nq>@q!K4V{rs_p!LwWFv7 zHH#qCEhv76IqfHkDeR_F_7(67+a0neG;H4nNDPq@sZt_-S7h*l972BKxzf(w2LWsW zAjE1JIf-L6c~~7g5ABz_cAZggwC&uM9MfIv#(qSM&CxF|v`c4`j&|p;fK(ujo`BQJdzb?Q@Xr+#-xm6O{R64JUMex=CN_pwkOFdcIo-auI95kyl{Gg=E4{R zx=T*70=-R(=R}7VDA4L~yhrp>9i9;ly@H3QhH8Ku017XVGA@vmu{u@CpbY@5ttYN^ zukM4Bx(_OKRnUw429` z$%O)dF0{-L`(}tEGA7fr(Y(}hBuD~44h}=L_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resources/Prototypes/Entities/Objects/Misc/land_mine.yml index 9088edc81599eb..a3e3485bc652ba 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/land_mine.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/land_mine.yml @@ -35,9 +35,13 @@ - !type:DoActsBehavior acts: [ "Destruction" ] - type: LandMine - - type: TriggerOnStepTrigger + sound: + path: /Audio/Effects/beep_landmine.ogg + params: + maxDistance: 10 - type: StepTrigger requiredTriggeredSpeed: 0 + stepOn: true - type: entity name: kick mine @@ -57,7 +61,6 @@ - type: Construction graph: ModularMineGraph node: emptyCase - - type: LandMine - type: entity name: explosive mine @@ -71,4 +74,3 @@ intensitySlope: 3 totalIntensity: 120 # about a ~4 tile radius canCreateVacuum: false - - type: DeleteOnTrigger diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml index 8d3c83e3e1e3fa..2ddb21b9e6cb73 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml @@ -230,6 +230,7 @@ - type: StepTrigger intersectRatio: 0.2 requiredTriggeredSpeed: 0 + stepOn: true - type: CollisionWake enabled: false - type: Physics @@ -251,6 +252,10 @@ mask: - ItemMask - type: LandMine + sound: + path: /Audio/Effects/beep_landmine.ogg + params: + maxDistance: 10 - type: ExplodeOnTrigger - type: Explosive explosionType: HardBomb # normally Default and max 5 total 60