Emergent Sanitation Gameplay (#1378)

* Emergent Sanitation Gameplay

* Fix the map

* Address review

* Mention if it's slippery in the description
This commit is contained in:
ike709
2020-07-11 16:49:54 -05:00
committed by GitHub
parent 531d9626ad
commit 203a835264
20 changed files with 1011 additions and 45 deletions

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using Content.Server.GameObjects.Components;
using Content.Shared.GameObjects.Components.Inventory;
using Content.Server.GameObjects.EntitySystems.Click;
using Content.Server.Interfaces.GameObjects.Components.Interaction;
using Content.Server.Interfaces;
@@ -23,7 +24,7 @@ using static Content.Shared.GameObjects.SharedInventoryComponent.ClientInventory
namespace Content.Server.GameObjects
{
[RegisterComponent]
public class InventoryComponent : SharedInventoryComponent, IExAct
public class InventoryComponent : SharedInventoryComponent, IExAct, IEffectBlocker
{
#pragma warning disable 649
[Dependency] private readonly IEntitySystemManager _entitySystemManager;
@@ -46,6 +47,18 @@ namespace Content.Server.GameObjects
}
}
bool IEffectBlocker.CanSlip()
{
if(Owner.TryGetComponent(out InventoryComponent inventoryComponent) &&
inventoryComponent.TryGetSlotItem(EquipmentSlotDefines.Slots.SHOES, out ItemComponent shoes)
)
{
return EffectBlockerSystem.CanSlip(shoes.Owner);
}
return true;
}
public override void OnRemove()
{
var slots = SlotContainers.Keys.ToList();