Convert most of /obj/machinery to use Initialize rather than New (#17845)

* Switch a bunch of /obj/machinery from /New to /Initialize

This is an easy and uncontroversial batch.
No globs, no late init, and stuff.

* Move more machinery to Initialize

This time the ones dealing with GLOB vars,
as well as some simpler ones i missed previously.

* More tricky New -> Initialize migrations

* The last of machinery Initialize conversion

* fixups

* Newscaster armor fix

* styling

* Comment on armor handling

* Move newscaster armor definition back to datum

* farie82 review

* kill extra .=

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

* farie's review part 2

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
moxian
2022-06-29 08:33:52 +02:00
committed by GitHub
co-authored by Farie82
parent 3807bf43c7
commit 09e7f54a43
101 changed files with 410 additions and 453 deletions
@@ -17,8 +17,8 @@
var/mob/living/carbon/occupant = null
var/injecting = 0
/obj/machinery/implantchair/New()
..()
/obj/machinery/implantchair/Initialize(mapload)
. = ..()
add_implants()
+3
View File
@@ -7,6 +7,9 @@
var/in_use = FALSE // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
var/damtype = "brute"
var/force = 0
// You can define armor as a list in datum definition (e.g. `armor = list("fire" = 80, "brute" = 10)`),
// which would be converted to armor datum during initialization.
// Setting `armor` to a list on an *existing* object would inevitably runtime. Use `getArmor()` instead.
var/datum/armor/armor
var/obj_integrity //defaults to max_integrity
var/max_integrity = 500