protected override void RemoveComponentSpecific() { base.RemoveComponentSpecific(); #if CLIENT inventoryTopSprite?.Remove(); inventoryBackSprite?.Remove(); inventoryBottomSprite?.Remove(); ContainedStateIndicator?.Remove(); if (SubEditorScreen.IsSubEditor()) { Inventory.DeleteAllItems(); return; } #endif foreach (Item item in Inventory.Items) { if (item == null) { continue; } item.Drop(null); } }
protected override void RemoveComponentSpecific() { base.RemoveComponentSpecific(); #if CLIENT inventoryTopSprite?.Remove(); inventoryBackSprite?.Remove(); inventoryBottomSprite?.Remove(); ContainedStateIndicator?.Remove(); if (SubEditorScreen.IsSubEditor()) { Inventory.DeleteAllItems(); return; } #endif Inventory.AllItemsMod.ForEach(it => it.Drop(null)); }