mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 10:01:40 +00:00
Fixes powernet avail checks (#47771)
This commit is contained in:
@@ -1120,9 +1120,9 @@
|
||||
if(terminal && terminal.powernet)
|
||||
terminal.add_load(amount)
|
||||
|
||||
/obj/machinery/power/apc/avail()
|
||||
/obj/machinery/power/apc/avail(amount)
|
||||
if(terminal)
|
||||
return terminal.avail()
|
||||
return terminal.avail(amount)
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
@@ -210,9 +210,9 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/structure/cable/proc/avail()
|
||||
/obj/structure/cable/proc/avail(amount)
|
||||
if(powernet)
|
||||
return powernet.avail
|
||||
return amount ? powernet.avail >= amount : powernet.avail
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/power/proc/avail()
|
||||
/obj/machinery/power/proc/avail(amount)
|
||||
if(powernet)
|
||||
return powernet.avail
|
||||
return amount ? powernet.avail >= amount : powernet.avail
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user