Closed WheteThunger closed 2 years ago
Possible implementation in CustomSpawnPoint.ObjectSpawned
:
var hackableCrate = entity as HackableLockedCrate;
if ((object)hackableCrate != null && hackableCrate.shouldDecay)
{
hackableCrate.shouldDecay = false;
hackableCrate.CancelInvoke(hackableCrate.DelayedDestroy);
}
Hackable crates spawned by spawn groups should have decay disabled. Issue reported here: https://umod.org/community/monument-addons/42403-entity-disappearing-reappearing
Note: The
codelockedhackablecrate
has decay enabled, whilecodelockedhackablecrate_oilrig
has decay disabled, so people can currently spawn the latter as a workaround. We should disable decay for both types to improve usability.