Merge pull request #12837 from silicons/apcs
see unoptimized code doesn't matter much until iceboxstation rolls and now said unoptimized code is looping across probably a few tens of thousands of objects and now we have a problem
This commit is contained in:
@@ -935,6 +935,9 @@
|
||||
return "[area.name] : [equipment]/[lighting]/[environ] ([lastused_equip+lastused_light+lastused_environ]) : [cell? cell.percent() : "N/C"] ([charging])"
|
||||
|
||||
/obj/machinery/power/apc/proc/update()
|
||||
var/old_light = area.power_light
|
||||
var/old_equip = area.power_equip
|
||||
var/old_environ = area.power_environ
|
||||
if(operating && !shorted && !failure_timer)
|
||||
area.power_light = (lighting > 1)
|
||||
area.power_equip = (equipment > 1)
|
||||
@@ -943,7 +946,8 @@
|
||||
area.power_light = FALSE
|
||||
area.power_equip = FALSE
|
||||
area.power_environ = FALSE
|
||||
area.power_change()
|
||||
if(old_light != area.power_light || old_equip != area.power_equip || old_environ != area.power_environ)
|
||||
area.power_change()
|
||||
|
||||
/obj/machinery/power/apc/proc/can_use(mob/user, loud = 0) //used by attack_hand() and Topic()
|
||||
if(IsAdminGhost(user))
|
||||
|
||||
Reference in New Issue
Block a user