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

◆ UnplugCordFromSocket()

void ComponentEnergyManager::UnplugCordFromSocket ( int socket_to_unplug_ID)
inlineprotected

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

1661 {
1662 EntityAI plug_owner = GetDeviceBySocketID(socket_to_unplug_ID);
1663
1664 if ( plug_owner )
1665 {
1666 SetDeviceBySocketID(socket_to_unplug_ID, NULL);
1667 string unplugged_selection = SOCKET_ + (socket_to_unplug_ID+1).ToString() + _AVAILABLE;
1668 m_ThisEntityAI.ShowSelection ( unplugged_selection );
1669
1670 string plugged_selection = SOCKET_ + (socket_to_unplug_ID+1).ToString() + _PLUGGED;
1671 m_ThisEntityAI.HideSelection ( plugged_selection );
1672 SetPlugOwner( plugged_selection, NULL );
1673 plug_owner.GetCompEM().SetMySocketID(-1);
1674 }
1675 }
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:1650
void SetDeviceBySocketID(int id, EntityAI plugged_device)
Energy manager: Stores the device which is plugged into the given socket ID.
Определения ComponentEnergyManager.c:679
EntityAI GetDeviceBySocketID(int id)
Energy manager: Returns the device which is plugged into the given socket ID.
Определения ComponentEnergyManager.c:1298

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

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