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:
Jalleo
2017-11-12 13:19:23 -06:00
committed by CitadelStationBot
parent ef700ef8d7
commit 300c471da9
7 changed files with 17 additions and 14 deletions
@@ -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