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

@@ -1,7 +1,7 @@
/obj/machinery/atmospherics/binary /obj/machinery/atmospherics/binary
dir = SOUTH dir = SOUTH
initialize_directions = SOUTH|NORTH initialize_directions = SOUTH|NORTH
use_power = 1 use_power = USE_POWER_IDLE
var/datum/gas_mixture/air1 var/datum/gas_mixture/air1
var/datum/gas_mixture/air2 var/datum/gas_mixture/air2

View File

@@ -20,7 +20,7 @@
level = 1 level = 1
use_power = 0 use_power = USE_POWER_OFF
idle_power_usage = 150 //internal circuitry, friction losses and stuff idle_power_usage = 150 //internal circuitry, friction losses and stuff
power_rating = 7500 //7500 W ~ 10 HP power_rating = 7500 //7500 W ~ 10 HP
@@ -214,10 +214,10 @@
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command")) if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0 return 0
if(signal.data["power"]) if(signal.data["power"])
use_power = text2num(signal.data["power"]) update_use_power(text2num(signal.data["power"]))
if(signal.data["power_toggle"]) if(signal.data["power_toggle"])
use_power = !use_power update_use_power(!use_power)
if(signal.data["direction"]) if(signal.data["direction"])
pump_direction = text2num(signal.data["direction"]) pump_direction = text2num(signal.data["direction"])

View File

@@ -12,7 +12,7 @@
name = "pressure regulator" 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." 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/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 var/target_pressure = ONE_ATMOSPHERE

View File

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

View File

@@ -11,7 +11,7 @@
power_rating = 15000 //15000 W ~ 20 HP power_rating = 15000 //15000 W ~ 20 HP
/obj/machinery/atmospherics/binary/pump/high_power/on /obj/machinery/atmospherics/binary/pump/high_power/on
use_power = 1 use_power = USE_POWER_IDLE
icon_state = "map_on" icon_state = "map_on"
/obj/machinery/atmospherics/binary/pump/high_power/update_icon() /obj/machinery/atmospherics/binary/pump/high_power/update_icon()

View File

@@ -11,7 +11,7 @@
var/datum/omni_port/input var/datum/omni_port/input
var/datum/omni_port/output var/datum/omni_port/output
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 150 //internal circuitry, friction losses and stuff idle_power_usage = 150 //internal circuitry, friction losses and stuff
power_rating = 7500 //7500 W ~ 10 HP power_rating = 7500 //7500 W ~ 10 HP
@@ -161,13 +161,13 @@
switch(href_list["command"]) switch(href_list["command"])
if("power") if("power")
if(!configuring) if(!configuring)
use_power = !use_power update_use_power(!use_power)
else else
use_power = 0 update_use_power(USE_POWER_OFF)
if("configure") if("configure")
configuring = !configuring configuring = !configuring
if(configuring) if(configuring)
use_power = 0 update_use_power(USE_POWER_OFF)
//only allows config changes when in configuring mode ~otherwise you'll get weird pressure stuff going on //only allows config changes when in configuring mode ~otherwise you'll get weird pressure stuff going on
if(configuring && !use_power) if(configuring && !use_power)

View File

@@ -6,7 +6,7 @@
icon_state = "map_mixer" icon_state = "map_mixer"
pipe_state = "omni_mixer" pipe_state = "omni_mixer"
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 150 //internal circuitry, friction losses and stuff idle_power_usage = 150 //internal circuitry, friction losses and stuff
power_rating = 3700 //3700 W ~ 5 HP power_rating = 3700 //3700 W ~ 5 HP
@@ -178,13 +178,13 @@
switch(href_list["command"]) switch(href_list["command"])
if("power") if("power")
if(!configuring) if(!configuring)
use_power = !use_power update_use_power(!use_power)
else else
use_power = 0 update_use_power(USE_POWER_OFF)
if("configure") if("configure")
configuring = !configuring configuring = !configuring
if(configuring) if(configuring)
use_power = 0 update_use_power(USE_POWER_OFF)
//only allows config changes when in configuring mode ~otherwise you'll get weird pressure stuff going on //only allows config changes when in configuring mode ~otherwise you'll get weird pressure stuff going on
if(configuring && !use_power) if(configuring && !use_power)

View File

@@ -5,7 +5,7 @@
name = "omni device" name = "omni device"
icon = 'icons/atmos/omni_devices_vr.dmi' //VOREStation Edit - New Icon icon = 'icons/atmos/omni_devices_vr.dmi' //VOREStation Edit - New Icon
icon_state = "base" icon_state = "base"
use_power = 1 use_power = USE_POWER_IDLE
initialize_directions = 0 initialize_directions = 0
construction_type = /obj/item/pipe/quaternary construction_type = /obj/item/pipe/quaternary
level = 1 level = 1
@@ -67,7 +67,7 @@
last_flow_rate = 0 last_flow_rate = 0
if(error_check()) if(error_check())
use_power = 0 update_use_power(USE_POWER_OFF)
if((stat & (NOPOWER|BROKEN)) || !use_power) if((stat & (NOPOWER|BROKEN)) || !use_power)
return 0 return 0

View File

@@ -18,7 +18,7 @@
var/datum/pipe_network/network var/datum/pipe_network/network
var/on = 0 var/on = 0
use_power = 0 use_power = USE_POWER_OFF
level = 1 level = 1
/obj/machinery/atmospherics/portables_connector/init_dir() /obj/machinery/atmospherics/portables_connector/init_dir()

View File

@@ -9,7 +9,7 @@
name = "Gas filter" name = "Gas filter"
desc = "Filters one type of gas from an input, and pushes it out the side." desc = "Filters one type of gas from an input, and pushes it out the side."
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 150 //internal circuitry, friction losses and stuff idle_power_usage = 150 //internal circuitry, friction losses and stuff
power_rating = 7500 //This also doubles as a measure of how powerful the filter is, in Watts. 7500 W ~ 10 HP power_rating = 7500 //This also doubles as a measure of how powerful the filter is, in Watts. 7500 W ~ 10 HP
@@ -73,7 +73,7 @@
icon_state += use_power ? "on" : "off" icon_state += use_power ? "on" : "off"
else else
icon_state += "off" icon_state += "off"
use_power = 0 update_use_power(USE_POWER_OFF)
/obj/machinery/atmospherics/trinary/atmos_filter/process() /obj/machinery/atmospherics/trinary/atmos_filter/process()
..() ..()

View File

@@ -8,7 +8,7 @@
name = "Gas mixer" name = "Gas mixer"
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 150 //internal circuitry, friction losses and stuff idle_power_usage = 150 //internal circuitry, friction losses and stuff
power_rating = 3700 //This also doubles as a measure of how powerful the mixer is, in Watts. 3700 W ~ 5 HP power_rating = 3700 //This also doubles as a measure of how powerful the mixer is, in Watts. 3700 W ~ 5 HP
@@ -35,7 +35,7 @@
icon_state += use_power ? "on" : "off" icon_state += use_power ? "on" : "off"
else else
icon_state += "off" icon_state += "off"
use_power = 0 update_use_power(USE_POWER_OFF)
/obj/machinery/atmospherics/trinary/mixer/New() /obj/machinery/atmospherics/trinary/mixer/New()
..() ..()
@@ -114,7 +114,7 @@
/obj/machinery/atmospherics/trinary/mixer/Topic(href,href_list) /obj/machinery/atmospherics/trinary/mixer/Topic(href,href_list)
if(..()) return 1 if(..()) return 1
if(href_list["power"]) if(href_list["power"])
use_power = !use_power update_use_power(!use_power)
if(href_list["set_press"]) if(href_list["set_press"])
var/max_flow_rate = min(air1.volume, air2.volume) 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 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

View File

@@ -1,7 +1,7 @@
/obj/machinery/atmospherics/trinary /obj/machinery/atmospherics/trinary
dir = SOUTH dir = SOUTH
initialize_directions = SOUTH|NORTH|WEST initialize_directions = SOUTH|NORTH|WEST
use_power = 0 use_power = USE_POWER_OFF
pipe_flags = PIPING_DEFAULT_LAYER_ONLY|PIPING_ONE_PER_TURF pipe_flags = PIPING_DEFAULT_LAYER_ONLY|PIPING_ONE_PER_TURF
var/mirrored = FALSE var/mirrored = FALSE

View File

@@ -8,7 +8,7 @@
icon_state = "freezer_0" icon_state = "freezer_0"
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 0 use_power = USE_POWER_OFF
idle_power_usage = 5 // 5 Watts for thermostat related circuitry idle_power_usage = 5 // 5 Watts for thermostat related circuitry
circuit = /obj/item/weapon/circuitboard/unary_atmos/cooler circuit = /obj/item/weapon/circuitboard/unary_atmos/cooler
@@ -99,7 +99,7 @@
if(..()) if(..())
return 1 return 1
if(href_list["toggleStatus"]) if(href_list["toggleStatus"])
use_power = !use_power update_use_power(!use_power)
update_icon() update_icon()
if(href_list["temp"]) if(href_list["temp"])
var/amount = text2num(href_list["temp"]) var/amount = text2num(href_list["temp"])

View File

