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:
mirrorcult
2021-10-24 23:43:49 -07:00
committed by GitHub
parent e016fc9906
commit c0ecdb09af
16 changed files with 69 additions and 112 deletions

View File

@@ -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();
}
}
}
}