Refactor of base machinery a tiny bit more. DONE (#32546)
* Moves a base uid from machienry to a bunch of children as it was literally setting a var that most machines never used. This is probably a good candidate for a component replacement. * Just checking something * Does this fix the compiling not working properly? * And this? * What is going wrong ugh! * params["target"] instead of params["set"] bug was there before I even touched it but my compiling of TGUI caused it or something? * Slight tidying up for what Cyberboss and Antur likes. * Fixes the things that I was asked to fix
This commit is contained in:
committed by
CitadelStationBot
parent
ef700ef8d7
commit
300c471da9
@@ -5,6 +5,8 @@
|
||||
device_type = UNARY
|
||||
pipe_flags = PIPING_ONE_PER_TURF
|
||||
construction_type = /obj/item/pipe/directional
|
||||
var/uid
|
||||
var/static/gl_uid = 1
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/SetInitDirections()
|
||||
initialize_directions = dir
|
||||
@@ -16,3 +18,7 @@
|
||||
/obj/machinery/atmospherics/components/unary/hide(intact)
|
||||
update_icon()
|
||||
..(intact)
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/proc/assign_uid_vents()
|
||||
uid = num2text(gl_uid++)
|
||||
return uid
|
||||
@@ -50,8 +50,7 @@
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/New()
|
||||
..()
|
||||
if(!id_tag)
|
||||
assign_uid()
|
||||
id_tag = num2text(uid)
|
||||
id_tag = assign_uid_vents()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/Destroy()
|
||||
var/area/A = get_area(src)
|
||||
|
||||
@@ -38,8 +38,7 @@
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/New()
|
||||
..()
|
||||
if(!id_tag)
|
||||
assign_uid()
|
||||
id_tag = num2text(uid)
|
||||
id_tag = assign_uid_vents()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/on
|
||||
on = TRUE
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
var/enabled = 1 // Set to 0 if the relay was turned off
|
||||
var/dos_failure = 0 // Set to 1 if the relay failed due to (D)DoS attack
|
||||
var/list/dos_sources = list() // Backwards reference for qdel() stuff
|
||||
var/uid
|
||||
var/static/gl_uid = 1
|
||||
|
||||
|
||||
// Denial of Service attack variables
|
||||
var/dos_overload = 0 // Amount of DoS "packets" in this relay's buffer
|
||||
@@ -97,8 +100,7 @@
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/ntnet_relay/Initialize()
|
||||
uid = gl_uid
|
||||
gl_uid++
|
||||
uid = gl_uid++
|
||||
component_parts = list()
|
||||
|
||||
if(GLOB.ntnet_global)
|
||||
|
||||
@@ -120,8 +120,8 @@
|
||||
refresh()
|
||||
return TRUE
|
||||
if("PRG_set")
|
||||
var/newuid = text2num(params["set"])
|
||||
var/newuid = text2num(params["target"])
|
||||
for(var/obj/machinery/power/supermatter_shard/S in supermatters)
|
||||
if(S.uid == newuid)
|
||||
active = S
|
||||
return TRUE
|
||||
return TRUE
|
||||
@@ -63,6 +63,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
|
||||
icon_state = "darkmatter_shard"
|
||||
density = TRUE
|
||||
anchored = FALSE
|
||||
var/uid = 1
|
||||
var/static/gl_uid = 1
|
||||
light_range = 4
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF
|
||||
|
||||
@@ -137,6 +139,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
|
||||
|
||||
/obj/machinery/power/supermatter_shard/Initialize()
|
||||
. = ..()
|
||||
uid = gl_uid++
|
||||
SSair.atmos_machinery += src
|
||||
countdown = new(src)
|
||||
countdown.start()
|
||||
|
||||
Reference in New Issue
Block a user