* ECS up disposals Also significantly reduced its CPU usage. * Make update significantly less S L O W * Start units pressurised * Client-side flush lerping * Fix powered not toggling UI * Fix flush button * InteractUsing * Minor optimisations * Fix collisions * Make visual state ECS * Almost done with shared * Most stuff moved * Optimise item sleeping
27 lines
811 B
C#
27 lines
811 B
C#
using Content.Shared.Disposal.Components;
|
|
using Content.Shared.DragDrop;
|
|
using Robust.Shared.GameObjects;
|
|
|
|
namespace Content.Client.Disposal.Components
|
|
{
|
|
[RegisterComponent]
|
|
[ComponentReference(typeof(SharedDisposalUnitComponent))]
|
|
public class DisposalUnitComponent : SharedDisposalUnitComponent
|
|
{
|
|
public DisposalUnitBoundUserInterfaceState? UiState;
|
|
|
|
public override void HandleComponentState(ComponentState? curState, ComponentState? nextState)
|
|
{
|
|
base.HandleComponentState(curState, nextState);
|
|
if (curState is not DisposalUnitComponentState state) return;
|
|
|
|
RecentlyEjected = state.RecentlyEjected;
|
|
}
|
|
|
|
public override bool DragDropOn(DragDropEvent eventArgs)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
}
|