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:
committed by
GitHub
parent
8938d96402
commit
626c8c51a1
26
Content.Server/GameObjects/EntitySystems/SlipperySystem.cs
Normal file
26
Content.Server/GameObjects/EntitySystems/SlipperySystem.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user