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 строка 955
956 {
957 if (socket_id == -1)
958 {
961
962 if ( plugged_devices < plugged_devices_limit )
963 {
964 return true;
965 }
966
967 return false;
968 }
969 else
970 {
972
973 if (device)
974 {
975 return false;
976 }
977 else
978 {
979 return true;
980 }
981 }
982 }
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().