From 3e64676dbdc673fe63f8b9dc0a49ad1e92085f9a Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Mon, 7 Aug 2023 12:13:35 +0100 Subject: [PATCH] meat rotting hotfix (#18760) Co-authored-by: deltanedas <@deltanedas:kde.org> --- Content.Server/Atmos/Miasma/RottingSystem.cs | 6 ++++++ .../Prototypes/Entities/Objects/Consumable/Food/meat.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/Content.Server/Atmos/Miasma/RottingSystem.cs b/Content.Server/Atmos/Miasma/RottingSystem.cs index 6887cd93e8..676c9ec6e9 100644 --- a/Content.Server/Atmos/Miasma/RottingSystem.cs +++ b/Content.Server/Atmos/Miasma/RottingSystem.cs @@ -29,6 +29,7 @@ public sealed class RottingSystem : EntitySystem { base.Initialize(); + SubscribeLocalEvent(OnPerishableMapInit); SubscribeLocalEvent(OnPerishableUnpaused); SubscribeLocalEvent(OnMobStateChanged); @@ -42,6 +43,11 @@ public sealed class RottingSystem : EntitySystem SubscribeLocalEvent(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; diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml index 93fcc81f5c..c324aec716 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml @@ -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