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
@@ -73,7 +73,7 @@
icon_state += use_power ? "on" : "off"
else
icon_state += "off"
use_power = 0
update_use_power(USE_POWER_OFF)
/obj/machinery/atmospherics/trinary/atmos_filter/process()
..()
@@ -35,7 +35,7 @@
icon_state += use_power ? "on" : "off"
else
icon_state += "off"
use_power = 0
update_use_power(USE_POWER_OFF)
/obj/machinery/atmospherics/trinary/mixer/New()
..()
@@ -114,7 +114,7 @@
/obj/machinery/atmospherics/trinary/mixer/Topic(href,href_list)
if(..()) return 1
if(href_list["power"])
use_power = !use_power
update_use_power(!use_power)
if(href_list["set_press"])
var/max_flow_rate = min(air1.volume, air2.volume)
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",src.set_flow_rate) as num