mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +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:
@@ -18,8 +18,8 @@
|
||||
var/list/show_categories = list("Food", "Botany Chemicals", "Organic Materials", "Leather and Cloth")
|
||||
var/list/timesFiveCategories = list("Food", "Botany Chemicals", "Organic Materials")
|
||||
|
||||
/obj/machinery/biogenerator/New()
|
||||
..()
|
||||
/obj/machinery/biogenerator/Initialize(mapload)
|
||||
. = ..()
|
||||
files = new /datum/research/biogenerator(src)
|
||||
create_reagents(1000)
|
||||
component_parts = list()
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
var/min_wchance = 67
|
||||
var/min_wrate = 10
|
||||
|
||||
/obj/machinery/plantgenes/New()
|
||||
..()
|
||||
/obj/machinery/plantgenes/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/plantgenes(null)
|
||||
component_parts += new /obj/item/stack/sheet/glass(null)
|
||||
@@ -33,8 +33,8 @@
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/plantgenes/seedvault/New()
|
||||
..()
|
||||
/obj/machinery/plantgenes/seedvault/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/plantgenes/vault(null)
|
||||
component_parts += new /obj/item/stack/sheet/glass(null)
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
var/self_sustaining = FALSE //If the tray generates nutrients and water on its own
|
||||
hud_possible = list (PLANT_NUTRIENT_HUD, PLANT_WATER_HUD, PLANT_STATUS_HUD, PLANT_HEALTH_HUD, PLANT_TOXIN_HUD, PLANT_PEST_HUD, PLANT_WEED_HUD)
|
||||
|
||||
/obj/machinery/hydroponics/New()
|
||||
..()
|
||||
/obj/machinery/hydroponics/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/atom_hud/data/hydroponic/hydro_hud = GLOB.huds[DATA_HUD_HYDROPONIC]
|
||||
prepare_huds()
|
||||
hydro_hud.add_to_hud(src)
|
||||
@@ -50,8 +50,8 @@
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "hydrotray3"
|
||||
|
||||
/obj/machinery/hydroponics/constructable/New()
|
||||
..()
|
||||
/obj/machinery/hydroponics/constructable/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/hydroponics(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
var/max_seeds = 1000
|
||||
var/seed_multiplier = 1
|
||||
|
||||
/obj/machinery/seed_extractor/New()
|
||||
..()
|
||||
/obj/machinery/seed_extractor/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/seed_extractor(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
|
||||
Reference in New Issue
Block a user