@@ -8,7 +8,7 @@
icon_state = "heater_0" icon_state = "heater_0"
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 0 use_power = USE_POWER_OFF
idle_power_usage = 5 //5 Watts for thermostat related circuitry idle_power_usage = 5 //5 Watts for thermostat related circuitry
circuit = /obj/item/weapon/circuitboard/unary_atmos/heater circuit = /obj/item/weapon/circuitboard/unary_atmos/heater
@@ -119,7 +119,7 @@
if(..()) if(..())
return 1 return 1
if(href_list["toggleStatus"]) if(href_list["toggleStatus"])
use_power = !use_power update_use_power(!use_power)
update_icon() update_icon()
if(href_list["temp"]) if(href_list["temp"])
var/amount = text2num(href_list["temp"]) var/amount = text2num(href_list["temp"])

View File

@@ -10,7 +10,7 @@
name = "air injector" name = "air injector"
desc = "Passively injects air into its surroundings. Has a valve attached to it that can control flow rate." 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 idle_power_usage = 150 //internal circuitry, friction losses and stuff
power_rating = 15000 //15000 W ~ 20 HP power_rating = 15000 //15000 W ~ 20 HP
@@ -132,10 +132,10 @@
return 0 return 0
if(signal.data["power"]) if(signal.data["power"])
use_power = text2num(signal.data["power"]) update_use_power(text2num(signal.data["power"]))
if(signal.data["power_toggle"]) if(signal.data["power_toggle"])
use_power = !use_power update_use_power(!use_power)
if(signal.data["inject"]) if(signal.data["inject"])
spawn inject() spawn inject()
@@ -160,7 +160,7 @@
/obj/machinery/atmospherics/unary/outlet_injector/attack_hand(mob/user as mob) /obj/machinery/atmospherics/unary/outlet_injector/attack_hand(mob/user as mob)
to_chat(user, "<span class='notice'>You toggle \the [src].</span>") to_chat(user, "<span class='notice'>You toggle \the [src].</span>")
injecting = !injecting injecting = !injecting
use_power = injecting update_use_power(injecting ? USE_POWER_IDLE : USE_POWER_OFF)
update_icon() update_icon()
/obj/machinery/atmospherics/unary/outlet_injector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/machinery/atmospherics/unary/outlet_injector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)

View File

@@ -14,7 +14,7 @@
name = "Air Vent" name = "Air Vent"
desc = "Has a valve and pump attached to it" 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 idle_power_usage = 150 //internal circuitry, friction losses and stuff
power_rating = 30000 //7500 W ~ 10 HP //VOREStation Edit - 30000 W power_rating = 30000 //7500 W ~ 10 HP //VOREStation Edit - 30000 W
@@ -50,18 +50,18 @@
//var/datum/looping_sound/air_pump/soundloop //VOREStation Removal //var/datum/looping_sound/air_pump/soundloop //VOREStation Removal
/obj/machinery/atmospherics/unary/vent_pump/on /obj/machinery/atmospherics/unary/vent_pump/on
use_power = 1 use_power = USE_POWER_IDLE
icon_state = "map_vent_out" icon_state = "map_vent_out"
/obj/machinery/atmospherics/unary/vent_pump/siphon /obj/machinery/atmospherics/unary/vent_pump/siphon
pump_direction = 0 pump_direction = 0
/obj/machinery/atmospherics/unary/vent_pump/siphon/on /obj/machinery/atmospherics/unary/vent_pump/siphon/on
use_power = 1 use_power = USE_POWER_IDLE
icon_state = "map_vent_in" icon_state = "map_vent_in"
/obj/machinery/atmospherics/unary/vent_pump/siphon/on/atmos /obj/machinery/atmospherics/unary/vent_pump/siphon/on/atmos
use_power = 1 use_power = USE_POWER_IDLE
icon_state = "map_vent_in" icon_state = "map_vent_in"
external_pressure_bound = 0 external_pressure_bound = 0
external_pressure_bound_default = 0 external_pressure_bound_default = 0
@@ -189,7 +189,7 @@
return 1 return 1
if (!node) if (!node)
use_power = 0 update_use_power(USE_POWER_OFF)
if(!can_pump()) if(!can_pump())
return 0 return 0
@@ -311,10 +311,10 @@
pump_direction = 1 pump_direction = 1
if(signal.data["power"] != null) if(signal.data["power"] != null)
use_power = text2num(signal.data["power"]) update_use_power(text2num(signal.data["power"]))
if(signal.data["power_toggle"] != null) if(signal.data["power_toggle"] != null)
use_power = !use_power update_use_power(!use_power)
if(signal.data["checks"] != null) if(signal.data["checks"] != null)
if (signal.data["checks"] == "default") if (signal.data["checks"] == "default")

View File

@@ -5,7 +5,7 @@
name = "Air Scrubber" name = "Air Scrubber"
desc = "Has a valve and pump attached to it" 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 idle_power_usage = 150 //internal circuitry, friction losses and stuff
power_rating = 7500 //7500 W ~ 10 HP power_rating = 7500 //7500 W ~ 10 HP
@@ -29,7 +29,7 @@
var/radio_filter_in var/radio_filter_in
/obj/machinery/atmospherics/unary/vent_scrubber/on /obj/machinery/atmospherics/unary/vent_scrubber/on
use_power = 1 use_power = USE_POWER_IDLE
icon_state = "map_scrubber_on" icon_state = "map_scrubber_on"
/obj/machinery/atmospherics/unary/vent_scrubber/New() /obj/machinery/atmospherics/unary/vent_scrubber/New()
@@ -135,7 +135,7 @@
return 1 return 1
if (!node) if (!node)
use_power = 0 update_use_power(USE_POWER_OFF)
//broadcast_status() //broadcast_status()
if(!use_power || (stat & (NOPOWER|BROKEN))) if(!use_power || (stat & (NOPOWER|BROKEN)))
return 0 return 0
@@ -180,21 +180,21 @@
return 0 return 0
if(signal.data["power"] != null) if(signal.data["power"] != null)
use_power = text2num(signal.data["power"]) update_use_power(text2num(signal.data["power"]))
if(signal.data["power_toggle"] != null) 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 if(signal.data["panic_siphon"]) //must be before if("scrubbing" thing
panic = text2num(signal.data["panic_siphon"]) panic = text2num(signal.data["panic_siphon"])
if(panic) if(panic)
use_power = 1 update_use_power(USE_POWER_IDLE)
scrubbing = 0 scrubbing = 0
else else
scrubbing = 1 scrubbing = 1
if(signal.data["toggle_panic_siphon"] != null) if(signal.data["toggle_panic_siphon"] != null)
panic = !panic panic = !panic
if(panic) if(panic)
use_power = 1 update_use_power(USE_POWER_IDLE)
scrubbing = 0 scrubbing = 0
else else
scrubbing = 1 scrubbing = 1

View File

@@ -9,7 +9,7 @@
var/leaking = FALSE // Do not set directly, use set_leaking(TRUE/FALSE) var/leaking = FALSE // Do not set directly, use set_leaking(TRUE/FALSE)
layer = PIPES_LAYER layer = PIPES_LAYER
use_power = 0 use_power = USE_POWER_OFF
pipe_flags = 0 // Does not have PIPING_DEFAULT_LAYER_ONLY flag. pipe_flags = 0 // Does not have PIPING_DEFAULT_LAYER_ONLY flag.

View File

@@ -46,7 +46,7 @@
icon_state = "scanner_0" icon_state = "scanner_0"
density = 1 density = 1
anchored = 1.0 anchored = 1.0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 50 idle_power_usage = 50
active_power_usage = 300 active_power_usage = 300
interact_offline = 1 interact_offline = 1
@@ -260,7 +260,7 @@
var/obj/item/weapon/disk/data/disk = null var/obj/item/weapon/disk/data/disk = null
var/selected_menu_key = null var/selected_menu_key = null
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 10 idle_power_usage = 10
active_power_usage = 400 active_power_usage = 400
var/waiting_for_user_input=0 // Fix for #274 (Mash create block injector without answering dialog to make unlimited injectors) - N3X var/waiting_for_user_input=0 // Fix for #274 (Mash create block injector without answering dialog to make unlimited injectors) - N3X

View File

@@ -6,7 +6,7 @@
level = 1 // underfloor level = 1 // underfloor
layer = UNDER_JUNK_LAYER layer = UNDER_JUNK_LAYER
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 0 idle_power_usage = 0
var/obj/item/device/radio/beacon/Beacon var/obj/item/device/radio/beacon/Beacon

View File

@@ -5,7 +5,7 @@
icon_state = "table2-idle" icon_state = "table2-idle"
density = 1 density = 1
anchored = 1.0 anchored = 1.0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 1 idle_power_usage = 1
active_power_usage = 5 active_power_usage = 5
surgery_odds = 100 surgery_odds = 100

View File

@@ -7,7 +7,7 @@
anchored = 1 //About time someone fixed this. anchored = 1 //About time someone fixed this.
density = 1 //VOREStation Edit - Big console density = 1 //VOREStation Edit - Big console
dir = 8 dir = 8
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 40 idle_power_usage = 40
interact_offline = 1 interact_offline = 1
circuit = /obj/item/weapon/circuitboard/sleeper_console circuit = /obj/item/weapon/circuitboard/sleeper_console
@@ -179,7 +179,7 @@
var/stasis_level = 0 //Every 'this' life ticks are applied to the mob (when life_ticks%stasis_level == 1) var/stasis_level = 0 //Every 'this' life ticks are applied to the mob (when life_ticks%stasis_level == 1)
var/stasis_choices = list("Complete (1%)" = 100, "Deep (10%)" = 10, "Moderate (20%)" = 5, "Light (50%)" = 2, "None (100%)" = 0) var/stasis_choices = list("Complete (1%)" = 100, "Deep (10%)" = 10, "Moderate (20%)" = 5, "Light (50%)" = 2, "None (100%)" = 0)
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 15 idle_power_usage = 15
active_power_usage = 200 //builtin health analyzer, dialysis machine, injectors. active_power_usage = 200 //builtin health analyzer, dialysis machine, injectors.
@@ -388,7 +388,7 @@
M.client.perspective = EYE_PERSPECTIVE M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src M.client.eye = src
M.loc = src M.loc = src
update_use_power(2) update_use_power(USE_POWER_ACTIVE)
occupant = M occupant = M
update_icon() update_icon()
@@ -408,7 +408,7 @@
if(A in component_parts) if(A in component_parts)
continue continue
A.loc = src.loc A.loc = src.loc
update_use_power(1) update_use_power(USE_POWER_IDLE)
update_icon() update_icon()
toggle_filter() toggle_filter()
toggle_pump() toggle_pump()

