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

◆ PlugInDevice()

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

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

1683 {
1684 if (m_ThisEntityAI && CanReceivePlugFrom(device_to_plug))
1685 {
1686 device_to_plug.IncreaseLifetime();
1688 if (device_to_plug.GetCompEM().IsPlugged())
1689 device_to_plug.GetCompEM().UnplugThis();
1690
1691 GetPluggedDevices().Insert(device_to_plug);
1692 device_to_plug.GetCompEM().SetEnergySource(m_ThisEntityAI);
1693
1694 PlugCordIntoSocket(device_to_plug, socket_id); // Visualisation
1695 OnOwnSocketTaken(device_to_plug);
1696
1697 device_to_plug.GetCompEM().OnIsPlugged(m_ThisEntityAI);
1699
1700 if (g_Game.IsServer() || !g_Game.IsMultiplayer())
1701 {
1702 device_to_plug.HideSelection(SEL_CORD_FOLDED);
1703 device_to_plug.ShowSelection(SEL_CORD_PLUGGED);
1704 }
1705
1706 return true;
1707 }
1708
1709 return false;
1710 }
DayZGame g_Game
Определения DayZGame.c:3942
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:1561
void WakeUpWholeBranch(EntityAI original_caller)
Определения ComponentEnergyManager.c:1587
void PlugCordIntoSocket(EntityAI device_to_plug, int socket_id=-1)
Определения ComponentEnergyManager.c:1610
array< EntityAI > GetPluggedDevices()
Energy manager: Returns an array of devices which are plugged into this one.
Определения ComponentEnergyManager.c:1377
static const string SEL_CORD_PLUGGED
Определения ComponentEnergyManager.c:65
void OnOwnSocketTaken(EntityAI device)
Определения ComponentEnergyManager.c:1437
bool CanReceivePlugFrom(EntityAI device_to_plug)
Energy manager: Returns true if this device can receive power plug of the other device.
Определения ComponentEnergyManager.c:1015

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