46 {
48
49
50 if (targetIB && targetIB.GetHierarchyRoot() == targetIB && item && targetIB.HasEnergyManager() && item.HasEnergyManager())
51 {
52 if (!targetIB.GetCompEM().IsPlugged() && item.GetCompEM().CanReceivePlugFrom(targetIB))
53 {
54
56 }
57
58
59 if (item.IsInherited(VehicleBattery))
60 {
61 MetalWire metalWire = MetalWire.Cast(item.GetCompEM().GetPluggedDevice());
62
63 if (metalWire && metalWire.GetCompEM().CanReceivePlugFrom(targetIB))
64 {
65 return true;
66 }
67 }
68 }
69
70 return false;
71 }
class GP5GasMask extends MaskBase ItemBase
override bool IsElectricAppliance()