Energy manager: Unplugs the given device from this one.
461 {
463 {
465 bool deviceFound = false;
466
467 for (int i = indexStart; i >= 0; --i)
468 {
470
471 if (plugged_device == device_to_unplug)
472 {
474 deviceFound = true;
475 break;
476 }
477 }
478
480 {
481 int socket_ID = device_to_unplug.GetCompEM().GetMySocketID();
483 device_to_unplug.GetCompEM().SetEnergySource(null);
484 device_to_unplug.GetCompEM().DeviceUpdate();
485 device_to_unplug.GetCompEM().StartUpdates();
487
489 {
492 }
493
498 }
499 }
500 }
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)