Machinery: Always use update_use_power()

This commit is contained in:
Atermonera
2020-03-23 20:20:41 -07:00
committed by VirgoBot
parent f60a39dd4d
commit cbb40196fc
145 changed files with 1645 additions and 285 deletions

View File

@@ -26,7 +26,7 @@ Thus, the two variables affect pump operation are set in New():
//var/max_volume_transfer = 10000
use_power = 0
use_power = USE_POWER_OFF
idle_power_usage = 150 //internal circuitry, friction losses and stuff
power_rating = 7500 //7500 W ~ 10 HP
@@ -47,7 +47,7 @@ Thus, the two variables affect pump operation are set in New():
/obj/machinery/atmospherics/binary/pump/on
icon_state = "map_on"
use_power = 1
use_power = USE_POWER_IDLE
/obj/machinery/atmospherics/binary/pump/update_icon()
@@ -160,12 +160,12 @@ Thus, the two variables affect pump operation are set in New():
if(signal.data["power"])
if(text2num(signal.data["power"]))
use_power = 1
update_use_power(USE_POWER_IDLE)
else
use_power = 0
update_use_power(USE_POWER_OFF)
if("power_toggle" in signal.data)
use_power = !use_power
update_use_power(!use_power)
if(signal.data["set_output_pressure"])
target_pressure = between(
@@ -199,7 +199,7 @@ Thus, the two variables affect pump operation are set in New():
if(..()) return 1
if(href_list["power"])
use_power = !use_power
update_use_power(!use_power)
switch(href_list["set_press"])
if ("min")