Merge pull request #6882 from VOREStation/vplk-machinery-use-power

Machinery: Always use update_use_power()
This commit is contained in:
Atermonera
2020-03-23 20:20:41 -07:00
committed by GitHub
146 changed files with 299 additions and 294 deletions
+1 -1
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()
+2 -2
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()
@@ -142,7 +142,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
+1 -1
View File
@@ -20,7 +20,7 @@ log transactions
icon = 'icons/obj/terminals.dmi'
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
@@ -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.
+1 -1
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
+1 -1
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()
+1 -1
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"
+1 -1
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
+6 -6
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
+1 -1
View File
@@ -391,7 +391,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
+3 -3
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()
. = ..()
+1 -1
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.
+1 -1
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
+1 -1
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
+1 -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.
+4 -4
View File
@@ -291,7 +291,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
@@ -319,14 +319,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"
@@ -11,7 +11,7 @@
density = 1
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 20
active_power_usage = 5000
@@ -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)
+1 -1
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
+1 -1
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
+1 -1
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
+3 -3
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
+1 -1
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
+1 -1
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
+3 -3
View File
@@ -13,7 +13,7 @@ var/list/fusion_cores = list()
icon = 'icons/obj/machines/power/fusion.dmi'
icon_state = "core0"
density = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 50
active_power_usage = 500 //multiplied by field strength
anchored = 0
@@ -70,7 +70,7 @@ var/list/fusion_cores = list()
owned_field = new(loc, src)
owned_field.ChangeFieldStrength(field_strength)
icon_state = "core1"
use_power = 2
update_use_power(USE_POWER_ACTIVE)
. = 1
/obj/machinery/power/fusion_core/proc/Shutdown(var/force_rupture)
@@ -82,7 +82,7 @@ var/list/fusion_cores = list()
owned_field.RadiateAll()
qdel(owned_field)
owned_field = null
use_power = 1
update_use_power(USE_POWER_IDLE)
/obj/machinery/power/fusion_core/proc/AddParticles(var/name, var/quantity = 1)
if(owned_field)
@@ -7,7 +7,7 @@ var/list/fuel_injectors = list()
density = 1
anchored = 0
req_access = list(access_engine)
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 10
active_power_usage = 500
@@ -103,13 +103,13 @@ var/list/fuel_injectors = list()
if(!injecting && cur_assembly)
icon_state = "injector1"
injecting = 1
use_power = 1
update_use_power(USE_POWER_IDLE)
/obj/machinery/fusion_fuel_injector/proc/StopInjecting()
if(injecting)
injecting = 0
icon_state = "injector0"
use_power = 0
update_use_power(USE_POWER_OFF)
/obj/machinery/fusion_fuel_injector/proc/Inject()
if(!injecting)
@@ -6,7 +6,7 @@ var/list/gyrotrons = list()
desc = "It is a heavy duty industrial gyrotron suited for powering fusion reactors."
icon_state = "emitter-off"
req_access = list(access_engine)
use_power = 1
use_power = USE_POWER_IDLE
active_power_usage = 50000
circuit = /obj/item/weapon/circuitboard/gyrotron
+2 -2
View File
@@ -5,7 +5,7 @@
density = 1
anchored = 0
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 100 //Watts, I hope. Just enough to do the computer and display things.
var/max_power = 500000
@@ -156,7 +156,7 @@
user.visible_message("[user.name] [anchored ? "secures" : "unsecures"] the bolts holding [src.name] to the floor.", \
"You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor.", \
"You hear a ratchet.")
use_power = anchored
update_use_power(anchored ? USE_POWER_IDLE : USE_POWER_ACTIVE)
if(anchored) // Powernet connection stuff.
connect_to_network()
else
+1 -1
View File
@@ -4,7 +4,7 @@
icon_state = "teg"
anchored = 1
density = 1
use_power = 0
use_power = USE_POWER_OFF
var/obj/machinery/atmospherics/unary/generator_input/input1
var/obj/machinery/atmospherics/unary/generator_input/input2
+1 -1
View File
@@ -16,7 +16,7 @@
icon_state = "TheSingGen"
anchored = 1
density = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 200
active_power_usage = 1000
var/on = 1
+3 -3
View File
@@ -212,7 +212,7 @@ var/global/list/light_type_cache = list()
anchored = 1
plane = MOB_PLANE
layer = ABOVE_MOB_LAYER
use_power = 2
use_power = USE_POWER_ACTIVE
idle_power_usage = 2
active_power_usage = 10 // Previously 20.
power_channel = LIGHT //Lights are calc'd via area so they dont need to be in the machine list
@@ -388,14 +388,14 @@ var/global/list/light_type_cache = list()
on = 0
set_light(0)
else
use_power = 2
update_use_power(USE_POWER_ACTIVE)
set_light(brightness_range, brightness_power, brightness_color)
else if(has_emergency_power(LIGHT_EMERGENCY_POWER_USE) && !turned_off())
use_power = 1
emergency_mode = TRUE
START_PROCESSING(SSobj, src)
else
use_power = 1
update_use_power(USE_POWER_IDLE)
set_light(0)
active_power_usage = ((light_range * light_power) * LIGHTING_POWER_FACTOR)
+1 -1
View File
@@ -6,7 +6,7 @@
icon_state = "portgen0"
density = 1
anchored = 0
use_power = 0
use_power = USE_POWER_OFF
var/active = 0
var/power_gen = 5000
+1 -1
View File
@@ -11,7 +11,7 @@
icon = 'icons/obj/power.dmi'
anchored = 1.0
var/datum/powernet/powernet = null
use_power = 0
use_power = USE_POWER_OFF
idle_power_usage = 0
active_power_usage = 0
@@ -15,7 +15,7 @@
anchored = 1.0
circuit = /obj/item/weapon/circuitboard/powermonitor
var/alerting = 0
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 300
active_power_usage = 300
var/datum/nano_module/power_monitor/power_monitor
@@ -8,7 +8,7 @@
anchored = 1
density = 0
unacidable = 1
use_power = 0
use_power = USE_POWER_OFF
light_range = 4
flags = PROXMOVE
var/obj/machinery/field_generator/FG1 = null
+1 -1
View File
@@ -10,7 +10,7 @@
req_access = list(access_engine_equip)
var/id = null
use_power = 0 //uses powernet power, not APC power
use_power = USE_POWER_OFF //uses powernet power, not APC power
active_power_usage = 30000 //30 kW laser. I guess that means 30 kJ per shot.
var/active = 0
@@ -20,7 +20,7 @@ field_generator power level display
icon_state = "Field_Gen"
anchored = 0
density = 1
use_power = 0
use_power = USE_POWER_OFF
var/const/num_power_levels = 6 // Total number of power level icon has
var/Varedit_start = 0
var/Varpower = 0
+1 -1
View File
@@ -6,7 +6,7 @@
icon_state = "TheSingGen"
anchored = 0
density = 1
use_power = 0
use_power = USE_POWER_OFF
var/energy = 0
var/creation_type = /obj/singularity
@@ -258,7 +258,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
icon_state = "none"
anchored = 0
density = 1
use_power = 0
use_power = USE_POWER_OFF
idle_power_usage = 0
active_power_usage = 0
var/construction_state = 0
@@ -383,10 +383,10 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
if(src.construction_state < 3)//Was taken apart, update state
update_state()
if(use_power)
use_power = 0
update_use_power(USE_POWER_OFF)
src.construction_state = temp_state
if(src.construction_state >= 3)
use_power = 1
update_use_power(USE_POWER_IDLE)
update_icon()
return 1
return 0
@@ -8,7 +8,7 @@
reference = "control_box"
anchored = 0
density = 1
use_power = 0
use_power = USE_POWER_OFF
idle_power_usage = 500
active_power_usage = 70000 //70 kW per unit of strength
construction_state = 0
@@ -42,7 +42,7 @@
/obj/machinery/particle_accelerator/control_box/update_state()
if(construction_state < 3)
update_use_power(0)
update_use_power(USE_POWER_OFF)
assembled = 0
active = 0
for(var/obj/structure/particle_accelerator/part in connected_parts)
@@ -52,7 +52,7 @@
connected_parts = list()
return
if(!part_scan())
update_use_power(1)
update_use_power(USE_POWER_IDLE)
active = 0
connected_parts = list()
@@ -138,9 +138,9 @@
..()
if(stat & NOPOWER)
active = 0
update_use_power(0)
update_use_power(USE_POWER_OFF)
else if(!stat && construction_state == 3)
update_use_power(1)
update_use_power(USE_POWER_IDLE)
/obj/machinery/particle_accelerator/control_box/process()
@@ -212,13 +212,13 @@
message_admins("PA Control Computer turned [active ?"ON":"OFF"] by [key_name(usr, usr.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("PACCEL([x],[y],[z]) [key_name(usr)] turned [active?"ON":"OFF"].")
if(active)
update_use_power(2)
update_use_power(USE_POWER_ACTIVE)
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength = src.strength
part.powered = 1
part.update_icon()
else
update_use_power(1)
update_use_power(USE_POWER_IDLE)
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength = null
part.powered = 0
@@ -9,7 +9,7 @@
icon_state = "smasher"
anchored = 0
density = 1
use_power = 0
use_power = USE_POWER_OFF
var/successful_craft = FALSE // Are we waiting to be emptied?
var/image/material_layer // Holds the image used for the filled overlay.
+1 -1
View File
@@ -11,7 +11,7 @@
icon_state = "smes"
density = 1
anchored = 1
use_power = 0
use_power = USE_POWER_OFF
circuit = /obj/item/weapon/circuitboard/smes
clicksound = "switch"
+2 -2
View File
@@ -13,7 +13,7 @@ GLOBAL_LIST_EMPTY(solars_list)
icon_state = "sp_base"
anchored = 1
density = 1
use_power = 0
use_power = USE_POWER_OFF
idle_power_usage = 0
active_power_usage = 0
var/id = 0
@@ -285,7 +285,7 @@ GLOBAL_LIST_EMPTY(solars_list)
icon_state = "solar"
anchored = 1
density = 1
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 250
var/id = 0
var/cdir = 0
@@ -126,7 +126,7 @@ GLOBAL_LIST_BOILERPLATE(all_engine_setup_markers, /obj/effect/engine_setup)
log_and_message_admins("## WARNING: Unable to locate pump at [x] [y] [z]!")
return SETUP_WARNING
P.target_pressure = P.max_pressure_setting
P.use_power = 1
P.update_use_power(USE_POWER_IDLE)
P.update_icon()
return SETUP_OK
@@ -259,7 +259,7 @@ GLOBAL_LIST_BOILERPLATE(all_engine_setup_markers, /obj/effect/engine_setup)
return SETUP_WARNING
F.rebuild_filtering_list()
F.use_power = 1
F.update_use_power(USE_POWER_IDLE)
F.update_icon()
return SETUP_OK
+1 -1
View File
@@ -10,7 +10,7 @@
icon_state = "tracker"
anchored = 1
density = 1
use_power = 0
use_power = USE_POWER_OFF
var/id = 0
var/sun_angle = 0 // sun angle as set by sun datum
+2 -2
View File
@@ -16,7 +16,7 @@
icon = 'icons/obj/chemical.dmi'
icon_state = "mixer0"
circuit = /obj/item/weapon/circuitboard/chem_master
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 20
var/beaker = null
var/obj/item/weapon/storage/pill_bottle/loaded_pill_bottle = null
@@ -333,7 +333,7 @@
icon_state = "juicer1"
density = 0
anchored = 0
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 5
active_power_usage = 100
circuit = /obj/item/weapon/circuitboard/grinder
@@ -15,7 +15,7 @@
var/accept_drinking = 0
var/amount = 30
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 100
anchored = 1
@@ -6,7 +6,7 @@
/obj/machinery/portable_atmospherics/powered/reagent_distillery
name = "chemical distillery"
desc = "A complex machine utilizing state-of-the-art components to mix chemicals at different temperatures."
use_power = 1
use_power = USE_POWER_IDLE
icon = 'icons/obj/machines/reagent.dmi'
icon_state = "distiller"
+3 -3
View File
@@ -359,7 +359,7 @@
// charge the gas reservoir and perform flush if ready
/obj/machinery/disposal/process()
if(!air_contents || (stat & BROKEN)) // nothing can happen if broken
update_use_power(0)
update_use_power(USE_POWER_OFF)
return
flush_count++
@@ -377,7 +377,7 @@
flush()
if(mode != 1) //if off or ready, no need to charge
update_use_power(1)
update_use_power(USE_POWER_IDLE)
else if(air_contents.return_pressure() >= SEND_PRESSURE)
mode = 2 //if full enough, switch to ready mode
update()
@@ -386,7 +386,7 @@
/obj/machinery/disposal/proc/pressurize()
if(stat & NOPOWER) // won't charge if no power
update_use_power(0)
update_use_power(USE_POWER_OFF)
return
var/atom/L = loc // recharging from loc turf
+1 -1
View File
@@ -20,7 +20,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
hidden_materials = list(MAT_PLASTEEL, MAT_DURASTEEL, MAT_GRAPHITE, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER)
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 30
active_power_usage = 2500
@@ -12,7 +12,7 @@ Note: Must be placed within 3 tiles of the R&D Console
var/obj/item/weapon/loaded_item = null
var/decon_mod = 0
circuit = /obj/item/weapon/circuitboard/destructive_analyzer
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 30
active_power_usage = 2500
+2 -2
View File
@@ -54,7 +54,7 @@ var/global/list/obj/machinery/message_server/message_servers = list()
desc = "Facilitates both PDA messages and request console functions."
density = 1
anchored = 1.0
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 10
active_power_usage = 100
@@ -240,7 +240,7 @@ var/obj/machinery/blackbox_recorder/blackbox
desc = "Records all radio communications, as well as various other information in case of the worst."
density = 1
anchored = 1.0
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 10
active_power_usage = 100
var/list/messages = list() //Stores messages of non-standard frequencies
+1 -1
View File
@@ -3,7 +3,7 @@
icon_state = "protolathe"
flags = OPENCONTAINER
circuit = /obj/item/weapon/circuitboard/protolathe
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 30
active_power_usage = 5000
+1 -1
View File
@@ -7,7 +7,7 @@
icon = 'icons/obj/machines/research.dmi'
density = 1
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
var/busy = 0
var/obj/machinery/computer/rdconsole/linked_console
@@ -16,7 +16,7 @@
//1 = select event
//2 = authenticate
anchored = 1.0
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 2
active_power_usage = 6
power_channel = ENVIRON
+3 -3
View File
@@ -134,7 +134,7 @@
var/is_open = 0 //Whether or not the wires are exposed
var/locked = 0
var/check_delay = 60 //periodically recheck if we need to rebuild a shield
use_power = 0
use_power = USE_POWER_OFF
idle_power_usage = 0
var/global/list/blockedturfs = list(
/turf/space,
@@ -156,7 +156,7 @@
idle_power_usage = 0
for(var/obj/machinery/shield/shield_tile in deployed_shields)
idle_power_usage += shield_tile.shield_idle_power
update_use_power(1)
update_use_power(USE_POWER_IDLE)
/obj/machinery/shieldgen/proc/shields_down()
if(!active) return 0 //If it's already off, how did this get called?
@@ -166,7 +166,7 @@
collapse_shields()
update_use_power(0)
update_use_power(USE_POWER_OFF)
/obj/machinery/shieldgen/proc/create_shields()
for(var/turf/target_tile in range(2, src))
+1 -1
View File
@@ -23,7 +23,7 @@
//There have to be at least two posts, so these are effectively doubled
var/power_draw = 30000 //30 kW. How much power is drawn from powernet. Increase this to allow the generator to sustain longer shields, at the cost of more power draw.
var/max_stored_power = 50000 //50 kW
use_power = 0 //Draws directly from power net. Does not use APC power.
use_power = USE_POWER_OFF //Draws directly from power net. Does not use APC power.
/obj/machinery/shieldwallgen/attack_hand(mob/user as mob)
if(state != 1)
+1 -1
View File
@@ -15,7 +15,7 @@
var/max_charge = 8e6 //8 MJ
var/max_charge_rate = 400000 //400 kW
var/locked = 0
use_power = 0 //doesn't use APC power
use_power = USE_POWER_OFF //doesn't use APC power
var/charge_rate = 100000 //100 kW
var/obj/machinery/shield_gen/owned_gen
+2 -2
View File
@@ -4,7 +4,7 @@
description_info = "This device disrupts shields on directly adjacent tiles (in a + shaped pattern). They are commonly installed around exterior airlocks to prevent shields from blocking EVA access."
icon = 'icons/obj/machines/shielding.dmi'
icon_state = "fdiffuser_on"
use_power = 2
use_power = USE_POWER_ACTIVE
idle_power_usage = 25 // Previously 100.
active_power_usage = 500 // Previously 2000
anchored = 1
@@ -57,7 +57,7 @@
update_icon()
return
enabled = !enabled
use_power = enabled + 1
update_use_power(enabled ? USE_POWER_ACTIVE : USE_POWER_IDLE)
update_icon()
to_chat(usr, "You turn \the [src] [enabled ? "on" : "off"].")
+1 -1
View File
@@ -22,7 +22,7 @@
var/time_since_fail = 100
var/energy_conversion_rate = 0.0006 //how many renwicks per watt? Higher numbers equals more effiency.
var/z_range = 0 // How far 'up and or down' to extend the shield to, in z-levels. Only works on MultiZ supported z-levels.
use_power = 0 //doesn't use APC power
use_power = USE_POWER_OFF //doesn't use APC power
/obj/machinery/shield_gen/advanced
name = "advanced bubble shield generator"
@@ -10,7 +10,7 @@
density = 1
var/previous_power_state = 0
use_power = 1
use_power = USE_POWER_IDLE
active_power_usage = 2000
idle_power_usage = 1000
@@ -54,7 +54,7 @@
//if we've finished growing...
if(time_spent_spawning >= time_per_spawn)
time_spent_spawning = 0
use_power = 1
update_use_power(USE_POWER_IDLE)
src.visible_message("<span class='notice'>\icon[src] [src] pings!</span>")
icon_state = "cellold1"
desc = "It's full of a bubbling viscous liquid, and is lit by a mysterious glow."
@@ -63,11 +63,11 @@
//if we're getting close to finished, kick into overdrive power usage
if(time_spent_spawning / time_per_spawn > 0.75)
use_power = 2
update_use_power(USE_POWER_ACTIVE)
icon_state = "cellold2"
desc = "It's full of a bubbling viscous liquid, and is lit by a mysterious glow. A dark shape appears to be forming inside..."
else
use_power = 1
update_use_power(USE_POWER_IDLE)
icon_state = "cellold1"
desc = "It's full of a bubbling viscous liquid, and is lit by a mysterious glow."
@@ -7,7 +7,7 @@
idle_power_usage = 100
active_power_usage = 1000
use_power = 1
use_power = USE_POWER_IDLE
var/spawn_progress_time = 0
var/max_spawn_time = 50
@@ -104,7 +104,7 @@
max_spawn_time = rand(30,100)
if(!spawning_types.len || !stored_materials.len)
use_power = 1
update_use_power(USE_POWER_IDLE)
icon_state = "borgcharger0(old)"
else if(prob(5))
@@ -145,7 +145,7 @@
spawning_types.Add(construction[construction[index]])
spawn_progress_time = 0
use_power = 2
update_use_power(USE_POWER_ACTIVE)
icon_state = "borgcharger1(old)"
else
src.visible_message(fail_message)
@@ -6,7 +6,7 @@
density = 1
idle_power_usage = 50
active_power_usage = 750
use_power = 1
use_power = USE_POWER_IDLE
var/harvesting = 0
var/obj/item/weapon/anobattery/inserted_battery
var/obj/machinery/artifact/cur_artifact
@@ -80,7 +80,7 @@
//check if we've finished
if(inserted_battery.stored_charge >= inserted_battery.capacity)
use_power = 1
update_use_power(USE_POWER_IDLE)
harvesting = 0
cur_artifact.anchored = 0
cur_artifact.being_used = 0
@@ -105,7 +105,7 @@
//if there's no charge left, finish
if(inserted_battery.stored_charge <= 0)
use_power = 1
update_use_power(USE_POWER_IDLE)
inserted_battery.stored_charge = 0
harvesting = 0
if(inserted_battery.battery_effect && inserted_battery.battery_effect.activated)
@@ -191,7 +191,7 @@
if(source_effect)
harvesting = 1
use_power = 2
update_use_power(USE_POWER_ACTIVE)
cur_artifact.anchored = 1
cur_artifact.being_used = 1
icon_state = "incubator_on"
@@ -235,7 +235,7 @@
inserted_battery.battery_effect.ToggleActivate(1)
last_process = world.time
harvesting = -1
use_power = 2
update_use_power(USE_POWER_ACTIVE)
icon_state = "incubator_on"
var/message = "<b>[src]</b> states, \"Warning, battery charge dump commencing.\""
src.visible_message(message)
@@ -6,7 +6,7 @@
icon = 'icons/obj/virology.dmi'
icon_state = "analyser"
use_power = 1 //1 = idle, 2 = active
use_power = USE_POWER_IDLE
idle_power_usage = 20
active_power_usage = 300
@@ -42,7 +42,7 @@
/obj/machinery/xenobio
density = 1
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
var/obj/item/weapon/disk/xenobio/loaded_disk //Currently loaded data disk.
+1 -1
View File
@@ -10,7 +10,7 @@
desc = "Injects biological organisms that are inserted with the contents of an inserted beaker at the command of a remote computer."
density = 1
anchored = 1
use_power = 1
use_power = USE_POWER_IDLE
icon = 'icons/obj/biogenerator.dmi'
icon_state = "biogen-work"
var/mob/living/occupant
@@ -11,7 +11,7 @@
icon_keyboard = "med_key"
icon_screen = "dna"
light_color = "#315ab4"
use_power = 1
use_power = USE_POWER_IDLE
idle_power_usage = 250
active_power_usage = 500
circuit = /obj/item/weapon/circuitboard/xenobio2computer