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,5 +1,8 @@
using Content.Server.Atmos;
using Content.Server.Inventory.Components;
using Content.Server.Items;
using Content.Shared.Inventory;
using Content.Shared.Slippery;
using Content.Shared.Damage;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
@@ -17,6 +20,15 @@ namespace Content.Server.Inventory
SubscribeLocalEvent<InventoryComponent, HighPressureEvent>(OnHighPressureEvent);
SubscribeLocalEvent<InventoryComponent, LowPressureEvent>(OnLowPressureEvent);
SubscribeLocalEvent<InventoryComponent, DamageModifyEvent>(OnDamageModify);
SubscribeLocalEvent<InventoryComponent, SlipAttemptEvent>(OnSlipAttemptEvent);
}
private void OnSlipAttemptEvent(EntityUid uid, InventoryComponent component, SlipAttemptEvent args)
{
if (component.TryGetSlotItem(EquipmentSlotDefines.Slots.SHOES, out ItemComponent? shoes))
{
RaiseLocalEvent(shoes.Owner.Uid, args, false);
}
}
private static void HandleInvRemovedFromContainer(EntityUid uid, InventoryComponent component, EntRemovedFromContainerMessage args)