Energy manager: Returns true if this device has any free socket to receive a plug. If optional parameter socket_id is provided then only that socket ID is checked.
См. определение в файле ComponentEnergyManager.c строка 942
943 {
944 if (socket_id == -1)
945 {
948
949 if ( plugged_devices < plugged_devices_limit )
950 {
951 return true;
952 }
953
954 return false;
955 }
956 else
957 {
959
960 if (device)
961 {
962 return false;
963 }
964 else
965 {
966 return true;
967 }
968 }
969 }
int GetPluggedDevicesCount()
Energy manager: Returns the number of devices plugged into this one.
int GetSocketsCount()
Energy manager: Returns the count of power sockets (whenever used or not)
EntityAI GetDeviceBySocketID(int id)
Energy manager: Returns the device which is plugged into the given socket ID.
Перекрестные ссылки GetDeviceBySocketID(), GetPluggedDevicesCount() и GetSocketsCount().
Используется в CanReceivePlugFrom().