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

◆ UnplugCordFromSocket()

void ComponentEnergyManager::UnplugCordFromSocket ( int socket_to_unplug_ID)
inlineprotected

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

1724 {
1725 EntityAI plug_owner = GetDeviceBySocketID(socket_to_unplug_ID);
1726
1727 if (m_ThisEntityAI && plug_owner)
1728 {
1729 SetDeviceBySocketID(socket_to_unplug_ID, NULL);
1730 string unplugged_selection = SOCKET_ + (socket_to_unplug_ID+1).ToString() + _AVAILABLE;
1731 m_ThisEntityAI.ShowSelection ( unplugged_selection );
1732
1733 string plugged_selection = SOCKET_ + (socket_to_unplug_ID+1).ToString() + _PLUGGED;
1734 m_ThisEntityAI.HideSelection ( plugged_selection );
1735 SetPlugOwner( plugged_selection, NULL );
1736 plug_owner.GetCompEM().SetMySocketID(-1);
1737 }
1738 }
class LogManager EntityAI
proto string ToString()
EntityAI m_ThisEntityAI
Определения Component.c:24
static const string SOCKET_
Определения ComponentEnergyManager.c:62
static const string _AVAILABLE
Определения ComponentEnergyManager.c:64
static const string _PLUGGED
Определения ComponentEnergyManager.c:63
void SetPlugOwner(string selection_name, EntityAI device)
Определения ComponentEnergyManager.c:1713
void SetDeviceBySocketID(int id, EntityAI plugged_device)
Energy manager: Stores the device which is plugged into the given socket ID.
Определения ComponentEnergyManager.c:694
EntityAI GetDeviceBySocketID(int id)
Energy manager: Returns the device which is plugged into the given socket ID.
Определения ComponentEnergyManager.c:1343

Перекрестные ссылки _AVAILABLE, _PLUGGED, GetDeviceBySocketID(), Component::m_ThisEntityAI, SetDeviceBySocketID(), SetPlugOwner(), SOCKET_ и ToString().

Используется в UnplugDevice().