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

◆ OnAttachmentAdded()

void ComponentEnergyManager::OnAttachmentAdded ( EntityAI elec_device)
inlineprotected

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

1454 {
1455 if (!m_ThisEntityAI)
1456 return;
1457
1458 int attachment_action_type = GetAttachmentAction();
1459
1460 if (attachment_action_type == PLUG_THIS_INTO_ATTACHMENT)
1461 {
1462 if (elec_device.GetCompEM().CanReceivePlugFrom(m_ThisEntityAI))
1463 {
1464 PlugThisInto(elec_device);
1465 }
1466 }
1467 else if (attachment_action_type == PLUG_ATTACHMENTS_INTO_THIS)
1468 {
1469 elec_device.GetCompEM().PlugThisInto(m_ThisEntityAI);
1470 }
1471 }
const int PLUG_ATTACHMENTS_INTO_THIS
const int PLUG_THIS_INTO_ATTACHMENT
EntityAI m_ThisEntityAI
Определения Component.c:24
int GetAttachmentAction()
Определения ComponentEnergyManager.c:1146
bool PlugThisInto(EntityAI energy_source, int socket_id=-1)
Energy manager: Attempts to plug this device into the energy_source. Returns true if the action was s...
Определения ComponentEnergyManager.c:739

Перекрестные ссылки GetAttachmentAction(), Component::m_ThisEntityAI, PLUG_ATTACHMENTS_INTO_THIS, PLUG_THIS_INTO_ATTACHMENT и PlugThisInto().