Adds slippery items (#1321)

* Start work on Slippery Component

* Slips work

* Add banana peel

* Add required slip speed

* Add slip sound

* Adds soap

* Make soapnt, soapsyndie and soapdeluxe inherit soap

* Adds homemade soap and omega soap

* Fix slipping not taking into account the entity being in a container
This commit is contained in:
Víctor Aguilera Puerto
2020-07-09 17:00:37 +02:00
committed by GitHub
parent 8938d96402
commit 626c8c51a1
18 changed files with 354 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using Content.Server.GameObjects.Components.Movement;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.GameObjects.EntitySystems
{
public class SlipperySystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
EntityQuery = new TypeEntityQuery(typeof(SlipperyComponent));
}
public override void Update(float frameTime)
{
base.Update(frameTime);
foreach (var entity in RelevantEntities)
{
entity.GetComponent<SlipperyComponent>().Update(frameTime);
}
}
}
}