Slipping tweaks + remove EffectBlocker (#4955)
* Slipping tweaks + remove EffectBlocker * mfw failed merge conflict resolution Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Clothing.Components;
|
||||
using Content.Shared.Slippery;
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
@@ -12,6 +13,7 @@ namespace Content.Server.Clothing
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<MagbootsComponent, GetActivationVerbsEvent>(AddToggleVerb);
|
||||
SubscribeLocalEvent<MagbootsComponent, SlipAttemptEvent>(OnSlipAttempt);
|
||||
}
|
||||
|
||||
private void AddToggleVerb(EntityUid uid, MagbootsComponent component, GetActivationVerbsEvent args)
|
||||
@@ -25,5 +27,13 @@ namespace Content.Server.Clothing
|
||||
// TODO VERB ICON add toggle icon? maybe a computer on/off symbol?
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
|
||||
private void OnSlipAttempt(EntityUid uid, MagbootsComponent component, SlipAttemptEvent args)
|
||||
{
|
||||
if (component.On)
|
||||
{
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user