5 if (!
super.CanPutAsAttachment(parent))
14 if (GetCompEM().GetPluggedDevice())
27 if (GetCompEM().IsPlugged())
35 if (!
super.CanPutIntoHands(parent))
38 if (HasEnergyManager())
52 if (!
super.CanPutInCargo(parent))
64 if (GetHierarchyParent() ==
player || (GetHierarchyParent() && GetHierarchyParent().GetInventory().GetCargo()))
66 if (HasEnergyManager())
79 this.GetCompEM().UnplugAllDevices();
89 if (HasEnergyManager())
99 this.GetCompEM().UnplugAllDevices();
106 if (GetCompEM().IsPlugged())
141 RegisterNetSyncVariableInt(
"m_Efficiency0To10");
159 super.OnEnergyConsumed();
162 float energyCoef = GetCompEM().GetEnergy0To1();
174 super.OnEnergyAdded();
177 float energyCoef = GetCompEM().GetEnergy0To1();
void AddAction(typename actionName)
provides access to slot configuration
const int INVALID
Invalid slot (-1)
override bool CanDisplayAttachmentSlot(int slot_id)
float m_EfficiencyDecayStart
override void OnEnergyAdded()
override void SetActions()
override bool CanPutAsAttachment(EntityAI parent)
override void OnEnergyConsumed()
override void OnInventoryEnter(Man player)
float GetEfficiencyDecayStart()
Returns efficiency of this battery. The value is synchronized from server to all clients and is accur...
override void OnMovedInsideCargo(EntityAI container)
override bool CanDetachAttachment(EntityAI parent)
override bool DisplayNameRuinAttach()
float GetEfficiency0To1()
Returns efficiency of this battery. The value is synchronized from server to all clients and is accur...
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override bool CanPutIntoHands(EntityAI player)
override bool CanPutInCargo(EntityAI parent)
int m_Efficiency0To10
ENERGY CONSUMPTION.
override bool ShowZonesHealth()
static proto float Round(float f)
Returns mathematical round of value.