mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 12:37:50 +01:00
Machinery: Always use update_use_power()
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
icon_state = "freezer_0"
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 0
|
||||
use_power = USE_POWER_OFF
|
||||
idle_power_usage = 5 // 5 Watts for thermostat related circuitry
|
||||
circuit = /obj/item/weapon/circuitboard/unary_atmos/cooler
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
if(..())
|
||||
return 1
|
||||
if(href_list["toggleStatus"])
|
||||
use_power = !use_power
|
||||
update_use_power(!use_power)
|
||||
update_icon()
|
||||
if(href_list["temp"])
|
||||
var/amount = text2num(href_list["temp"])
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
icon_state = "heater_0"
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 0
|
||||
use_power = USE_POWER_OFF
|
||||
idle_power_usage = 5 //5 Watts for thermostat related circuitry
|
||||
circuit = /obj/item/weapon/circuitboard/unary_atmos/heater
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
if(..())
|
||||
return 1
|
||||
if(href_list["toggleStatus"])
|
||||
use_power = !use_power
|
||||
update_use_power(!use_power)
|
||||
update_icon()
|
||||
if(href_list["temp"])
|
||||
var/amount = text2num(href_list["temp"])
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
name = "air injector"
|
||||
desc = "Passively injects air into its surroundings. Has a valve attached to it that can control flow rate."
|
||||
|
||||
use_power = 0
|
||||
use_power = USE_POWER_OFF
|
||||
idle_power_usage = 150 //internal circuitry, friction losses and stuff
|
||||
power_rating = 15000 //15000 W ~ 20 HP
|
||||
|
||||
@@ -132,10 +132,10 @@
|
||||
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["inject"])
|
||||
spawn inject()
|
||||
@@ -160,7 +160,7 @@
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/attack_hand(mob/user as mob)
|
||||
to_chat(user, "<span class='notice'>You toggle \the [src].</span>")
|
||||
injecting = !injecting
|
||||
use_power = injecting
|
||||
update_use_power(injecting ? USE_POWER_IDLE : USE_POWER_OFF)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
name = "Air Vent"
|
||||
desc = "Has a valve and pump attached to it"
|
||||
use_power = 0
|
||||
use_power = USE_POWER_OFF
|
||||
idle_power_usage = 150 //internal circuitry, friction losses and stuff
|
||||
power_rating = 30000 //7500 W ~ 10 HP //VOREStation Edit - 30000 W
|
||||
|
||||
@@ -50,18 +50,18 @@
|
||||
//var/datum/looping_sound/air_pump/soundloop //VOREStation Removal
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/on
|
||||
use_power = 1
|
||||
use_power = USE_POWER_IDLE
|
||||
icon_state = "map_vent_out"
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/siphon
|
||||
pump_direction = 0
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/siphon/on
|
||||
use_power = 1
|
||||
use_power = USE_POWER_IDLE
|
||||
icon_state = "map_vent_in"
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/siphon/on/atmos
|
||||
use_power = 1
|
||||
use_power = USE_POWER_IDLE
|
||||
icon_state = "map_vent_in"
|
||||
external_pressure_bound = 0
|
||||
external_pressure_bound_default = 0
|
||||
@@ -189,7 +189,7 @@
|
||||
return 1
|
||||
|
||||
if (!node)
|
||||
use_power = 0
|
||||
update_use_power(USE_POWER_OFF)
|
||||
if(!can_pump())
|
||||
return 0
|
||||
|
||||
@@ -311,10 +311,10 @@
|
||||
pump_direction = 1
|
||||
|
||||
if(signal.data["power"] != null)
|
||||
use_power = text2num(signal.data["power"])
|
||||
update_use_power(text2num(signal.data["power"]))
|
||||
|
||||
if(signal.data["power_toggle"] != null)
|
||||
use_power = !use_power
|
||||
update_use_power(!use_power)
|
||||
|
||||
if(signal.data["checks"] != null)
|
||||
if (signal.data["checks"] == "default")
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
name = "Air Scrubber"
|
||||
desc = "Has a valve and pump attached to it"
|
||||
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
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
var/radio_filter_in
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/on
|
||||
use_power = 1
|
||||
use_power = USE_POWER_IDLE
|
||||
icon_state = "map_scrubber_on"
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/New()
|
||||
@@ -135,7 +135,7 @@
|
||||
return 1
|
||||
|
||||
if (!node)
|
||||
use_power = 0
|
||||
update_use_power(USE_POWER_OFF)
|
||||
//broadcast_status()
|
||||
if(!use_power || (stat & (NOPOWER|BROKEN)))
|
||||
return 0
|
||||
@@ -180,21 +180,21 @@
|
||||
return 0
|
||||
|
||||
if(signal.data["power"] != null)
|
||||
use_power = text2num(signal.data["power"])
|
||||
update_use_power(text2num(signal.data["power"]))
|
||||
if(signal.data["power_toggle"] != null)
|
||||
use_power = !use_power
|
||||
update_use_power(!use_power)
|
||||
|
||||
if(signal.data["panic_siphon"]) //must be before if("scrubbing" thing
|
||||
panic = text2num(signal.data["panic_siphon"])
|
||||
if(panic)
|
||||
use_power = 1
|
||||
update_use_power(USE_POWER_IDLE)
|
||||
scrubbing = 0
|
||||
else
|
||||
scrubbing = 1
|
||||
if(signal.data["toggle_panic_siphon"] != null)
|
||||
panic = !panic
|
||||
if(panic)
|
||||
use_power = 1
|
||||
update_use_power(USE_POWER_IDLE)
|
||||
scrubbing = 0
|
||||
else
|
||||
scrubbing = 1
|
||||
|
||||
Reference in New Issue
Block a user