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
dir = SOUTH
initialize_directions = SOUTH|NORTH
use_power = 1
use_power = USE_POWER_IDLE
var/datum/gas_mixture/air1
var/datum/gas_mixture/air2

View File

@@ -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"])

View File

@@ -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

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")

View File

@@ -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()

View File

@@ -11,7 +11,7 @@
var/datum/omni_port/input
var/datum/omni_port/output
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 150 //internal circuitry, friction losses and stuff
power_rating = 7500 //7500 W ~ 10 HP
@@ -161,13 +161,13 @@
switch(href_list["command"])
if("power")
if(!configuring)
use_power = !use_power
update_use_power(!use_power)
else
use_power = 0
update_use_power(USE_POWER_OFF)
if("configure")
configuring = !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
if(configuring && !use_power)

View File

@@ -6,7 +6,7 @@
icon_state = "map_mixer"
pipe_state = "omni_mixer"
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 150 //internal circuitry, friction losses and stuff
power_rating = 3700 //3700 W ~ 5 HP
@@ -178,13 +178,13 @@
switch(href_list["command"])
if("power")
if(!configuring)
use_power = !use_power
update_use_power(!use_power)
else
use_power = 0
update_use_power(USE_POWER_OFF)
if("configure")
configuring = !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
if(configuring && !use_power)

View File

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

View File

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

View File

@@ -9,7 +9,7 @@
name = "Gas filter"
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
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"
else
icon_state += "off"
use_power = 0
update_use_power(USE_POWER_OFF)
/obj/machinery/atmospherics/trinary/atmos_filter/process()
..()

View File

@@ -8,7 +8,7 @@
name = "Gas mixer"
use_power = 1
use_power = USE_POWER_IDLE
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
@@ -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

View File

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

View File

@@ -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"])

View File

@@ -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"])

View File

@@ -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)

View File

@@ -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")

View File

@@ -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

View File

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

View File

@@ -46,7 +46,7 @@
icon_state = "scanner_0"
density = 1
anchored = 1.0
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 50
active_power_usage = 300
interact_offline = 1
@@ -260,7 +260,7 @@
var/obj/item/weapon/disk/data/disk = null
var/selected_menu_key = null
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 10
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

View File

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

View File

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

View File

@@ -7,7 +7,7 @@
anchored = 1 //About time someone fixed this.
density = 1 //VOREStation Edit - Big console
dir = 8
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 40
interact_offline = 1
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_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
active_power_usage = 200 //builtin health analyzer, dialysis machine, injectors.
@@ -388,7 +388,7 @@
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
update_use_power(2)
update_use_power(USE_POWER_ACTIVE)
occupant = M
update_icon()
@@ -408,7 +408,7 @@
if(A in component_parts)
continue
A.loc = src.loc
update_use_power(1)
update_use_power(USE_POWER_IDLE)
update_icon()
toggle_filter()
toggle_pump()

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

@@ -152,10 +152,16 @@
volume = 500000
volume_rate = 7000
<<<<<<< HEAD
use_power = 1
idle_power_usage = 50 //internal circuitry, friction losses and stuff
active_power_usage = 1000 // Blowers running
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/id = 0

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -38,7 +38,7 @@
var/hatch_open = 0
power_channel = ENVIRON
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 5
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
health = 150
visible = 0.0
use_power = 0
use_power = USE_POWER_OFF
flags = ON_BORDER
opacity = 0
var/obj/item/weapon/airlock_electronics/electronics = null

View File

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

View File

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

View File

@@ -7,7 +7,7 @@ var/list/floor_light_cache = list()
desc = "A backlit floor panel."
layer = TURF_LAYER+0.001
anchored = 0
use_power = 2
use_power = USE_POWER_ACTIVE
idle_power_usage = 2
active_power_usage = 20
power_channel = LIGHT
@@ -72,8 +72,13 @@ var/list/floor_light_cache = list()
return
on = !on
<<<<<<< HEAD
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.
=======
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()
return
@@ -81,21 +86,21 @@ var/list/floor_light_cache = list()
..()
var/need_update
if((!anchored || broken()) && on)
use_power = 0
update_use_power(USE_POWER_OFF)
on = 0
need_update = 1
else if(use_power && !on)
use_power = 0
update_use_power(USE_POWER_OFF)
need_update = 1
if(need_update)
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)
set_light(default_light_range, default_light_power, default_light_colour)
else
use_power = 0
update_use_power(USE_POWER_OFF)
if(light_range || light_power)
set_light(0)

View File

@@ -39,7 +39,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED
layer = ABOVE_TURF_LAYER
var/power_per_hologram = 500 //per usage per hologram
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/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.
@@ -196,7 +196,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
/obj/machinery/hologram
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 5
active_power_usage = 100

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -23,7 +23,7 @@ var/bomb_set
var/timing_wire
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.
use_power = 0
use_power = USE_POWER_OFF
/obj/machinery/nuclearbomb/New()
..()

View File

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

View File

