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

@@ -10,6 +10,7 @@ namespace Content.Shared.GameObjects.EntitySystems
public interface IEffectBlocker
{
bool CanFall() => true;
bool CanSlip() => true;
}
/// <summary>
@@ -28,5 +29,16 @@ namespace Content.Shared.GameObjects.EntitySystems
return canFall;
}
public static bool CanSlip(IEntity entity)
{
var canSlip = true;
foreach (var blocker in entity.GetAllComponents<IEffectBlocker>())
{
canSlip &= blocker.CanSlip(); // Sets var to false if false
}
return canSlip;
}
}
}