Fix disposal units in general (#1552)

* Makes disposal units able to be entered when unpowered

* Make the unit's light turn off when unpowered

* Remove event handlers on component removal

* Make the disposal unit's lever engage when queueing an auto engage

* Autoengaging the lever on insert was a mistake

* Make the engage button active when engaged

* Make the engage button toggleable

* Fix nullable error
This commit is contained in:
DrSmugleaf
2020-07-31 14:50:46 +02:00
committed by GitHub
parent eb09281a18
commit 7a983062a9
3 changed files with 73 additions and 25 deletions

View File

@@ -63,13 +63,16 @@ namespace Content.Shared.GameObjects.Components.Disposal
public readonly string UnitState;
public readonly float Pressure;
public readonly bool Powered;
public readonly bool Engaged;
public DisposalUnitBoundUserInterfaceState(string unitName, string unitState, float pressure, bool powered)
public DisposalUnitBoundUserInterfaceState(string unitName, string unitState, float pressure, bool powered,
bool engaged)
{
UnitName = unitName;
UnitState = unitState;
Pressure = pressure;
Powered = powered;
Engaged = engaged;
}
}