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