DayZ 1.30
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 строка 1531

1532 {
1533 OnInteractBranch(originalCaller, player, system);
1534 if ( GetSocketsCount() > 0 )
1535 {
1536 array<EntityAI> devices = GetPluggedDevices();
1537
1538 foreach ( EntityAI device : devices)
1539 {
1540 if ( device != originalCaller ) // originalCaller check here prevents infinite loops
1541 {
1542 device.GetCompEM().InteractBranch( originalCaller, player, system );
1543 }
1544 }
1545 }
1546 }
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:1549
array< EntityAI > GetPluggedDevices()
Energy manager: Returns an array of devices which are plugged into this one.
Определения ComponentEnergyManager.c:1364
int GetSocketsCount()
Energy manager: Returns the count of power sockets (whenever used or not)
Определения ComponentEnergyManager.c:1134

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

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