View File

@@ -9,7 +9,7 @@
density = 1 density = 1
anchored = 1 anchored = 1
circuit = /obj/item/weapon/circuitboard/body_scanner circuit = /obj/item/weapon/circuitboard/body_scanner
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 60 idle_power_usage = 60
active_power_usage = 10000 //10 kW. It's a big all-body scanner. active_power_usage = 10000 //10 kW. It's a big all-body scanner.
light_color = "#00FF00" light_color = "#00FF00"

View File

@@ -3,7 +3,7 @@
icon = 'icons/obj/device.dmi' icon = 'icons/obj/device.dmi'
icon_state = "liquid_dispenser" icon_state = "liquid_dispenser"
anchored = 1.0 anchored = 1.0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 10 idle_power_usage = 10
var/uses = 20 var/uses = 20
var/disabled = 1 var/disabled = 1

File diff suppressed because it is too large Load Diff

View File

@@ -18,7 +18,7 @@
pressure_resistance = 7 * ONE_ATMOSPHERE pressure_resistance = 7 * ONE_ATMOSPHERE
var/temperature_resistance = 1000 + T0C var/temperature_resistance = 1000 + T0C
volume = 1000 volume = 1000
use_power = 0 use_power = USE_POWER_OFF
interact_offline = 1 // Allows this to be used when not in powered area. interact_offline = 1 // Allows this to be used when not in powered area.
var/release_log = "" var/release_log = ""
var/update_flag = 0 var/update_flag = 0

View File

@@ -9,7 +9,7 @@
power_channel = ENVIRON power_channel = ENVIRON
var/frequency = 0 var/frequency = 0
var/id var/id
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 15 idle_power_usage = 15
/obj/machinery/meter/Initialize() /obj/machinery/meter/Initialize()

View File

@@ -1,6 +1,6 @@
/obj/machinery/portable_atmospherics /obj/machinery/portable_atmospherics
name = "atmoalter" name = "atmoalter"
use_power = 0 use_power = USE_POWER_OFF
layer = OBJ_LAYER // These are mobile, best not be under everything. layer = OBJ_LAYER // These are mobile, best not be under everything.
var/datum/gas_mixture/air_contents = new var/datum/gas_mixture/air_contents = new

View File

@@ -152,10 +152,16 @@
volume = 500000 volume = 500000
volume_rate = 7000 volume_rate = 7000
<<<<<<< HEAD
use_power = 1 use_power = 1
idle_power_usage = 50 //internal circuitry, friction losses and stuff idle_power_usage = 50 //internal circuitry, friction losses and stuff
active_power_usage = 1000 // Blowers running active_power_usage = 1000 // Blowers running
power_rating = 100000 //100 kW ~ 135 HP power_rating = 100000 //100 kW ~ 135 HP
=======
use_power = USE_POWER_IDLE
idle_power_usage = 500 //internal circuitry, friction losses and stuff
active_power_usage = 100000 //100 kW ~ 135 HP
>>>>>>> 95ac99c... Merge pull request #6882 from VOREStation/vplk-machinery-use-power
var/global/gid = 1 var/global/gid = 1
var/id = 0 var/id = 0

View File

@@ -5,7 +5,7 @@
icon_state = "autolathe" icon_state = "autolathe"
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 10 idle_power_usage = 10
active_power_usage = 2000 active_power_usage = 2000
clicksound = "keyboard" clicksound = "keyboard"
@@ -247,7 +247,7 @@
return return
busy = 1 busy = 1
update_use_power(2) update_use_power(USE_POWER_ACTIVE)
//Check if we still have the materials. //Check if we still have the materials.
var/coeff = (making.no_scale ? 1 : mat_efficiency) //stacks are unaffected by production coefficient var/coeff = (making.no_scale ? 1 : mat_efficiency) //stacks are unaffected by production coefficient
@@ -266,7 +266,7 @@
sleep(build_time) sleep(build_time)
busy = 0 busy = 0
update_use_power(1) update_use_power(USE_POWER_IDLE)
update_icon() // So lid opens update_icon() // So lid opens
//Sanity check. //Sanity check.

View File

@@ -6,7 +6,7 @@
density = 1 density = 1
anchored = 1 anchored = 1
circuit = /obj/item/weapon/circuitboard/biogenerator circuit = /obj/item/weapon/circuitboard/biogenerator
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 40 idle_power_usage = 40
var/processing = 0 var/processing = 0
var/obj/item/weapon/reagent_containers/glass/beaker = null var/obj/item/weapon/reagent_containers/glass/beaker = null

View File

@@ -9,7 +9,7 @@
anchored = 1 anchored = 1
density = 1 density = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 40 idle_power_usage = 40
active_power_usage = 300 active_power_usage = 300
@@ -161,7 +161,7 @@
container.reagents.remove_reagent("biomass", possible_list[choice][2]) container.reagents.remove_reagent("biomass", possible_list[choice][2])
use_power = 2 use_power = USE_POWER_ACTIVE
printing = 1 printing = 1
update_icon() update_icon()
@@ -169,7 +169,7 @@
sleep(print_delay) sleep(print_delay)
use_power = 1 use_power = USE_POWER_IDLE
printing = 0 printing = 0
update_icon() update_icon()

View File

@@ -8,7 +8,7 @@
var/id = null var/id = null
var/active = 0 var/active = 0
anchored = 1.0 anchored = 1.0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 2 idle_power_usage = 2
active_power_usage = 4 active_power_usage = 4

View File

@@ -3,7 +3,7 @@
desc = "It's used to monitor rooms." desc = "It's used to monitor rooms."
icon = 'icons/obj/monitors_vr.dmi' //VOREStation Edit - New Icons icon = 'icons/obj/monitors_vr.dmi' //VOREStation Edit - New Icons
icon_state = "camera" icon_state = "camera"
use_power = 2 use_power = USE_POWER_ACTIVE
idle_power_usage = 5 idle_power_usage = 5
active_power_usage = 10 active_power_usage = 10
plane = MOB_PLANE plane = MOB_PLANE

View File

@@ -4,7 +4,7 @@
icon = 'icons/obj/power.dmi' icon = 'icons/obj/power.dmi'
icon_state = "ccharger0" icon_state = "ccharger0"
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 5 idle_power_usage = 5
active_power_usage = 60000 //60 kW. (this the power drawn when charging) active_power_usage = 60000 //60 kW. (this the power drawn when charging)
var/efficiency = 60000 //will provide the modified power rate when upgraded var/efficiency = 60000 //will provide the modified power rate when upgraded
@@ -118,16 +118,16 @@
/obj/machinery/cell_charger/process() /obj/machinery/cell_charger/process()
//to_world("ccpt [charging] [stat]") //to_world("ccpt [charging] [stat]")
if((stat & (BROKEN|NOPOWER)) || !anchored) if((stat & (BROKEN|NOPOWER)) || !anchored)
update_use_power(0) update_use_power(USE_POWER_OFF)
return return
if(charging && !charging.fully_charged()) if(charging && !charging.fully_charged())
charging.give(efficiency*CELLRATE) charging.give(efficiency*CELLRATE)
update_use_power(2) update_use_power(USE_POWER_ACTIVE)
update_icon() update_icon()
else else
update_use_power(1) update_use_power(USE_POWER_IDLE)
/obj/machinery/cell_charger/RefreshParts() /obj/machinery/cell_charger/RefreshParts()
var/E = 0 var/E = 0

View File

@@ -170,7 +170,7 @@
src.current_camera = C src.current_camera = C
if(current_camera) if(current_camera)
current_camera.camera_computers_using_this.Add(src) current_camera.camera_computers_using_this.Add(src)
use_power = 2 update_use_power(USE_POWER_ACTIVE)
var/mob/living/L = current_camera.loc var/mob/living/L = current_camera.loc
if(istype(L)) if(istype(L))
L.tracking_initiated() L.tracking_initiated()
@@ -182,7 +182,7 @@
if(istype(L)) if(istype(L))
L.tracking_cancelled() L.tracking_cancelled()
current_camera = null current_camera = null
use_power = 1 use_power = USE_POWER_IDLE
//Camera control: mouse. //Camera control: mouse.
/atom/DblClick() /atom/DblClick()

View File

@@ -4,7 +4,7 @@
icon_state = "computer" icon_state = "computer"
density = 1 density = 1
anchored = 1.0 anchored = 1.0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 300 idle_power_usage = 300
active_power_usage = 300 active_power_usage = 300
var/processing = 0 var/processing = 0

View File

