Energy manager: Unplugs the given device from this one.
452 {
454 {
456 bool deviceFound = false;
457
458 for (int i = indexStart; i >= 0; --i)
459 {
461
462 if (plugged_device == device_to_unplug)
463 {
465 deviceFound = true;
466 break;
467 }
468 }
469
470 if (deviceFound)
471 {
472 int socket_ID = device_to_unplug.GetCompEM().GetMySocketID();
474 device_to_unplug.GetCompEM().SetEnergySource(null);
475 device_to_unplug.GetCompEM().DeviceUpdate();
476 device_to_unplug.GetCompEM().StartUpdates();
478
480 {
483 }
484
489 }
490 }
491 }
static const string SEL_CORD_FOLDED
void UnplugCordFromSocket(int socket_to_unplug_ID)
int GetPluggedDevicesCount()
Energy manager: Returns the number of devices plugged into this one.
array< EntityAI > GetPluggedDevices()
Energy manager: Returns an array of devices which are plugged into this one.
static const string SEL_CORD_PLUGGED
void OnOwnSocketReleased(EntityAI device)
proto native CGame GetGame()