/atom New() => Initialize() [MDB IGNORE] (#8298)

* Find and replace argless atom New() to Initialize().

* Manual replacement of no-arg New() to Initialize().

* Manually replacing remaining New() overrides.

* Fixing linter issues with now-removed New() args.

* Tidying area init overrides.

* Porting Neb's atom subsystem.

* Trying to isolate init problems.

* Adjusting Init code post-test.

* Merging duplicate Initialize() procs.

* Merge resolution.
This commit is contained in:
MistakeNot4892
2021-11-14 19:09:14 +11:00
committed by GitHub
parent 0051b29ead
commit 2f0a618d45
589 changed files with 2903 additions and 3005 deletions

View File

@@ -2,10 +2,9 @@
// Mostly for debugging table connections
// This file is not #included in the .dme.
/obj/structure/table/debug
New()
material = get_material_by_name("debugium")
..()
/obj/structure/table/debug/Initialize()
material = get_material_by_name("debugium")
. = ..()
/datum/material/debug
name = "debugium"

View File

@@ -3,109 +3,109 @@
icon_state = "plain_preview"
color = "#EEEEEE"
/obj/structure/table/standard/New()
/obj/structure/table/standard/Initialize()
material = get_material_by_name(DEFAULT_TABLE_MATERIAL)
..()
. = ..()
/obj/structure/table/steel
icon_state = "plain_preview"
color = "#666666"
/obj/structure/table/steel/New()
/obj/structure/table/steel/Initialize()
material = get_material_by_name(MAT_STEEL)
..()
. = ..()
/obj/structure/table/marble
icon_state = "stone_preview"
color = "#CCCCCC"
/obj/structure/table/marble/New()
/obj/structure/table/marble/Initialize()
material = get_material_by_name("marble")
..()
. = ..()
/obj/structure/table/reinforced
icon_state = "reinf_preview"
color = "#EEEEEE"
/obj/structure/table/reinforced/New()
/obj/structure/table/reinforced/Initialize()
material = get_material_by_name(DEFAULT_TABLE_MATERIAL)
reinforced = get_material_by_name(MAT_STEEL)
..()
. = ..()
/obj/structure/table/steel_reinforced
icon_state = "reinf_preview"
color = "#666666"
/obj/structure/table/steel_reinforced/New()
/obj/structure/table/steel_reinforced/Initialize()
material = get_material_by_name(MAT_STEEL)
reinforced = get_material_by_name(MAT_STEEL)
..()
. = ..()
/obj/structure/table/wooden_reinforced
icon_state = "reinf_preview"
color = WOOD_COLOR_FURNITURE
/obj/structure/table/wooden_reinforced/New()
/obj/structure/table/wooden_reinforced/Initialize()
material = get_material_by_name("wood")
reinforced = get_material_by_name(MAT_STEEL)
..()
. = ..()
/obj/structure/table/woodentable
icon_state = "plain_preview"
color = WOOD_COLOR_FURNITURE
/obj/structure/table/woodentable/New()
/obj/structure/table/woodentable/Initialize()
material = get_material_by_name("wood")
..()
. = ..()
/obj/structure/table/sifwoodentable //Shouldn't these be blue?
icon_state = "plain_preview"
color = WOOD_COLOR_FURNITURE
/obj/structure/table/sifwoodentable/New()
/obj/structure/table/sifwoodentable/Initialize()
material = get_material_by_name("alien wood")
..()
. = ..()
/obj/structure/table/sifwooden_reinforced
icon_state = "reinf_preview"
color = WOOD_COLOR_FURNITURE
/obj/structure/table/sifwooden_reinforced/New()
/obj/structure/table/sifwooden_reinforced/Initialize()
material = get_material_by_name("alien wood")
reinforced = get_material_by_name(MAT_STEEL)
..()
. = ..()
/obj/structure/table/gamblingtable
icon_state = "gamble_preview"
/obj/structure/table/gamblingtable/New()
/obj/structure/table/gamblingtable/Initialize()
material = get_material_by_name("wood")
carpeted = 1
..()
. = ..()
/obj/structure/table/glass
icon_state = "plain_preview"
color = "#00E1FF"
alpha = 77 // 0.3 * 255
/obj/structure/table/glass/New()
/obj/structure/table/glass/Initialize()
material = get_material_by_name("glass")
..()
. = ..()
/obj/structure/table/holotable
icon_state = "holo_preview"
color = "#EEEEEE"
/obj/structure/table/holotable/New()
/obj/structure/table/holotable/Initialize()
material = get_material_by_name("holo" + DEFAULT_TABLE_MATERIAL)
..()
. = ..()
/obj/structure/table/woodentable/holotable
icon_state = "holo_preview"
/obj/structure/table/woodentable/holotable/New()
/obj/structure/table/woodentable/holotable/Initialize()
material = get_material_by_name("holo" + MAT_WOOD)
..()
. = ..()
/obj/structure/table/alien
name = "alien table"
@@ -114,11 +114,11 @@
can_reinforce = FALSE
can_plate = FALSE
/obj/structure/table/alien/New()
/obj/structure/table/alien/Initialize()
material = get_material_by_name("alium")
verbs -= /obj/structure/table/verb/do_flip
verbs -= /obj/structure/table/proc/do_put
..()
. = ..()
/obj/structure/table/alien/dismantle(obj/item/weapon/tool/wrench/W, mob/user)
to_chat(user, "<span class='warning'>You cannot dismantle \the [src].</span>")
@@ -129,69 +129,69 @@
icon_state = "plain_preview"
color = "#EEEEEE"
/obj/structure/table/bench/standard/New()
/obj/structure/table/bench/standard/Initialize()
material = get_material_by_name(DEFAULT_TABLE_MATERIAL)
..()
. = ..()
/obj/structure/table/bench/steel
icon_state = "plain_preview"
color = "#666666"
/obj/structure/table/bench/steel/New()
/obj/structure/table/bench/steel/Initialize()
material = get_material_by_name(MAT_STEEL)
..()
. = ..()
/obj/structure/table/bench/marble
icon_state = "stone_preview"
color = "#CCCCCC"
/obj/structure/table/bench/marble/New()
/obj/structure/table/bench/marble/Initialize()
material = get_material_by_name("marble")
..()
. = ..()
/*
/obj/structure/table/bench/reinforced
icon_state = "reinf_preview"
color = "#EEEEEE"
/obj/structure/table/bench/reinforced/New()
/obj/structure/table/bench/reinforced/Initialize()
material = get_material_by_name(DEFAULT_TABLE_MATERIAL)
reinforced = get_material_by_name(MAT_STEEL)
..()
. = ..()
/obj/structure/table/bench/steel_reinforced
icon_state = "reinf_preview"
color = "#666666"
/obj/structure/table/bench/steel_reinforced/New()
/obj/structure/table/bench/steel_reinforced/Initialize()
material = get_material_by_name(MAT_STEEL)
reinforced = get_material_by_name(MAT_STEEL)
..()
. = ..()
/obj/structure/table/bench/wooden_reinforced
icon_state = "reinf_preview"
color = "#824B28"
/obj/structure/table/bench/wooden_reinforced/New()
/obj/structure/table/bench/wooden_reinforced/Initialize()
material = get_material_by_name("wood")
reinforced = get_material_by_name(MAT_STEEL)
..()
. = ..()
*/
/obj/structure/table/bench/wooden
icon_state = "plain_preview"
color = WOOD_COLOR_FURNITURE
/obj/structure/table/bench/wooden/New()
/obj/structure/table/bench/wooden/Initialize()
material = get_material_by_name("wood")
..()
. = ..()
/obj/structure/table/bench/sifwooden
icon_state = "plain_preview"
color = WOOD_COLOR_FURNITURE
/obj/structure/table/bench/sifwooden/New()
/obj/structure/table/bench/sifwooden/Initialize()
material = get_material_by_name("alien wood")
..()
. = ..()
/obj/structure/table/bench/sifwooden/padded
icon_state = "padded_preview"
@@ -200,33 +200,33 @@
/obj/structure/table/bench/padded
icon_state = "padded_preview"
/obj/structure/table/bench/padded/New()
/obj/structure/table/bench/padded/Initialize()
material = get_material_by_name(MAT_STEEL)
carpeted = 1
..()
. = ..()
/obj/structure/table/bench/glass
icon_state = "plain_preview"
color = "#00E1FF"
alpha = 77 // 0.3 * 255
/obj/structure/table/bench/glass/New()
/obj/structure/table/bench/glass/Initialize()
material = get_material_by_name("glass")
..()
. = ..()
/*
/obj/structure/table/bench/holotable
icon_state = "holo_preview"
color = "#EEEEEE"
/obj/structure/table/bench/holotable/New()
/obj/structure/table/bench/holotable/Initialize()
material = get_material_by_name("holo[DEFAULT_TABLE_MATERIAL]")
..()
. = ..()
/obj/structure/table/bench/wooden/holotable
icon_state = "holo_preview"
/obj/structure/table/bench/wooden/holotable/New()
/obj/structure/table/bench/wooden/holotable/Initialize()
material = get_material_by_name("holowood")
..()
. = ..()
*/

View File

@@ -7,8 +7,8 @@
can_reinforce = 0
flipped = -1
/obj/structure/table/rack/New()
..()
/obj/structure/table/rack/Initialize()
. = ..()
verbs -= /obj/structure/table/verb/do_flip
verbs -= /obj/structure/table/proc/do_put
@@ -28,9 +28,9 @@
/obj/structure/table/rack/steel
color = "#666666"
/obj/structure/table/rack/steel/New()
/obj/structure/table/rack/steel/Initialize()
material = get_material_by_name(MAT_STEEL)
..()
. = ..()
//Shelves
@@ -42,9 +42,9 @@
/obj/structure/table/rack/shelf/steel
color = "#666666"
/obj/structure/table/rack/shelf/steel/New()
/obj/structure/table/rack/shelf/steel/Initialize()
material = get_material_by_name(MAT_STEEL)
..()
. = ..()
//Gunrack
// SOMEONE should add cool overlay stuff to this
@@ -56,6 +56,6 @@
/obj/structure/table/rack/gun_rack/steel
color = "#666666"
/obj/structure/table/rack/gun_rack/steel/New()
/obj/structure/table/rack/gun_rack/steel/Initialize()
material = get_material_by_name(MAT_STEEL)
..()
. = ..()

View File

@@ -1,20 +0,0 @@
/obj/structure/window/New()
..()
for(var/obj/structure/table/T in view(src, 1))
T.update_connections()
T.update_icon()
/obj/structure/window/Destroy()
var/oldloc = loc
. = ..()
for(var/obj/structure/table/T in view(oldloc, 1))
T.update_connections()
T.update_icon()
/obj/structure/window/Move()
var/oldloc = loc
. = ..()
if(loc != oldloc)
for(var/obj/structure/table/T in view(oldloc, 1) | view(loc, 1))
T.update_connections()
T.update_icon()