@@ -4,7 +4,7 @@
icon_keyboard = "med_key" icon_keyboard = "med_key"
icon_screen = "crew" icon_screen = "crew"
light_color = "#315ab4" light_color = "#315ab4"
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 250 idle_power_usage = 250
active_power_usage = 500 active_power_usage = 500
circuit = /obj/item/weapon/circuitboard/crew circuit = /obj/item/weapon/circuitboard/crew

View File

@@ -7,7 +7,7 @@
icon_state = "box_0" icon_state = "box_0"
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 0 use_power = USE_POWER_OFF
var/obj/item/weapon/circuitboard/circuit = null var/obj/item/weapon/circuitboard/circuit = null
var/list/components = null var/list/components = null
var/list/req_components = null var/list/req_components = null

View File

@@ -11,7 +11,7 @@
interact_offline = 1 interact_offline = 1
var/on = 0 var/on = 0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 20 idle_power_usage = 20
active_power_usage = 200 active_power_usage = 200
buckle_lying = FALSE buckle_lying = FALSE
@@ -291,7 +291,7 @@
unbuckle_mob(occupant, force = TRUE) unbuckle_mob(occupant, force = TRUE)
occupant = null occupant = null
current_heat_capacity = initial(current_heat_capacity) current_heat_capacity = initial(current_heat_capacity)
update_use_power(1) update_use_power(USE_POWER_IDLE)
return return
/obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/carbon/M as mob) /obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/carbon/M as mob)
if(stat & (NOPOWER|BROKEN)) if(stat & (NOPOWER|BROKEN))
@@ -322,7 +322,7 @@
vis_contents |= occupant vis_contents |= occupant
occupant.pixel_y += 19 occupant.pixel_y += 19
current_heat_capacity = HEAT_CAPACITY_HUMAN current_heat_capacity = HEAT_CAPACITY_HUMAN
update_use_power(2) update_use_power(USE_POWER_ACTIVE)
// M.metabslow = 1 // M.metabslow = 1
add_fingerprint(usr) add_fingerprint(usr)
update_icon() update_icon()

View File

@@ -14,7 +14,7 @@
*/ */
anchored = 1.0 anchored = 1.0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 2 idle_power_usage = 2
active_power_usage = 4 active_power_usage = 4

View File

@@ -38,7 +38,7 @@
var/hatch_open = 0 var/hatch_open = 0
power_channel = ENVIRON power_channel = ENVIRON
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 5 idle_power_usage = 5
var/list/tile_info[4] var/list/tile_info[4]

View File

@@ -9,7 +9,7 @@
maxhealth = 150 //If you change this, consiter changing ../door/window/brigdoor/ health at the bottom of this .dm file maxhealth = 150 //If you change this, consiter changing ../door/window/brigdoor/ health at the bottom of this .dm file
health = 150 health = 150
visible = 0.0 visible = 0.0
use_power = 0 use_power = USE_POWER_OFF
flags = ON_BORDER flags = ON_BORDER
opacity = 0 opacity = 0
var/obj/item/weapon/airlock_electronics/electronics = null var/obj/item/weapon/airlock_electronics/electronics = null

View File

@@ -1,7 +1,7 @@
/obj/machinery/embedded_controller /obj/machinery/embedded_controller
name = "Embedded Controller" name = "Embedded Controller"
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 10 idle_power_usage = 10
var/datum/computer/file/embedded_program/program //the currently executing program var/datum/computer/file/embedded_program/program //the currently executing program
var/on = 1 var/on = 1

View File

@@ -11,7 +11,7 @@
var/strength = 10 //How weakened targets are when flashed. var/strength = 10 //How weakened targets are when flashed.
var/base_state = "mflash" var/base_state = "mflash"
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 2 idle_power_usage = 2
flags = PROXMOVE flags = PROXMOVE

View File

@@ -7,7 +7,7 @@ var/list/floor_light_cache = list()
desc = "A backlit floor panel." desc = "A backlit floor panel."
layer = TURF_LAYER+0.001 layer = TURF_LAYER+0.001
anchored = 0 anchored = 0
use_power = 2 use_power = USE_POWER_ACTIVE
idle_power_usage = 2 idle_power_usage = 2
active_power_usage = 20 active_power_usage = 20
power_channel = LIGHT power_channel = LIGHT
@@ -72,8 +72,13 @@ var/list/floor_light_cache = list()
return return
on = !on on = !on
<<<<<<< HEAD
if(on) use_power = 2 if(on) use_power = 2
//visible_message("<span class='notice'>\The [user] turns \the [src] [on ? "on" : "off"].</span>") //VOREStation Edit - No thankouuuu. Too spammy. //visible_message("<span class='notice'>\The [user] turns \the [src] [on ? "on" : "off"].</span>") //VOREStation Edit - No thankouuuu. Too spammy.
=======
if(on) update_use_power(USE_POWER_ACTIVE)
visible_message("<span class='notice'>\The [user] turns \the [src] [on ? "on" : "off"].</span>")
>>>>>>> 95ac99c... Merge pull request #6882 from VOREStation/vplk-machinery-use-power
update_brightness() update_brightness()
return return
@@ -81,21 +86,21 @@ var/list/floor_light_cache = list()
..() ..()
var/need_update var/need_update
if((!anchored || broken()) && on) if((!anchored || broken()) && on)
use_power = 0 update_use_power(USE_POWER_OFF)
on = 0 on = 0
need_update = 1 need_update = 1
else if(use_power && !on) else if(use_power && !on)
use_power = 0 update_use_power(USE_POWER_OFF)
need_update = 1 need_update = 1
if(need_update) if(need_update)
update_brightness() update_brightness()
/obj/machinery/floor_light/proc/update_brightness() /obj/machinery/floor_light/proc/update_brightness()
if(on && use_power == 2) if(on && use_power == USE_POWER_ACTIVE)
if(light_range != default_light_range || light_power != default_light_power || light_color != default_light_colour) if(light_range != default_light_range || light_power != default_light_power || light_color != default_light_colour)
set_light(default_light_range, default_light_power, default_light_colour) set_light(default_light_range, default_light_power, default_light_colour)
else else
use_power = 0 update_use_power(USE_POWER_OFF)
if(light_range || light_power) if(light_range || light_power)
set_light(0) set_light(0)

View File

@@ -39,7 +39,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED
layer = ABOVE_TURF_LAYER layer = ABOVE_TURF_LAYER
var/power_per_hologram = 500 //per usage per hologram var/power_per_hologram = 500 //per usage per hologram
idle_power_usage = 5 idle_power_usage = 5
use_power = 1 use_power = USE_POWER_IDLE
var/list/mob/living/silicon/ai/masters = new() //List of AIs that use the holopad var/list/mob/living/silicon/ai/masters = new() //List of AIs that use the holopad
var/last_request = 0 //to prevent request spam. ~Carn var/last_request = 0 //to prevent request spam. ~Carn
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating. var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
@@ -196,7 +196,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
/obj/machinery/hologram /obj/machinery/hologram
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 5 idle_power_usage = 5
active_power_usage = 100 active_power_usage = 100

View File

@@ -5,7 +5,7 @@
icon = 'icons/obj/holosign.dmi' icon = 'icons/obj/holosign.dmi'
icon_state = "sign_off" icon_state = "sign_off"
plane = MOB_PLANE plane = MOB_PLANE
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 2 idle_power_usage = 2
active_power_usage = 4 active_power_usage = 4
anchored = 1 anchored = 1
@@ -19,7 +19,7 @@
if(stat & (BROKEN|NOPOWER)) if(stat & (BROKEN|NOPOWER))
return return
lit = !lit lit = !lit
use_power = lit ? 2 : 1 update_use_power(lit ? USE_POWER_ACTIVE : USE_POWER_IDLE)
update_icon() update_icon()
/obj/machinery/holosign/update_icon() /obj/machinery/holosign/update_icon()
@@ -34,7 +34,7 @@
..() ..()
if(stat & NOPOWER) if(stat & NOPOWER)
lit = 0 lit = 0
use_power = 0 update_use_power(USE_POWER_OFF)
update_icon() update_icon()

View File

@@ -6,7 +6,7 @@
var/id = null var/id = null
var/on = 1.0 var/on = 1.0
anchored = 1.0 anchored = 1.0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 2 idle_power_usage = 2
active_power_usage = 4 active_power_usage = 4
@@ -53,7 +53,7 @@
var/last_spark = 0 var/last_spark = 0
var/base_state = "migniter" var/base_state = "migniter"
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 2 idle_power_usage = 2
active_power_usage = 4 active_power_usage = 4

View File

@@ -17,7 +17,7 @@
anchored = 1 anchored = 1
density = 1 density = 1
power_channel = EQUIP power_channel = EQUIP
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 10 idle_power_usage = 10
active_power_usage = 100 active_power_usage = 100
circuit = /obj/item/weapon/circuitboard/jukebox circuit = /obj/item/weapon/circuitboard/jukebox
@@ -321,7 +321,7 @@
/obj/machinery/media/jukebox/proc/StopPlaying() /obj/machinery/media/jukebox/proc/StopPlaying()
playing = 0 playing = 0
update_use_power(1) update_use_power(USE_POWER_IDLE)
update_icon() update_icon()
start_stop_song() start_stop_song()
@@ -329,7 +329,7 @@
if(!current_track) if(!current_track)
return return
playing = 1 playing = 1
update_use_power(2) update_use_power(USE_POWER_ACTIVE)
update_icon() update_icon()
start_stop_song() start_stop_song()
updateDialog() updateDialog()

View File

