mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
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:
@@ -28,8 +28,8 @@
|
||||
/obj/machinery/chem_dispenser/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/machinery/chem_dispenser/New()
|
||||
..()
|
||||
/obj/machinery/chem_dispenser/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/chem_dispenser(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
@@ -41,8 +41,8 @@
|
||||
RefreshParts()
|
||||
dispensable_reagents = sortList(dispensable_reagents)
|
||||
|
||||
/obj/machinery/chem_dispenser/upgraded/New()
|
||||
..()
|
||||
/obj/machinery/chem_dispenser/upgraded/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/chem_dispenser(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
|
||||
@@ -73,8 +73,8 @@
|
||||
"diethylamine")
|
||||
upgrade_reagents = null
|
||||
|
||||
/obj/machinery/chem_dispenser/mutagensaltpeter/New()
|
||||
..()
|
||||
/obj/machinery/chem_dispenser/mutagensaltpeter/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/chem_dispenser(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/bluespace(null)
|
||||
@@ -346,8 +346,8 @@
|
||||
unhack_message = "You change the mode from 'Pizza King' to 'McNano'."
|
||||
is_drink = TRUE
|
||||
|
||||
/obj/machinery/chem_dispenser/soda/New()
|
||||
..()
|
||||
/obj/machinery/chem_dispenser/soda/Initialize(mapload)
|
||||
. = ..()
|
||||
QDEL_LIST(component_parts)
|
||||
component_parts += new /obj/item/circuitboard/chem_dispenser/soda(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
@@ -358,8 +358,8 @@
|
||||
component_parts += new cell_type(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/chem_dispenser/soda/upgraded/New()
|
||||
..()
|
||||
/obj/machinery/chem_dispenser/soda/upgraded/Initialize(mapload)
|
||||
. = ..()
|
||||
QDEL_LIST(component_parts)
|
||||
component_parts += new /obj/item/circuitboard/chem_dispenser/soda(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
|
||||
@@ -382,8 +382,8 @@
|
||||
unhack_message = "You re-enable the 'nanotrasen-are-cheap-bastards' lock, disabling hidden and very expensive boozes."
|
||||
is_drink = TRUE
|
||||
|
||||
/obj/machinery/chem_dispenser/beer/New()
|
||||
..()
|
||||
/obj/machinery/chem_dispenser/beer/Initialize(mapload)
|
||||
. = ..()
|
||||
QDEL_LIST(component_parts)
|
||||
component_parts += new /obj/item/circuitboard/chem_dispenser/beer(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
@@ -394,8 +394,8 @@
|
||||
component_parts += new cell_type(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/chem_dispenser/beer/upgraded/New()
|
||||
..()
|
||||
/obj/machinery/chem_dispenser/beer/upgraded/Initialize(mapload)
|
||||
. = ..()
|
||||
QDEL_LIST(component_parts)
|
||||
component_parts += new /obj/item/circuitboard/chem_dispenser/beer(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
/// The higher this number, the faster reagents will heat/cool.
|
||||
var/speed_increase = 0
|
||||
|
||||
/obj/machinery/chem_heater/New()
|
||||
..()
|
||||
/obj/machinery/chem_heater/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/chem_heater(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser(null)
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
var/static/list/pill_bottle_wrappers
|
||||
var/static/list/bottle_styles
|
||||
|
||||
/obj/machinery/chem_master/New()
|
||||
..()
|
||||
/obj/machinery/chem_master/Initialize(mapload)
|
||||
. = ..()
|
||||
create_reagents(100)
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/chem_master(null)
|
||||
@@ -547,8 +547,8 @@
|
||||
name = "\improper CondiMaster 3000"
|
||||
condi = TRUE
|
||||
|
||||
/obj/machinery/chem_master/condimaster/New()
|
||||
..()
|
||||
/obj/machinery/chem_master/condimaster/Initialize(mapload)
|
||||
. = ..()
|
||||
QDEL_LIST(component_parts)
|
||||
component_parts += new /obj/item/circuitboard/chem_master/condi_master(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
var/wait = null
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
|
||||
/obj/machinery/computer/pandemic/New()
|
||||
..()
|
||||
/obj/machinery/computer/pandemic/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/pandemic/set_broken()
|
||||
|
||||
@@ -95,8 +95,8 @@
|
||||
icon_state = "juicer0"
|
||||
beaker = null
|
||||
|
||||
/obj/machinery/reagentgrinder/New()
|
||||
..()
|
||||
/obj/machinery/reagentgrinder/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/reagentgrinder(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
|
||||
Reference in New Issue
Block a user