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

◆ InteractBranch()

void ComponentEnergyManager::InteractBranch ( EntityAI originalCaller,
Man player = null,
int system = 0 )
inlineprotected

Gets called originally when the player is interacting with an item containing this energy component, then recursively following the branches of connection from the original item to the peripheries External calling of this function is not automatic for all item interactions and may need to be implemented on case by case bases Avoid using for gameplay logic, use 'OnInteractBranch' instead

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

1562 {
1563 OnInteractBranch(originalCaller, player, system);
1564 if ( GetSocketsCount() > 0 )
1565 {
1566 array<EntityAI> devices = GetPluggedDevices();
1567
1568 foreach ( EntityAI device : devices)
1569 {
1570 if ( device != originalCaller ) // originalCaller check here prevents infinite loops
1571 {
1572 device.GetCompEM().InteractBranch( originalCaller, player, system );
1573 }
1574 }
1575 }
1576 }
class LogManager EntityAI
void OnInteractBranch(EntityAI originalCaller, Man player, int system)
Called when the player is interacting with an item containing this energy component,...
Определения ComponentEnergyManager.c:1579
array< EntityAI > GetPluggedDevices()
Energy manager: Returns an array of devices which are plugged into this one.
Определения ComponentEnergyManager.c:1377
int GetSocketsCount()
Energy manager: Returns the count of power sockets (whenever used or not)
Определения ComponentEnergyManager.c:1147

Перекрестные ссылки GetPluggedDevices(), GetSocketsCount() и OnInteractBranch().

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