@@ -7,7 +7,7 @@
icon = 'icons/obj/power_vr.dmi' // VOREStation Edit icon = 'icons/obj/power_vr.dmi' // VOREStation Edit
icon_state = "light1" icon_state = "light1"
anchored = 1.0 anchored = 1.0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 10 idle_power_usage = 10
power_channel = LIGHT power_channel = LIGHT
var/on = 1 var/on = 1

View File

@@ -101,7 +101,7 @@ Class Procs:
var/stat = 0 var/stat = 0
var/emagged = 0 var/emagged = 0
var/use_power = 1 var/use_power = USE_POWER_IDLE
//0 = dont run the auto //0 = dont run the auto
//1 = run auto, use idle //1 = run auto, use idle
//2 = run auto, use active //2 = run auto, use active
@@ -199,9 +199,9 @@ Class Procs:
/obj/machinery/proc/auto_use_power() /obj/machinery/proc/auto_use_power()
if(!powered(power_channel)) if(!powered(power_channel))
return 0 return 0
if(use_power == 1) if(use_power == USE_POWER_IDLE)
use_power(idle_power_usage, power_channel, 1) use_power(idle_power_usage, power_channel, 1)
else if(use_power >= 2) else if(use_power >= USE_POWER_ACTIVE)
use_power(active_power_usage, power_channel, 1) use_power(active_power_usage, power_channel, 1)
return 1 return 1

View File

