Unhardcode some logic related to objects with battery slots. Minor fix to fire helmets. (#11734)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user