mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +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:
@@ -16,9 +16,10 @@
|
||||
var/lastgenlev = -1
|
||||
var/lastcirc = "00"
|
||||
|
||||
/obj/machinery/power/generator/New()
|
||||
..()
|
||||
/obj/machinery/power/generator/Initialize(mapload)
|
||||
. = ..()
|
||||
update_desc()
|
||||
connect()
|
||||
|
||||
/obj/machinery/power/generator/proc/update_desc()
|
||||
desc = initial(desc) + " Its cold circulator is located on the [dir2text(cold_dir)] side, and its heat circulator is located on the [dir2text(hot_dir)] side."
|
||||
@@ -35,10 +36,6 @@
|
||||
if(powernet)
|
||||
disconnect_from_network()
|
||||
|
||||
/obj/machinery/power/generator/Initialize()
|
||||
..()
|
||||
connect()
|
||||
|
||||
/obj/machinery/power/generator/proc/connect()
|
||||
connect_to_network()
|
||||
|
||||
|
||||
@@ -114,13 +114,11 @@
|
||||
var/temperature = 0 //The current temperature
|
||||
var/overheating = 0 //if this gets high enough the generator explodes
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/Initialize()
|
||||
..()
|
||||
/obj/machinery/power/port_gen/pacman/Initialize(mapload)
|
||||
. = ..()
|
||||
if(anchored)
|
||||
connect_to_network()
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser(null)
|
||||
@@ -130,8 +128,8 @@
|
||||
component_parts += new board_path(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/upgraded/New()
|
||||
..()
|
||||
/obj/machinery/power/port_gen/pacman/upgraded/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
|
||||
@@ -390,8 +388,8 @@
|
||||
time_per_sheet = 576 //same power output, but a 50 sheet stack will last 2 hours at max safe power
|
||||
board_path = /obj/item/circuitboard/pacman/super
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/super/upgraded/New()
|
||||
..()
|
||||
/obj/machinery/power/port_gen/pacman/super/upgraded/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
|
||||
@@ -431,8 +429,8 @@
|
||||
temperature_gain = 90
|
||||
board_path = /obj/item/circuitboard/pacman/mrs
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/mrs/upgraded/New()
|
||||
..()
|
||||
/obj/machinery/power/port_gen/pacman/mrs/upgraded/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
|
||||
|
||||
Reference in New Issue
Block a user