@@ -11,7 +11,7 @@
desc = "A device that uses station power to create points of magnetic energy." desc = "A device that uses station power to create points of magnetic energy."
plane = PLATING_PLANE plane = PLATING_PLANE
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 50 idle_power_usage = 50
var/freq = 1449 // radio frequency var/freq = 1449 // radio frequency
@@ -142,10 +142,10 @@
// Update power usage: // Update power usage:
if(on) if(on)
use_power = 2 update_use_power(USE_POWER_ACTIVE)
active_power_usage = electricity_level*15 active_power_usage = electricity_level*15
else else
use_power = 0 update_use_power(USE_POWER_OFF)
// Overload conditions: // Overload conditions:
/* // Eeeehhh kinda stupid /* // Eeeehhh kinda stupid
@@ -190,7 +190,7 @@
icon_state = "airlock_control_standby" icon_state = "airlock_control_standby"
density = 1 density = 1
anchored = 1.0 anchored = 1.0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 45 idle_power_usage = 45
var/frequency = 1449 var/frequency = 1449
var/code = 0 var/code = 0

View File

@@ -6,7 +6,7 @@
icon = 'icons/obj/stationobjs.dmi' icon = 'icons/obj/stationobjs.dmi'
icon_state = "mass_driver" icon_state = "mass_driver"
anchored = 1.0 anchored = 1.0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 2 idle_power_usage = 2
active_power_usage = 50 active_power_usage = 50
circuit = /obj/item/weapon/circuitboard/mass_driver circuit = /obj/item/weapon/circuitboard/mass_driver

View File

@@ -5,7 +5,7 @@
icon = 'icons/obj/neonsigns.dmi' icon = 'icons/obj/neonsigns.dmi'
icon_state = "sign_off" icon_state = "sign_off"
plane = MOB_PLANE plane = MOB_PLANE
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 2 idle_power_usage = 2
active_power_usage = 4 active_power_usage = 4
anchored = 1 anchored = 1
@@ -19,7 +19,7 @@
if(stat & (BROKEN|NOPOWER)) if(stat & (BROKEN|NOPOWER))
return return
lit = !lit lit = !lit
use_power = lit ? 2 : 1 update_use_power(lit ? USE_POWER_ACTIVE : USE_POWER_IDLE)
update_icon() update_icon()
/obj/machinery/neonsign/update_icon() /obj/machinery/neonsign/update_icon()
@@ -34,7 +34,7 @@
..() ..()
if(stat & NOPOWER) if(stat & NOPOWER)
lit = 0 lit = 0
use_power = 0 update_use_power(USE_POWER_OFF)
update_icon() update_icon()

View File

@@ -23,7 +23,7 @@ var/bomb_set
var/timing_wire var/timing_wire
var/removal_stage = 0 // 0 is no removal, 1 is covers removed, 2 is covers open, var/removal_stage = 0 // 0 is no removal, 1 is covers removed, 2 is covers open,
// 3 is sealant open, 4 is unwrenched, 5 is removed from bolts. // 3 is sealant open, 4 is unwrenched, 5 is removed from bolts.
use_power = 0 use_power = USE_POWER_OFF
/obj/machinery/nuclearbomb/New() /obj/machinery/nuclearbomb/New()
..() ..()

View File

@@ -73,7 +73,7 @@
if(breather.internals) if(breather.internals)
breather.internals.icon_state = "internal0" breather.internals.icon_state = "internal0"
breather = null breather = null
use_power = 1 update_use_power(USE_POWER_IDLE)
/obj/machinery/oxygen_pump/attack_ai(mob/user as mob) /obj/machinery/oxygen_pump/attack_ai(mob/user as mob)
ui_interact(user) ui_interact(user)
@@ -90,7 +90,7 @@
breather.internal = tank breather.internal = tank
if(breather.internals) if(breather.internals)
breather.internals.icon_state = "internal1" breather.internals.icon_state = "internal1"
use_power = 2 update_use_power(USE_POWER_ACTIVE)
/obj/machinery/oxygen_pump/proc/can_apply_to_target(var/mob/living/carbon/human/target, mob/user as mob) /obj/machinery/oxygen_pump/proc/can_apply_to_target(var/mob/living/carbon/human/target, mob/user as mob)
if(!user) if(!user)
@@ -162,7 +162,7 @@
contained.forceMove(src) contained.forceMove(src)
src.visible_message("<span class='notice'>\The [contained] rapidly retracts back into \the [src]!</span>") src.visible_message("<span class='notice'>\The [contained] rapidly retracts back into \the [src]!</span>")
breather = null breather = null
use_power = 1 update_use_power(USE_POWER_IDLE)
else if(!breather.internal && tank) else if(!breather.internal && tank)
breather.internal = tank breather.internal = tank
if(breather.internals) if(breather.internals)
@@ -287,7 +287,7 @@
contained.forceMove(src) contained.forceMove(src)
src.visible_message("<span class='notice'>\The [contained] rapidly retracts back into \the [src]!</span>") src.visible_message("<span class='notice'>\The [contained] rapidly retracts back into \the [src]!</span>")
breather = null breather = null
use_power = 1 update_use_power(USE_POWER_IDLE)
else if(!breather.internal && tank) else if(!breather.internal && tank)
breather.internal = tank breather.internal = tank
if(breather.internals) if(breather.internals)

View File

@@ -6,7 +6,7 @@
density = 1 density = 1
anchored = 1 anchored = 1
circuit = /obj/item/weapon/circuitboard/telecomms/pda_multicaster circuit = /obj/item/weapon/circuitboard/telecomms/pda_multicaster
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 750 idle_power_usage = 750
var/on = 1 // If we're currently active, var/on = 1 // If we're currently active,
var/toggle = 1 // If we /should/ be active or not, var/toggle = 1 // If we /should/ be active or not,

View File

@@ -5,7 +5,7 @@
icon = 'icons/obj/stationobjs_vr.dmi' //VOREStation Edit icon = 'icons/obj/stationobjs_vr.dmi' //VOREStation Edit
icon_state = "recharger0" icon_state = "recharger0"
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 4 idle_power_usage = 4
active_power_usage = 40000 //40 kW active_power_usage = 40000 //40 kW
var/efficiency = 40000 //will provide the modified power rate when upgraded var/efficiency = 40000 //will provide the modified power rate when upgraded
@@ -117,12 +117,12 @@
/obj/machinery/recharger/process() /obj/machinery/recharger/process()
if(stat & (NOPOWER|BROKEN) || !anchored) if(stat & (NOPOWER|BROKEN) || !anchored)
update_use_power(0) update_use_power(USE_POWER_OFF)
icon_state = icon_state_idle icon_state = icon_state_idle
return return
if(!charging) if(!charging)
update_use_power(1) update_use_power(USE_POWER_IDLE)
icon_state = icon_state_idle icon_state = icon_state_idle
else else
var/obj/item/weapon/cell/C = charging.get_cell() var/obj/item/weapon/cell/C = charging.get_cell()
@@ -130,10 +130,10 @@
if(!C.fully_charged()) if(!C.fully_charged())
icon_state = icon_state_charging icon_state = icon_state_charging
C.give(CELLRATE*efficiency) C.give(CELLRATE*efficiency)
update_use_power(2) update_use_power(USE_POWER_ACTIVE)
else else
icon_state = icon_state_charged icon_state = icon_state_charged
update_use_power(1) update_use_power(USE_POWER_IDLE)
//VOREStation Add - NSFW Batteries //VOREStation Add - NSFW Batteries
else if(istype(charging, /obj/item/ammo_casing/microbattery)) else if(istype(charging, /obj/item/ammo_casing/microbattery))

View File

@@ -6,7 +6,7 @@
density = 1 density = 1
anchored = 1 anchored = 1
circuit = /obj/item/weapon/circuitboard/recharge_station circuit = /obj/item/weapon/circuitboard/recharge_station
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 50 idle_power_usage = 50
var/mob/occupant = null var/mob/occupant = null
var/obj/item/weapon/cell/cell = null var/obj/item/weapon/cell/cell = null
@@ -78,9 +78,9 @@
if(!has_cell_power()) if(!has_cell_power())
return 0 return 0
if(use_power == 1) if(use_power == USE_POWER_IDLE)
cell.use(idle_power_usage * CELLRATE) cell.use(idle_power_usage * CELLRATE)
else if(use_power >= 2) else if(use_power >= USE_POWER_ACTIVE)
cell.use(active_power_usage * CELLRATE) cell.use(active_power_usage * CELLRATE)
return 1 return 1

View File

@@ -7,7 +7,7 @@
var/metal_amount = 0 var/metal_amount = 0
var/operating = 0 var/operating = 0
var/obj/item/robot_parts/being_built = null var/obj/item/robot_parts/being_built = null
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 40 idle_power_usage = 40
active_power_usage = 10000 active_power_usage = 10000
@@ -115,7 +115,7 @@ Please wait until completion...</TT><BR>
if(!isnull(building)) if(!isnull(building))
if(metal_amount >= build_cost) if(metal_amount >= build_cost)
operating = 1 operating = 1
update_use_power(2) update_use_power(USE_POWER_ACTIVE)
metal_amount = max(0, metal_amount - build_cost) metal_amount = max(0, metal_amount - build_cost)
@@ -128,7 +128,7 @@ Please wait until completion...</TT><BR>
if(!isnull(being_built)) if(!isnull(being_built))
being_built.loc = get_turf(src) being_built.loc = get_turf(src)
being_built = null being_built = null
update_use_power(1) update_use_power(USE_POWER_IDLE)
operating = 0 operating = 0
overlays -= "fab-active" overlays -= "fab-active"
return return

View File

@@ -17,7 +17,7 @@
name = "status display" name = "status display"
anchored = 1 anchored = 1
density = 0 density = 0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 10 idle_power_usage = 10
circuit = /obj/item/weapon/circuitboard/status_display circuit = /obj/item/weapon/circuitboard/status_display
var/mode = 1 // 0 = Blank var/mode = 1 // 0 = Blank

View File

@@ -58,7 +58,7 @@
/obj/machinery/power/supply_beacon/attack_hand(var/mob/user) /obj/machinery/power/supply_beacon/attack_hand(var/mob/user)
if(expended) if(expended)
use_power = 0 update_use_power(USE_POWER_OFF)
to_chat (user, "<span class='warning'>\The [src] has used up its charge.</span>") to_chat (user, "<span class='warning'>\The [src] has used up its charge.</span>")
return return
@@ -80,7 +80,7 @@
return return
set_light(3, 3, "#00CCAA") set_light(3, 3, "#00CCAA")
icon_state = "beacon_active" icon_state = "beacon_active"
use_power = 1 use_power = USE_POWER_IDLE
if(user) to_chat(user, "<span class='notice'>You activate the beacon. The supply drop will be dispatched soon.</span>") if(user) to_chat(user, "<span class='notice'>You activate the beacon. The supply drop will be dispatched soon.</span>")
/obj/machinery/power/supply_beacon/proc/deactivate(var/mob/user, var/permanent) /obj/machinery/power/supply_beacon/proc/deactivate(var/mob/user, var/permanent)
@@ -90,7 +90,7 @@
else else
icon_state = "beacon" icon_state = "beacon"
set_light(0) set_light(0)
use_power = 0 use_power = USE_POWER_OFF
target_drop_time = null target_drop_time = null
if(user) to_chat(user, "<span class='notice'>You deactivate the beacon.</span>") if(user) to_chat(user, "<span class='notice'>You deactivate the beacon.</span>")

View File

@@ -17,7 +17,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
desc = "A dish-shaped machine used to broadcast processed subspace signals." desc = "A dish-shaped machine used to broadcast processed subspace signals."
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 25 idle_power_usage = 25
machinetype = 5 machinetype = 5
produces_heat = 0 produces_heat = 0
@@ -127,7 +127,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
desc = "A compact machine used for portable subspace telecommuniations processing." desc = "A compact machine used for portable subspace telecommuniations processing."
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 0 use_power = USE_POWER_OFF
idle_power_usage = 0 idle_power_usage = 0
machinetype = 6 machinetype = 6
produces_heat = 0 produces_heat = 0

View File

@@ -251,7 +251,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
desc = "This machine has a dish-like shape and green lights. It is designed to detect and process subspace radio activity." desc = "This machine has a dish-like shape and green lights. It is designed to detect and process subspace radio activity."
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 600 idle_power_usage = 600
machinetype = 1 machinetype = 1
produces_heat = 0 produces_heat = 0
@@ -318,7 +318,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
desc = "A mighty piece of hardware used to send/receive massive amounts of data." desc = "A mighty piece of hardware used to send/receive massive amounts of data."
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 1600 idle_power_usage = 1600
machinetype = 7 machinetype = 7
circuit = /obj/item/weapon/circuitboard/telecomms/hub circuit = /obj/item/weapon/circuitboard/telecomms/hub
@@ -377,7 +377,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
desc = "A mighty piece of hardware used to send massive amounts of data far away." desc = "A mighty piece of hardware used to send massive amounts of data far away."
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 600 idle_power_usage = 600
machinetype = 8 machinetype = 8
produces_heat = 0 produces_heat = 0
@@ -443,7 +443,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
desc = "A mighty piece of hardware used to send massive amounts of data quickly." desc = "A mighty piece of hardware used to send massive amounts of data quickly."
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 1000 idle_power_usage = 1000
machinetype = 2 machinetype = 2
circuit = /obj/item/weapon/circuitboard/telecomms/bus circuit = /obj/item/weapon/circuitboard/telecomms/bus
@@ -504,7 +504,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
desc = "This machine is used to process large quantities of information." desc = "This machine is used to process large quantities of information."
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 600 idle_power_usage = 600
machinetype = 3 machinetype = 3
delay = 5 delay = 5
@@ -556,7 +556,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
desc = "A machine used to store data and network statistics." desc = "A machine used to store data and network statistics."
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 300 idle_power_usage = 300
machinetype = 4 machinetype = 4
circuit = /obj/item/weapon/circuitboard/telecomms/server circuit = /obj/item/weapon/circuitboard/telecomms/server

View File

@@ -171,7 +171,7 @@
icon_state = "tele0" icon_state = "tele0"
dir = 4 dir = 4
var/accurate = 0 var/accurate = 0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 10 idle_power_usage = 10
active_power_usage = 2000 active_power_usage = 2000
circuit = /obj/item/weapon/circuitboard/teleporter_hub circuit = /obj/item/weapon/circuitboard/teleporter_hub
@@ -327,7 +327,7 @@
dir = 4 dir = 4
var/active = 0 var/active = 0
var/engaged = 0 var/engaged = 0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 10 idle_power_usage = 10
active_power_usage = 2000 active_power_usage = 2000
circuit = /obj/item/weapon/circuitboard/teleporter_station circuit = /obj/item/weapon/circuitboard/teleporter_station
@@ -364,8 +364,8 @@
if(com) if(com)
com.icon_state = "tele1" com.icon_state = "tele1"
use_power(5000) use_power(5000)
update_use_power(2) update_use_power(USE_POWER_ACTIVE)
com.update_use_power(2) com.update_use_power(USE_POWER_ACTIVE)
for(var/mob/O in hearers(src, null)) for(var/mob/O in hearers(src, null))
O.show_message("<span class='notice'>Teleporter engaged!</span>", 2) O.show_message("<span class='notice'>Teleporter engaged!</span>", 2)
add_fingerprint(usr) add_fingerprint(usr)
@@ -379,8 +379,8 @@
if(com) if(com)
com.icon_state = "tele0" com.icon_state = "tele0"
com.accurate = 0 com.accurate = 0
com.update_use_power(1) com.update_use_power(USE_POWER_IDLE)
update_use_power(1) update_use_power(USE_POWER_IDLE)
for(var/mob/O in hearers(src, null)) for(var/mob/O in hearers(src, null))
O.show_message("<span class='notice'>Teleporter disengaged!</span>", 2) O.show_message("<span class='notice'>Teleporter disengaged!</span>", 2)
add_fingerprint(usr) add_fingerprint(usr)

View File

@@ -6,7 +6,7 @@
density = 1 //thicc density = 1 //thicc
anchored = 1 anchored = 1
use_power = 0 use_power = USE_POWER_OFF
var/in_transit = 0 var/in_transit = 0
var/mob/occupant = null var/mob/occupant = null

View File

@@ -14,7 +14,7 @@
var/icon_deny //Icon_state when denying access var/icon_deny //Icon_state when denying access
// Power // Power
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 10 idle_power_usage = 10
var/vend_power_usage = 150 //actuators and stuff var/vend_power_usage = 150 //actuators and stuff

View File

@@ -73,7 +73,7 @@
if(A in component_parts) if(A in component_parts)
continue continue
A.loc = src.loc A.loc = src.loc
update_use_power(1) update_use_power(USE_POWER_IDLE)
update_icon() update_icon()
/obj/machinery/vr_sleeper/alien/enter_vr() /obj/machinery/vr_sleeper/alien/enter_vr()

View File

@@ -18,7 +18,7 @@
var/mirror_first_occupant = TRUE // Do we force the newly produced body to look like the occupant? var/mirror_first_occupant = TRUE // Do we force the newly produced body to look like the occupant?
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 15 idle_power_usage = 15
active_power_usage = 200 active_power_usage = 200
light_color = "#FF0000" light_color = "#FF0000"
@@ -174,7 +174,7 @@
M.client.perspective = EYE_PERSPECTIVE M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src M.client.eye = src
M.loc = src M.loc = src
update_use_power(2) update_use_power(USE_POWER_ACTIVE)
occupant = M occupant = M
update_icon() update_icon()
@@ -203,7 +203,7 @@
if(A in component_parts) if(A in component_parts)
continue continue
A.loc = src.loc A.loc = src.loc
update_use_power(1) update_use_power(USE_POWER_IDLE)
update_icon() update_icon()
/obj/machinery/vr_sleeper/proc/enter_vr() /obj/machinery/vr_sleeper/proc/enter_vr()

View File

@@ -3,7 +3,7 @@
desc = "You're not so sure about this, anymore..." desc = "You're not so sure about this, anymore..."
icon = 'icons/obj/device.dmi' icon = 'icons/obj/device.dmi'
icon_state = "syndbeacon" icon_state = "syndbeacon"
use_power = 0 use_power = USE_POWER_OFF
anchored = 1 anchored = 1
density = 1 density = 1
var/charges = 1 var/charges = 1

View File

@@ -5,7 +5,7 @@
desc = "A machine used for construction of mechas." desc = "A machine used for construction of mechas."
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 20 idle_power_usage = 20
active_power_usage = 5000 active_power_usage = 5000
req_access = list(access_robotics) req_access = list(access_robotics)
@@ -48,11 +48,11 @@
if(stat) if(stat)
return return
if(busy) if(busy)
use_power = 2 update_use_power(USE_POWER_ACTIVE)
progress += speed progress += speed
check_build() check_build()
else else
use_power = 1 update_use_power(USE_POWER_IDLE)
update_icon() update_icon()
/obj/machinery/mecha_part_fabricator/update_icon() /obj/machinery/mecha_part_fabricator/update_icon()

View File

@@ -5,7 +5,7 @@
desc = "A machine used for construction of prosthetics." desc = "A machine used for construction of prosthetics."
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 20 idle_power_usage = 20
active_power_usage = 5000 active_power_usage = 5000
req_access = list(access_robotics) req_access = list(access_robotics)
@@ -52,11 +52,11 @@
if(stat) if(stat)
return return
if(busy) if(busy)
use_power = 2 update_use_power(USE_POWER_ACTIVE)
progress += speed progress += speed
check_build() check_build()
else else
use_power = 1 update_use_power(USE_POWER_IDLE)
update_icon() update_icon()
/obj/machinery/pros_fabricator/update_icon() /obj/machinery/pros_fabricator/update_icon()

View File

@@ -6,7 +6,7 @@
anchored = 1 anchored = 1
density = 1 density = 1
throwpass = 1 throwpass = 1
use_power = 1 use_power = USE_POWER_IDLE
layer = ON_WINDOW_LAYER layer = ON_WINDOW_LAYER
power_channel = EQUIP power_channel = EQUIP
var/on = 0 var/on = 0

View File

@@ -48,13 +48,13 @@
plant = prepare_icon(emagged ? "emagged" : null) plant = prepare_icon(emagged ? "emagged" : null)
overlays += plant overlays += plant
set_light(2) set_light(2)
use_power = 2 use_power = USE_POWER_ACTIVE
/obj/machinery/holoplant/proc/deactivate() /obj/machinery/holoplant/proc/deactivate()
overlays -= plant overlays -= plant
QDEL_NULL(plant) QDEL_NULL(plant)
set_light(0) set_light(0)
use_power = 0 use_power = USE_POWER_OFF
/obj/machinery/holoplant/power_change() /obj/machinery/holoplant/power_change()
..() ..()

View File

@@ -124,7 +124,7 @@
icon_state = "shower" icon_state = "shower"
density = 0 density = 0
anchored = 1 anchored = 1
use_power = 0 use_power = USE_POWER_OFF
var/on = 0 var/on = 0
var/obj/effect/mist/mymist = null var/obj/effect/mist/mymist = null
var/ismist = 0 //needs a var so we can make it linger~ var/ismist = 0 //needs a var so we can make it linger~

View File

@@ -539,7 +539,7 @@
Pump.air2.gas["nitrogen"] = 3750 //The contents of 2 canisters. Pump.air2.gas["nitrogen"] = 3750 //The contents of 2 canisters.
Pump.air2.temperature = 50 Pump.air2.temperature = 50
Pump.air2.update_values() Pump.air2.update_values()
Pump.use_power=1 Pump.update_use_power(USE_POWER_IDLE)
Pump.target_pressure = 4500 Pump.target_pressure = 4500
Pump.update_icon() Pump.update_icon()

View File

@@ -26,7 +26,7 @@
/obj/machinery/gateway/centerstation /obj/machinery/gateway/centerstation
density = 1 density = 1
icon_state = "offcenter" icon_state = "offcenter"
use_power = 1 use_power = USE_POWER_IDLE
//warping vars //warping vars
var/list/linked = list() var/list/linked = list()
@@ -165,7 +165,7 @@ obj/machinery/gateway/centerstation/process()
/obj/machinery/gateway/centeraway /obj/machinery/gateway/centeraway
density = 1 density = 1
icon_state = "offcenter" icon_state = "offcenter"
use_power = 0 use_power = USE_POWER_OFF
var/calibrated = 1 var/calibrated = 1
var/list/linked = list() //a list of the connected gateway chunks var/list/linked = list() //a list of the connected gateway chunks
var/ready = 0 var/ready = 0

View File

@@ -20,7 +20,7 @@ log transactions
icon = 'icons/obj/terminals_vr.dmi' //VOREStation Edit icon = 'icons/obj/terminals_vr.dmi' //VOREStation Edit
icon_state = "atm" icon_state = "atm"
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 10 idle_power_usage = 10
circuit = /obj/item/weapon/circuitboard/atm circuit = /obj/item/weapon/circuitboard/atm
var/datum/money_account/authenticated_account var/datum/money_account/authenticated_account

View File

@@ -10,7 +10,7 @@
icon = 'icons/obj/cooking_machines.dmi' icon = 'icons/obj/cooking_machines.dmi'
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 5 idle_power_usage = 5
var/on_icon // Icon state used when cooking. var/on_icon // Icon state used when cooking.

View File

@@ -14,7 +14,7 @@
var/gib_time = 40 // Time from starting until meat appears var/gib_time = 40 // Time from starting until meat appears
var/gib_throw_dir = WEST // Direction to spit meat and gibs in. var/gib_throw_dir = WEST // Direction to spit meat and gibs in.
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 2 idle_power_usage = 2
active_power_usage = 500 active_power_usage = 500

View File

@@ -14,7 +14,7 @@
icon_state = "icecream_vat" icon_state = "icecream_vat"
density = 1 density = 1
anchored = 0 anchored = 0
use_power = 0 use_power = USE_POWER_OFF
flags = OPENCONTAINER | NOREACT flags = OPENCONTAINER | NOREACT
var/list/product_types = list() var/list/product_types = list()

View File

@@ -5,7 +5,7 @@
icon_state = "mw" icon_state = "mw"
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 5 idle_power_usage = 5
active_power_usage = 100 active_power_usage = 100
clicksound = "button" clicksound = "button"

View File

@@ -6,7 +6,7 @@
icon_state = "smartfridge" icon_state = "smartfridge"
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 5 idle_power_usage = 5
active_power_usage = 100 active_power_usage = 100
flags = NOREACT flags = NOREACT

View File

@@ -4,7 +4,7 @@
icon_keyboard = "tech_key" icon_keyboard = "tech_key"
icon_screen = "holocontrol" icon_screen = "holocontrol"
use_power = 1 use_power = USE_POWER_IDLE
active_power_usage = 8000 //8kW for the scenery + 500W per holoitem active_power_usage = 8000 //8kW for the scenery + 500W per holoitem
var/item_power_usage = 500 var/item_power_usage = 500
@@ -224,7 +224,7 @@
damaged = 1 damaged = 1
loadProgram(powerdown_program, 0) loadProgram(powerdown_program, 0)
active = 0 active = 0
use_power = 1 update_use_power(USE_POWER_IDLE)
for(var/mob/M in range(10,src)) for(var/mob/M in range(10,src))
M.show_message("The holodeck overloads!") M.show_message("The holodeck overloads!")
@@ -271,7 +271,7 @@
linkedholodeck.gravitychange(1) linkedholodeck.gravitychange(1)
active = 0 active = 0
use_power = 1 update_use_power(USE_POWER_IDLE)
/obj/machinery/computer/HolodeckControl/proc/loadProgram(var/prog, var/check_delay = 1) /obj/machinery/computer/HolodeckControl/proc/loadProgram(var/prog, var/check_delay = 1)
@@ -301,7 +301,7 @@
last_change = world.time last_change = world.time
active = 1 active = 1
use_power = 2 use_power = USE_POWER_ACTIVE
for(var/item in holographic_objs) for(var/item in holographic_objs)
derez(item) derez(item)
@@ -362,7 +362,7 @@
last_gravity_change = world.time last_gravity_change = world.time
active = 1 active = 1
use_power = 1 use_power = USE_POWER_IDLE
if(A.has_gravity) if(A.has_gravity)
A.gravitychange(0) A.gravitychange(0)
@@ -377,4 +377,4 @@
linkedholodeck.gravitychange(1) linkedholodeck.gravitychange(1)
active = 0 active = 0
use_power = 1 use_power = USE_POWER_IDLE

View File

@@ -397,7 +397,7 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
var/eventstarted = 0 var/eventstarted = 0
anchored = 1.0 anchored = 1.0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 2 idle_power_usage = 2
active_power_usage = 6 active_power_usage = 6
power_channel = ENVIRON power_channel = ENVIRON

View File

@@ -8,7 +8,7 @@
icon_state = "station_map" icon_state = "station_map"
anchored = 1 anchored = 1
density = 0 density = 0
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 10 idle_power_usage = 10
active_power_usage = 500 active_power_usage = 500
circuit = /obj/item/weapon/circuitboard/station_map circuit = /obj/item/weapon/circuitboard/station_map
@@ -126,7 +126,7 @@
GLOB.moved_event.register(watching_mob, src, /obj/machinery/station_map/proc/checkPosition) GLOB.moved_event.register(watching_mob, src, /obj/machinery/station_map/proc/checkPosition)
GLOB.dir_set_event.register(watching_mob, src, /obj/machinery/station_map/proc/checkPosition) GLOB.dir_set_event.register(watching_mob, src, /obj/machinery/station_map/proc/checkPosition)
GLOB.destroyed_event.register(watching_mob, src, /obj/machinery/station_map/proc/stopWatching) GLOB.destroyed_event.register(watching_mob, src, /obj/machinery/station_map/proc/stopWatching)
update_use_power(2) update_use_power(USE_POWER_ACTIVE)
if(bogus) if(bogus)
to_chat(user, "<span class='warning'>The holomap failed to initialize. This area of space cannot be mapped.</span>") to_chat(user, "<span class='warning'>The holomap failed to initialize. This area of space cannot be mapped.</span>")
@@ -156,7 +156,7 @@
GLOB.dir_set_event.unregister(watching_mob, src) GLOB.dir_set_event.unregister(watching_mob, src)
GLOB.destroyed_event.unregister(watching_mob, src) GLOB.destroyed_event.unregister(watching_mob, src)
watching_mob = null watching_mob = null
update_use_power(1) update_use_power(USE_POWER_IDLE)
/obj/machinery/station_map/power_change() /obj/machinery/station_map/power_change()
. = ..() . = ..()

View File

@@ -37,7 +37,7 @@
icon_state = "hydrotray3" icon_state = "hydrotray3"
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
var/obj/item/seeds/seed // Currently loaded seed packet. var/obj/item/seeds/seed // Currently loaded seed packet.
var/obj/item/weapon/disk/botany/loaded_disk //Currently loaded data disk. var/obj/item/weapon/disk/botany/loaded_disk //Currently loaded data disk.

View File

@@ -24,7 +24,7 @@
icon_state = "seeds" icon_state = "seeds"
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 100 idle_power_usage = 100
var/seeds_initialized = 0 // Map-placed ones break if seeds are loaded right at the start of the round, so we do it on the first interaction var/seeds_initialized = 0 // Map-placed ones break if seeds are loaded right at the start of the round, so we do it on the first interaction

View File

@@ -2,7 +2,7 @@
name = "soil" name = "soil"
icon_state = "soil" icon_state = "soil"
density = 0 density = 0
use_power = 0 use_power = USE_POWER_OFF
mechanical = 0 mechanical = 0
tray_light = 0 tray_light = 0
frozen = -1 frozen = -1

View File

@@ -1,7 +1,7 @@
/obj/machinery/mining /obj/machinery/mining
icon = 'icons/obj/mining_drill.dmi' icon = 'icons/obj/mining_drill.dmi'
anchored = 0 anchored = 0
use_power = 0 //The drill takes power directly from a cell. use_power = USE_POWER_OFF //The drill takes power directly from a cell.
density = 1 density = 1
layer = MOB_LAYER+0.1 //So it draws over mobs in the tile north of it. layer = MOB_LAYER+0.1 //So it draws over mobs in the tile north of it.

View File

@@ -297,7 +297,7 @@ var/list/ai_verbs_default = list(
/obj/machinery/ai_powersupply /obj/machinery/ai_powersupply
name="Power Supply" name="Power Supply"
active_power_usage=50000 // Station AIs use significant amounts of power. This, when combined with charged SMES should mean AI lasts for 1hr without external power. active_power_usage=50000 // Station AIs use significant amounts of power. This, when combined with charged SMES should mean AI lasts for 1hr without external power.
use_power = 2 use_power = USE_POWER_ACTIVE
power_channel = EQUIP power_channel = EQUIP
var/mob/living/silicon/ai/powered_ai = null var/mob/living/silicon/ai/powered_ai = null
invisibility = 100 invisibility = 100
@@ -325,14 +325,14 @@ var/list/ai_verbs_default = list(
qdel(src) qdel(src)
return return
if(powered_ai.APU_power) if(powered_ai.APU_power)
use_power = 0 update_use_power(USE_POWER_OFF)
return return
if(!powered_ai.anchored) if(!powered_ai.anchored)
loc = powered_ai.loc loc = powered_ai.loc
use_power = 0 update_use_power(USE_POWER_OFF)
use_power(50000) // Less optimalised but only called if AI is unwrenched. This prevents usage of wrenching as method to keep AI operational without power. Intellicard is for that. use_power(50000) // Less optimalised but only called if AI is unwrenched. This prevents usage of wrenching as method to keep AI operational without power. Intellicard is for that.
if(powered_ai.anchored) if(powered_ai.anchored)
use_power = 2 update_use_power(USE_POWER_ACTIVE)
/mob/living/silicon/ai/proc/pick_icon() /mob/living/silicon/ai/proc/pick_icon()
set category = "AI Settings" set category = "AI Settings"

View File

@@ -11,7 +11,7 @@
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 20 idle_power_usage = 20
active_power_usage = 5000 active_power_usage = 5000

View File

@@ -2,7 +2,7 @@
/obj/machinery/ntnet_relay /obj/machinery/ntnet_relay
name = "NTNet Quantum Relay" name = "NTNet Quantum Relay"
desc = "A very complex router and transmitter capable of connecting electronic devices together. Looks fragile." desc = "A very complex router and transmitter capable of connecting electronic devices together. Looks fragile."
use_power = 2 use_power = USE_POWER_ACTIVE
active_power_usage = 20000 //20kW, apropriate for machine that keeps massive cross-Zlevel wireless network operational. active_power_usage = 20000 //20kW, apropriate for machine that keeps massive cross-Zlevel wireless network operational.
idle_power_usage = 100 idle_power_usage = 100
icon_state = "bus" icon_state = "bus"
@@ -38,9 +38,9 @@
/obj/machinery/ntnet_relay/process() /obj/machinery/ntnet_relay/process()
if(operable()) if(operable())
use_power = 2 update_use_power(USE_POWER_ACTIVE)
else else
use_power = 1 update_use_power(USE_POWER_IDLE)
if(dos_overload) if(dos_overload)
dos_overload = max(0, dos_overload - dos_dissipate) dos_overload = max(0, dos_overload - dos_dissipate)

View File

@@ -12,7 +12,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
insert_anim = "faxsend" insert_anim = "faxsend"
req_one_access = list(access_lawyer, access_heads, access_armory, access_qm) req_one_access = list(access_lawyer, access_heads, access_armory, access_qm)
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 30 idle_power_usage = 30
active_power_usage = 200 active_power_usage = 200
circuit = /obj/item/weapon/circuitboard/fax circuit = /obj/item/weapon/circuitboard/fax

View File

@@ -9,7 +9,7 @@
var/shred_anim = "shredder-shredding" var/shred_anim = "shredder-shredding"
density = 1 density = 1
anchored = 1 anchored = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 10 idle_power_usage = 10
active_power_usage = 200 active_power_usage = 200
power_channel = EQUIP power_channel = EQUIP

View File

@@ -6,7 +6,7 @@
var/insert_anim = "bigscanner1" var/insert_anim = "bigscanner1"
anchored = 1 anchored = 1
density = 1 density = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 30 idle_power_usage = 30
active_power_usage = 200 active_power_usage = 200
power_channel = EQUIP power_channel = EQUIP

View File

@@ -5,7 +5,7 @@
icon_state = "control" icon_state = "control"
anchored = 1 anchored = 1
density = 1 density = 1
use_power = 1 use_power = USE_POWER_IDLE
idle_power_usage = 100 idle_power_usage = 100
active_power_usage = 1000 active_power_usage = 1000
@@ -211,10 +211,10 @@
/obj/machinery/power/am_control_unit/proc/toggle_power() /obj/machinery/power/am_control_unit/proc/toggle_power()
active = !active active = !active
if(active) if(active)
use_power = 2 update_use_power(USE_POWER_ACTIVE)
visible_message("The [src.name] starts up.") visible_message("The [src.name] starts up.")
else else
use_power = 1 update_use_power(USE_POWER_IDLE)
visible_message("The [src.name] shuts down.") visible_message("The [src.name] shuts down.")
update_icon() update_icon()
return return

View File

@@ -16,7 +16,7 @@ proc/cardinalrange(var/center)
anchored = 1 anchored = 1
density = 1 density = 1
dir = 1 dir = 1
use_power = 0//Living things generally dont use power use_power = USE_POWER_OFF //Living things generally dont use power
idle_power_usage = 0 idle_power_usage = 0
active_power_usage = 0 active_power_usage = 0

View File

@@ -67,7 +67,7 @@
plane = TURF_PLANE plane = TURF_PLANE
layer = ABOVE_TURF_LAYER layer = ABOVE_TURF_LAYER
anchored = 1 anchored = 1
use_power = 0 use_power = USE_POWER_OFF
clicksound = "switch" clicksound = "switch"
req_access = list(access_engine_equip) req_access = list(access_engine_equip)
var/area/area var/area/area

Some files were not shown because too many files have changed in this diff Show More