@@ -6,7 +6,7 @@
density = 1
anchored = 1
circuit = /obj/item/weapon/circuitboard/telecomms/pda_multicaster
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 750
var/on = 1 // If we're currently active,
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_state = "recharger0"
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 4
active_power_usage = 40000 //40 kW
var/efficiency = 40000 //will provide the modified power rate when upgraded
@@ -117,12 +117,12 @@
/obj/machinery/recharger/process()
if(stat & (NOPOWER|BROKEN) || !anchored)
update_use_power(0)
update_use_power(USE_POWER_OFF)
icon_state = icon_state_idle
return
if(!charging)
update_use_power(1)
update_use_power(USE_POWER_IDLE)
icon_state = icon_state_idle
else
var/obj/item/weapon/cell/C = charging.get_cell()
@@ -130,10 +130,10 @@
if(!C.fully_charged())
icon_state = icon_state_charging
C.give(CELLRATE*efficiency)
update_use_power(2)
update_use_power(USE_POWER_ACTIVE)
else
icon_state = icon_state_charged
update_use_power(1)
update_use_power(USE_POWER_IDLE)
//VOREStation Add - NSFW Batteries
else if(istype(charging, /obj/item/ammo_casing/microbattery))

View File

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

View File

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

View File

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

View File

@@ -58,7 +58,7 @@
/obj/machinery/power/supply_beacon/attack_hand(var/mob/user)
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>")
return
@@ -80,7 +80,7 @@
return
set_light(3, 3, "#00CCAA")
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>")
/obj/machinery/power/supply_beacon/proc/deactivate(var/mob/user, var/permanent)
@@ -90,7 +90,7 @@
else
icon_state = "beacon"
set_light(0)
use_power = 0
use_power = USE_POWER_OFF
target_drop_time = null
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."
density = 1
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 25
machinetype = 5
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."
density = 1
anchored = 1
use_power = 0
use_power = USE_POWER_OFF
idle_power_usage = 0
machinetype = 6
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."
density = 1
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 600
machinetype = 1
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."
density = 1
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 1600
machinetype = 7
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."
density = 1
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 600
machinetype = 8
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."
density = 1
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 1000
machinetype = 2
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."
density = 1
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 600
machinetype = 3
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."
density = 1
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 300
machinetype = 4
circuit = /obj/item/weapon/circuitboard/telecomms/server

View File

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

View File

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

View File

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

View File

@@ -73,7 +73,7 @@
if(A in component_parts)
continue
A.loc = src.loc
update_use_power(1)
update_use_power(USE_POWER_IDLE)
update_icon()
/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?
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 15
active_power_usage = 200
light_color = "#FF0000"
@@ -174,7 +174,7 @@
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
update_use_power(2)
update_use_power(USE_POWER_ACTIVE)
occupant = M
update_icon()
@@ -203,7 +203,7 @@
if(A in component_parts)
continue
A.loc = src.loc
update_use_power(1)
update_use_power(USE_POWER_IDLE)
update_icon()
/obj/machinery/vr_sleeper/proc/enter_vr()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -124,7 +124,7 @@
icon_state = "shower"
density = 0
anchored = 1
use_power = 0
use_power = USE_POWER_OFF
var/on = 0
var/obj/effect/mist/mymist = null
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.temperature = 50
Pump.air2.update_values()
Pump.use_power=1
Pump.update_use_power(USE_POWER_IDLE)
Pump.target_pressure = 4500
Pump.update_icon()

View File

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

View File

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

View File

@@ -10,7 +10,7 @@
icon = 'icons/obj/cooking_machines.dmi'
density = 1
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 5
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_throw_dir = WEST // Direction to spit meat and gibs in.
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 2
active_power_usage = 500

View File

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

View File

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

View File

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

View File

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

View File

@@ -8,7 +8,7 @@
icon_state = "station_map"
anchored = 1
density = 0
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 10
active_power_usage = 500
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.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)
update_use_power(2)
update_use_power(USE_POWER_ACTIVE)
if(bogus)
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.destroyed_event.unregister(watching_mob, src)
watching_mob = null
update_use_power(1)
update_use_power(USE_POWER_IDLE)
/obj/machinery/station_map/power_change()
. = ..()

View File

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

View File

@@ -24,7 +24,7 @@
icon_state = "seeds"
density = 1
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
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

View File

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

View File

@@ -1,7 +1,7 @@
/obj/machinery/mining
icon = 'icons/obj/mining_drill.dmi'
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
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
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.
use_power = 2
use_power = USE_POWER_ACTIVE
power_channel = EQUIP
var/mob/living/silicon/ai/powered_ai = null
invisibility = 100
@@ -325,14 +325,14 @@ var/list/ai_verbs_default = list(
qdel(src)
return
if(powered_ai.APU_power)
use_power = 0
update_use_power(USE_POWER_OFF)
return
if(!powered_ai.anchored)
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.
if(powered_ai.anchored)
use_power = 2
update_use_power(USE_POWER_ACTIVE)
/mob/living/silicon/ai/proc/pick_icon()
set category = "AI Settings"

View File

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

View File

@@ -2,7 +2,7 @@
/obj/machinery/ntnet_relay
name = "NTNet Quantum Relay"
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.
idle_power_usage = 100
icon_state = "bus"
@@ -38,9 +38,9 @@
/obj/machinery/ntnet_relay/process()
if(operable())
use_power = 2
update_use_power(USE_POWER_ACTIVE)
else
use_power = 1
update_use_power(USE_POWER_IDLE)
if(dos_overload)
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"
req_one_access = list(access_lawyer, access_heads, access_armory, access_qm)
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 30
active_power_usage = 200
circuit = /obj/item/weapon/circuitboard/fax

View File

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

View File

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

View File

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

View File

@@ -16,7 +16,7 @@ proc/cardinalrange(var/center)
anchored = 1
density = 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
active_power_usage = 0

View File

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

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