DayZ 1.27
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 строка 1502

1503 {
1504 OnInteractBranch(originalCaller, player, system);
1505 if ( GetSocketsCount() > 0 )
1506 {
1507 array<EntityAI> devices = GetPluggedDevices();
1508
1509 foreach ( EntityAI device : devices)
1510 {
1511 if ( device != originalCaller ) // originalCaller check here prevents infinite loops
1512 {
1513 device.GetCompEM().InteractBranch( originalCaller, player, system );
1514 }
1515 }
1516 }
1517 }
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:1520
array< EntityAI > GetPluggedDevices()
Energy manager: Returns an array of devices which are plugged into this one.
Определения ComponentEnergyManager.c:1332
int GetSocketsCount()
Energy manager: Returns the count of power sockets (whenever used or not)
Определения ComponentEnergyManager.c:1102

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

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