Make EscapeInventorySystem respect Unremovable (fix glued hamster deletion) (#24488)

* Made EscapeInventorySystem respect Unremovable

* Oh look, there's a helper method

* Let's fix this too
This commit is contained in:
Tayrtahn
2024-01-25 09:01:13 -05:00
committed by GitHub
parent c771ea830c
commit 060fbcfbc8
3 changed files with 13 additions and 3 deletions

View File

@@ -99,7 +99,8 @@ public sealed class GlueSystem : SharedGlueSystem
private void OnHandPickUp(Entity<GluedComponent> entity, ref GotEquippedHandEvent args)
{
EnsureComp<UnremoveableComponent>(entity);
var comp = EnsureComp<UnremoveableComponent>(entity);
comp.DeleteOnDrop = false;
entity.Comp.Until = _timing.CurTime + entity.Comp.Duration;
}
}