mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Machinery: Always use update_use_power()
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user