meat rotting hotfix (#18760)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
parent
fd1c131420
commit
3e64676dbd
|
|
@ -29,6 +29,7 @@ public sealed class RottingSystem : EntitySystem
|
|||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<PerishableComponent, MapInitEvent>(OnPerishableMapInit);
|
||||
SubscribeLocalEvent<PerishableComponent, EntityUnpausedEvent>(OnPerishableUnpaused);
|
||||
SubscribeLocalEvent<PerishableComponent, MobStateChangedEvent>(OnMobStateChanged);
|
||||
|
||||
|
|
@ -42,6 +43,11 @@ public sealed class RottingSystem : EntitySystem
|
|||
SubscribeLocalEvent<TemperatureComponent, IsRottingEvent>(OnTempIsRotting);
|
||||
}
|
||||
|
||||
private void OnPerishableMapInit(EntityUid uid, PerishableComponent component, MapInitEvent args)
|
||||
{
|
||||
component.NextPerishUpdate = _timing.CurTime + component.PerishUpdateRate;
|
||||
}
|
||||
|
||||
private void OnPerishableUnpaused(EntityUid uid, PerishableComponent component, ref EntityUnpausedEvent args)
|
||||
{
|
||||
component.NextPerishUpdate += args.PausedTime;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
Quantity: 5
|
||||
- type: Item
|
||||
size: 5
|
||||
# let air cook and freeze meat for cooking and preservation
|
||||
- type: AtmosExposed
|
||||
- type: Temperature
|
||||
currentTemperature: 290
|
||||
- type: Material
|
||||
|
|
|
|||
Loading…
Reference in New Issue