mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-12 15:47:04 +01:00
Machinery: Always use update_use_power()
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/obj/machinery/atmospherics/binary
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH|NORTH
|
||||
use_power = 1
|
||||
use_power = USE_POWER_IDLE
|
||||
|
||||
var/datum/gas_mixture/air1
|
||||
var/datum/gas_mixture/air2
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
level = 1
|
||||
|
||||
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
|
||||
|
||||
@@ -214,10 +214,10 @@
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
if(signal.data["power"])
|
||||
use_power = text2num(signal.data["power"])
|
||||
update_use_power(text2num(signal.data["power"]))
|
||||
|
||||
if(signal.data["power_toggle"])
|
||||
use_power = !use_power
|
||||
update_use_power(!use_power)
|
||||
|
||||
if(signal.data["direction"])
|
||||
pump_direction = text2num(signal.data["direction"])
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
name = "pressure regulator"
|
||||
desc = "A one-way air valve that can be used to regulate input or output pressure, and flow rate. Does not require power."
|
||||
|
||||
use_power = 0
|
||||
use_power = USE_POWER_OFF
|
||||
|
||||
var/unlocked = 0 //If 0, then the valve is locked closed, otherwise it is open(-able, it's a one-way valve so it closes if gas would flow backwards).
|
||||
var/target_pressure = ONE_ATMOSPHERE
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
power_rating = 15000 //15000 W ~ 20 HP
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/high_power/on
|
||||
use_power = 1
|
||||
use_power = USE_POWER_IDLE
|
||||
icon_state = "map_on"
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/high_power/update_icon()
|
||||
|
||||
Reference in New Issue
Block a user