DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ PlugInDevice()

bool ComponentEnergyManager::PlugInDevice ( EntityAI device_to_plug,
int socket_id = -1 )
inlineprotected

См. определение в файле ComponentEnergyManager.c строка 1619

1620 {
1621 if (CanReceivePlugFrom(device_to_plug))
1622 {
1623 device_to_plug.IncreaseLifetime();
1625 if (device_to_plug.GetCompEM().IsPlugged())
1626 device_to_plug.GetCompEM().UnplugThis();
1627
1628 GetPluggedDevices().Insert(device_to_plug);
1629 device_to_plug.GetCompEM().SetEnergySource(m_ThisEntityAI);
1630
1631 PlugCordIntoSocket(device_to_plug, socket_id); // Visualisation
1632 OnOwnSocketTaken(device_to_plug);
1633
1634 device_to_plug.GetCompEM().OnIsPlugged(m_ThisEntityAI);
1636
1637 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
1638 {
1639 device_to_plug.HideSelection(SEL_CORD_FOLDED);
1640 device_to_plug.ShowSelection(SEL_CORD_PLUGGED);
1641 }
1642
1643 return true;
1644 }
1645
1646 return false;
1647 }
EntityAI m_ThisEntityAI
Определения Component.c:24
static const string SEL_CORD_FOLDED
Определения ComponentEnergyManager.c:66
void InteractBranch(EntityAI originalCaller, Man player=null, int system=0)
Определения ComponentEnergyManager.c:1502
void WakeUpWholeBranch(EntityAI original_caller)
Определения ComponentEnergyManager.c:1527
void PlugCordIntoSocket(EntityAI device_to_plug, int socket_id=-1)
Определения ComponentEnergyManager.c:1550
array< EntityAI > GetPluggedDevices()
Energy manager: Returns an array of devices which are plugged into this one.
Определения ComponentEnergyManager.c:1332
static const string SEL_CORD_PLUGGED
Определения ComponentEnergyManager.c:65
void OnOwnSocketTaken(EntityAI device)
Определения ComponentEnergyManager.c:1389
bool CanReceivePlugFrom(EntityAI device_to_plug)
Energy manager: Returns true if this device can receive power plug of the other device.
Определения ComponentEnergyManager.c:976
proto native CGame GetGame()

Перекрестные ссылки CanReceivePlugFrom(), GetGame(), GetPluggedDevices(), InteractBranch(), Component::m_ThisEntityAI, OnOwnSocketTaken(), PlugCordIntoSocket(), SEL_CORD_FOLDED, SEL_CORD_PLUGGED и WakeUpWholeBranch().