Fixes Opporozidone Instarot issues (#42472)

Removes a vestigial shutdown handler

When opporozidone removes the RottingComponent, the PerishableComponent's
RotNextUpdate is set to 0 - and then it undergoes a period of catch-up to
the current time. If the entity is susceptible to rot in that interval, it'll
accumulate 2 minutes 30 seconds worth of rot, per second.

This gets worse the longer the server has been running, as there's a greater value
in _timing.CurTime to catch up to. This handler seems to be vestigial from the
MiasmaSystem and does not seem to be necessary for anything anymore.
This commit is contained in:
Marlyn
2026-01-26 16:30:21 +01:00
committed by GitHub
parent b33c780a6c
commit fd0f525927

View File

@@ -25,7 +25,6 @@ public abstract class SharedRottingSystem : EntitySystem
SubscribeLocalEvent<PerishableComponent, MobStateChangedEvent>(OnMobStateChanged);
SubscribeLocalEvent<PerishableComponent, ExaminedEvent>(OnPerishableExamined);
SubscribeLocalEvent<RottingComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<RottingComponent, MobStateChangedEvent>(OnRottingMobStateChanged);
SubscribeLocalEvent<RottingComponent, RejuvenateEvent>(OnRejuvenate);
SubscribeLocalEvent<RottingComponent, ExaminedEvent>(OnExamined);
@@ -63,14 +62,6 @@ public abstract class SharedRottingSystem : EntitySystem
args.PushMarkup(Loc.GetString(description, ("target", Identity.Entity(perishable, EntityManager))));
}
private void OnShutdown(Entity<RottingComponent> ent, ref ComponentShutdown args)
{
if (TryComp<PerishableComponent>(ent, out var perishable))
{
perishable.RotNextUpdate = TimeSpan.Zero;
}
}
private void OnRottingMobStateChanged(EntityUid uid, RottingComponent component, MobStateChangedEvent args)
{
if (args.NewMobState == MobState.Dead)