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

◆ OnAttachmentAdded()

void ComponentEnergyManager::OnAttachmentAdded ( EntityAI elec_device)
inlineprotected

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

1471 {
1472 if (!m_ThisEntityAI)
1473 return;
1474
1475 int attachment_action_type = GetAttachmentAction();
1476
1477 if (attachment_action_type == PLUG_THIS_INTO_ATTACHMENT)
1478 {
1479 if (elec_device.GetCompEM().CanReceivePlugFrom(m_ThisEntityAI))
1480 {
1481 PlugThisInto(elec_device);
1482 }
1483 }
1484 else if (attachment_action_type == PLUG_ATTACHMENTS_INTO_THIS)
1485 {
1486 elec_device.GetCompEM().PlugThisInto(m_ThisEntityAI);
1487 }
1488 }
const int PLUG_ATTACHMENTS_INTO_THIS
const int PLUG_THIS_INTO_ATTACHMENT
EntityAI m_ThisEntityAI
Определения Component.c:24
int GetAttachmentAction()
Определения ComponentEnergyManager.c:1159
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:752

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