Called when entity is part of "connected system" and being restored after load.
1354 {
1355
1356
1357 if (
m_EM &&
m_EM.GetRestorePlugState() )
1358 {
1359 int b1 =
m_EM.GetEnergySourceStorageIDb1();
1360 int b2 =
m_EM.GetEnergySourceStorageIDb2();
1361 int b3 =
m_EM.GetEnergySourceStorageIDb3();
1362 int b4 =
m_EM.GetEnergySourceStorageIDb4();
1363
1364
1365 EntityAI potential_energy_source =
g_Game.GetEntityByPersitentID(b1, b2, b3, b4);
1366
1367
1368
1369
1370
1371
1372 bool is_attachment = false;
1373
1374 if (potential_energy_source)
1376
1377 if ( !is_attachment && potential_energy_source )
1378 is_attachment = potential_energy_source.GetInventory().HasAttachment(this);
1379
1380 if ( potential_energy_source && potential_energy_source.GetCompEM() && !is_attachment )
1381 m_EM.PlugThisInto(potential_energy_source);
1382 }
1383 }
proto native GameInventory GetInventory()
void EntityAI()
cache blood infection chance (cfgVehicles-><entity>->Skinning->BloodInfectionSettings)
ComponentEnergyManager m_EM
proto native bool HasAttachment(notnull EntityAI e)
brief Returns True if entity is attached to this