Called when entity is part of "connected system" and being restored after load.
1334 {
1335
1336
1337 if (
m_EM &&
m_EM.GetRestorePlugState() )
1338 {
1339 int b1 =
m_EM.GetEnergySourceStorageIDb1();
1340 int b2 =
m_EM.GetEnergySourceStorageIDb2();
1341 int b3 =
m_EM.GetEnergySourceStorageIDb3();
1342 int b4 =
m_EM.GetEnergySourceStorageIDb4();
1343
1344
1346
1347
1348
1349
1350
1351
1352 bool is_attachment = false;
1353
1354 if (potential_energy_source)
1356
1357 if ( !is_attachment && potential_energy_source )
1358 is_attachment = potential_energy_source.GetInventory().HasAttachment(this);
1359
1360 if ( potential_energy_source && potential_energy_source.GetCompEM() && !is_attachment )
1361 m_EM.PlugThisInto(potential_energy_source);
1362 }
1363 }
proto native EntityAI GetEntityByPersitentID(int b1, int b2, int b3, int b4)
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
proto native CGame GetGame()