Fix miasma error (#10629)
This commit is contained in:
@@ -208,6 +208,7 @@ namespace Content.Server.Atmos.Miasma
|
||||
ToggleDecomposition(args.Entity, false, perishable);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEntRemoved(EntityUid uid, AntiRottingContainerComponent component, EntRemovedFromContainerMessage args)
|
||||
{
|
||||
if (TryComp<PerishableComponent>(args.Entity, out var perishable) && !Terminating(uid))
|
||||
@@ -217,7 +218,6 @@ namespace Content.Server.Atmos.Miasma
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Fly stuff
|
||||
|
||||
private void OnFliesInit(EntityUid uid, FliesComponent component, ComponentInit args)
|
||||
@@ -235,7 +235,7 @@ namespace Content.Server.Atmos.Miasma
|
||||
|
||||
public void ToggleDecomposition(EntityUid uid, bool decompose, PerishableComponent? perishable = null)
|
||||
{
|
||||
if (!Resolve(uid, ref perishable))
|
||||
if (Terminating(uid) || !Resolve(uid, ref perishable))
|
||||
return;
|
||||
|
||||
if (decompose == perishable.Progressing) // Saved a few cycles
|
||||
|
||||
Reference in New Issue
Block a user