Implement vital chef's hat functionality (#25950)
* Implement crucial chef's hat functionality * Unified stopping code and added events. * Added documentation to events * Rerun tests * Made review changes, and fixed potential desync bug. * Update whitelist
This commit is contained in:
19
Content.Client/Clothing/Systems/PilotedByClothingSystem.cs
Normal file
19
Content.Client/Clothing/Systems/PilotedByClothingSystem.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Robust.Client.Physics;
|
||||
|
||||
namespace Content.Client.Clothing.Systems;
|
||||
|
||||
public sealed partial class PilotedByClothingSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<PilotedByClothingComponent, UpdateIsPredictedEvent>(OnUpdatePredicted);
|
||||
}
|
||||
|
||||
private void OnUpdatePredicted(Entity<PilotedByClothingComponent> entity, ref UpdateIsPredictedEvent args)
|
||||
{
|
||||
args.BlockPrediction = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user