Unhardcode some logic related to objects with battery slots. Minor fix to fire helmets. (#11734)

This commit is contained in:
Mervill
2022-10-15 13:15:39 -07:00
committed by GitHub
parent 581a805063
commit c11c11bace
13 changed files with 86 additions and 101 deletions

View File

@@ -92,7 +92,10 @@ internal sealed class ChargerSystem : EntitySystem
if (!TryComp(args.EntityUid, out PowerCellSlotComponent? cellSlot))
return;
if (!cellSlot.FitsInCharger || !cellSlot.CellSlot.HasItem)
if (!_itemSlotsSystem.TryGetSlotById(args.EntityUid, cellSlot.CellSlotId, out ItemSlot? itemSlot))
return;
if (!cellSlot.FitsInCharger || !itemSlot.HasItem)
args.Cancel();
}
}