Always call update_use_power() instead of directly setting the use_power var.

- This will let us react to the change appropriately.
- While we're here, lets define some constants so we can stop using bare numbers.
- Always use those constants when calling update_use_power()
This commit is contained in:
Leshana
2020-03-21 16:40:22 -04:00
parent efeaf058ff
commit c2d16acdca
52 changed files with 124 additions and 119 deletions
+2 -2
View File
@@ -224,7 +224,7 @@
damaged = 1
loadProgram(powerdown_program, 0)
active = 0
use_power = 1
update_use_power(USE_POWER_IDLE)
for(var/mob/M in range(10,src))
M.show_message("The holodeck overloads!")
@@ -271,7 +271,7 @@
linkedholodeck.gravitychange(1)
active = 0
use_power = 1
update_use_power(USE_POWER_IDLE)
/obj/machinery/computer/HolodeckControl/proc/loadProgram(var/prog, var/check_delay = 1)