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 строка 917
918 {
919 if (socket_id == -1)
920 {
923
924 if ( plugged_devices < plugged_devices_limit )
925 {
926 return true;
927 }
928
929 return false;
930 }
931 else
932 {
934
935 if (device)
936 {
937 return false;
938 }
939 else
940 {
941 return true;
942 }
943 }
944 }
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().