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:
Tayrtahn
2024-06-18 06:59:37 -04:00
committed by GitHub
parent a1e66cfbb4
commit e5ef2a358c
7 changed files with 248 additions and 0 deletions

View 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;
}
}