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

◆ PlugInDevice()

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

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

1653 {
1654 if (m_ThisEntityAI && CanReceivePlugFrom(device_to_plug))
1655 {
1656 device_to_plug.IncreaseLifetime();
1658 if (device_to_plug.GetCompEM().IsPlugged())
1659 device_to_plug.GetCompEM().UnplugThis();
1660
1661 GetPluggedDevices().Insert(device_to_plug);
1662 device_to_plug.GetCompEM().SetEnergySource(m_ThisEntityAI);
1663
1664 PlugCordIntoSocket(device_to_plug, socket_id); // Visualisation
1665 OnOwnSocketTaken(device_to_plug);
1666
1667 device_to_plug.GetCompEM().OnIsPlugged(m_ThisEntityAI);
1669
1670 if (g_Game.IsServer() || !g_Game.IsMultiplayer())
1671 {
1672 device_to_plug.HideSelection(SEL_CORD_FOLDED);
1673 device_to_plug.ShowSelection(SEL_CORD_PLUGGED);
1674 }
1675
1676 return true;
1677 }
1678
1679 return false;
1680 }
DayZGame g_Game
Определения DayZGame.c:4074
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:1531
void WakeUpWholeBranch(EntityAI original_caller)
Определения ComponentEnergyManager.c:1557
void PlugCordIntoSocket(EntityAI device_to_plug, int socket_id=-1)
Определения ComponentEnergyManager.c:1580
array< EntityAI > GetPluggedDevices()
Energy manager: Returns an array of devices which are plugged into this one.
Определения ComponentEnergyManager.c:1364
static const string SEL_CORD_PLUGGED
Определения ComponentEnergyManager.c:65
void OnOwnSocketTaken(EntityAI device)
Определения ComponentEnergyManager.c:1420
bool CanReceivePlugFrom(EntityAI device_to_plug)
Energy manager: Returns true if this device can receive power plug of the other device.
Определения ComponentEnergyManager.c:1002

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