diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 47433b1fdd..200c6903f1 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -112,8 +112,6 @@ Class Procs: var/power_channel = EQUIP //EQUIP,ENVIRON or LIGHT var/list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames. - var/uid - var/global/gl_uid = 1 var/panel_open = FALSE var/state_open = FALSE var/critical_machine = FALSE //If this machine is critical to station operation and should have the area be excempted from power failures. @@ -302,10 +300,6 @@ Class Procs: /obj/machinery/proc/RefreshParts() //Placeholder proc for machines that are built using frames. return -/obj/machinery/proc/assign_uid() - uid = gl_uid - gl_uid++ - /obj/machinery/proc/default_pry_open(obj/item/crowbar/C) . = !(state_open || panel_open || is_operational() || (flags_1 & NODECONSTRUCT_1)) && istype(C) if(.) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/unary_devices.dm b/code/modules/atmospherics/machinery/components/unary_devices/unary_devices.dm index a335fd2f59..fa46dd445d 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/unary_devices.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/unary_devices.dm @@ -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 \ No newline at end of file diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm index 82482b562f..e3c5130d84 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm @@ -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) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm index 7f74711367..2514afb4e2 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm @@ -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 diff --git a/code/modules/modular_computers/NTNet/NTNet_relay.dm b/code/modules/modular_computers/NTNet/NTNet_relay.dm index b9fcbc0696..cab74df734 100644 --- a/code/modules/modular_computers/NTNet/NTNet_relay.dm +++ b/code/modules/modular_computers/NTNet/NTNet_relay.dm @@ -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) diff --git a/code/modules/modular_computers/file_system/programs/sm_monitor.dm b/code/modules/modular_computers/file_system/programs/sm_monitor.dm index 8e86acb965..ae719c9bc4 100644 --- a/code/modules/modular_computers/file_system/programs/sm_monitor.dm +++ b/code/modules/modular_computers/file_system/programs/sm_monitor.dm @@ -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 \ No newline at end of file diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 7ce459a712..9c5dde8654 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -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()