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 <yurii.kis@smartteksas.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -31,14 +31,14 @@ public sealed class SlipperySystem : EntitySystem
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<SlipperyComponent, StepTriggerAttemptEvent>(HandleAttemptCollide);
|
||||
SubscribeLocalEvent<SlipperyComponent, StepTriggeredEvent>(HandleStepTrigger);
|
||||
SubscribeLocalEvent<SlipperyComponent, StepTriggeredOffEvent>(HandleStepTrigger);
|
||||
SubscribeLocalEvent<NoSlipComponent, SlipAttemptEvent>(OnNoSlipAttempt);
|
||||
SubscribeLocalEvent<ThrownItemComponent, SlipCausingAttemptEvent>(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<NoSlipComponent, InventoryRelayedEvent<SlipAttemptEvent>>((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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user