/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

@@ -6,10 +6,10 @@
var/obj/item/device/electronic_assembly/device/EA
/obj/item/device/assembly/electronic_assembly/New()
/obj/item/device/assembly/electronic_assembly/Initialize()
EA = new(src)
EA.holder = src
..()
. = ..()
/obj/item/device/assembly/electronic_assembly/attackby(obj/item/I as obj, mob/user as mob)
if (I.is_crowbar())
@@ -70,8 +70,8 @@
max_complexity = IC_COMPLEXITY_BASE * 3/4
/obj/item/device/electronic_assembly/device/New()
..()
/obj/item/device/electronic_assembly/device/Initialize()
. = ..()
var/obj/item/integrated_circuit/built_in/device_input/input = new(src)
var/obj/item/integrated_circuit/built_in/device_output/output = new(src)
input.assembly = src

View File

@@ -31,14 +31,14 @@ a creative player the means to solve many problems. Circuits are held inside an
/obj/item/integrated_circuit/proc/any_examine(mob/user)
return
/obj/item/integrated_circuit/New()
/obj/item/integrated_circuit/Initialize()
displayed_name = name
if(!size) size = w_class
if(size == -1) size = 0
setup_io(inputs, /datum/integrated_io, inputs_default)
setup_io(outputs, /datum/integrated_io, outputs_default)
setup_io(activators, /datum/integrated_io/activate)
..()
. = ..()
/obj/item/integrated_circuit/proc/on_data_written() //Override this for special behaviour when new data gets pushed to the circuit.
return

View File

@@ -338,8 +338,8 @@
/obj/item/weapon/storage/bag/circuits/mini/arithmetic/all // Don't believe this will ever be needed.
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/arithmetic/New()
..()
/obj/item/weapon/storage/bag/circuits/mini/arithmetic/Initialize()
. = ..()
for(var/obj/item/integrated_circuit/arithmetic/IC in all_integrated_circuits)
if(IC.spawn_flags & spawn_flags_to_use)
for(var/i = 1 to 4)
@@ -355,8 +355,8 @@
/obj/item/weapon/storage/bag/circuits/mini/trig/all // Ditto
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/trig/New()
..()
/obj/item/weapon/storage/bag/circuits/mini/trig/Initialize()
. = ..()
for(var/obj/item/integrated_circuit/trig/IC in all_integrated_circuits)
if(IC.spawn_flags & spawn_flags_to_use)
for(var/i = 1 to 4)
@@ -372,8 +372,8 @@
/obj/item/weapon/storage/bag/circuits/mini/input/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/input/New()
..()
/obj/item/weapon/storage/bag/circuits/mini/input/Initialize()
. = ..()
for(var/obj/item/integrated_circuit/input/IC in all_integrated_circuits)
if(IC.spawn_flags & spawn_flags_to_use)
for(var/i = 1 to 4)
@@ -389,8 +389,8 @@
/obj/item/weapon/storage/bag/circuits/mini/output/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/output/New()
..()
/obj/item/weapon/storage/bag/circuits/mini/output/Initialize()
. = ..()
for(var/obj/item/integrated_circuit/output/IC in all_integrated_circuits)
if(IC.spawn_flags & spawn_flags_to_use)
for(var/i = 1 to 4)
@@ -406,8 +406,8 @@
/obj/item/weapon/storage/bag/circuits/mini/memory/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/memory/New()
..()
/obj/item/weapon/storage/bag/circuits/mini/memory/Initialize()
. = ..()
for(var/obj/item/integrated_circuit/memory/IC in all_integrated_circuits)
if(IC.spawn_flags & spawn_flags_to_use)
for(var/i = 1 to 4)
@@ -423,8 +423,8 @@
/obj/item/weapon/storage/bag/circuits/mini/logic/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/logic/New()
..()
/obj/item/weapon/storage/bag/circuits/mini/logic/Initialize()
. = ..()
for(var/obj/item/integrated_circuit/logic/IC in all_integrated_circuits)
if(IC.spawn_flags & spawn_flags_to_use)
for(var/i = 1 to 4)
@@ -440,8 +440,8 @@
/obj/item/weapon/storage/bag/circuits/mini/time/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/time/New()
..()
/obj/item/weapon/storage/bag/circuits/mini/time/Initialize()
. = ..()
for(var/obj/item/integrated_circuit/time/IC in all_integrated_circuits)
if(IC.spawn_flags & spawn_flags_to_use)
for(var/i = 1 to 4)
@@ -457,8 +457,8 @@
/obj/item/weapon/storage/bag/circuits/mini/reagents/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/reagents/New()
..()
/obj/item/weapon/storage/bag/circuits/mini/reagents/Initialize()
. = ..()
for(var/obj/item/integrated_circuit/reagent/IC in all_integrated_circuits)
if(IC.spawn_flags & spawn_flags_to_use)
for(var/i = 1 to 4)
@@ -474,8 +474,8 @@
/obj/item/weapon/storage/bag/circuits/mini/transfer/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/transfer/New()
..()
/obj/item/weapon/storage/bag/circuits/mini/transfer/Initialize()
. = ..()
for(var/obj/item/integrated_circuit/transfer/IC in all_integrated_circuits)
if(IC.spawn_flags & spawn_flags_to_use)
for(var/i = 1 to 4)
@@ -491,8 +491,8 @@
/obj/item/weapon/storage/bag/circuits/mini/converter/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/converter/New()
..()
/obj/item/weapon/storage/bag/circuits/mini/converter/Initialize()
. = ..()
for(var/obj/item/integrated_circuit/converter/IC in all_integrated_circuits)
if(IC.spawn_flags & spawn_flags_to_use)
for(var/i = 1 to 4)
@@ -507,8 +507,8 @@
/obj/item/weapon/storage/bag/circuits/mini/smart/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/smart/New()
..()
/obj/item/weapon/storage/bag/circuits/mini/smart/Initialize()
. = ..()
for(var/obj/item/integrated_circuit/smart/IC in all_integrated_circuits)
if(IC.spawn_flags & spawn_flags_to_use)
for(var/i = 1 to 4)
@@ -523,8 +523,8 @@
/obj/item/weapon/storage/bag/circuits/mini/manipulation/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/manipulation/New()
..()
/obj/item/weapon/storage/bag/circuits/mini/manipulation/Initialize()
. = ..()
for(var/obj/item/integrated_circuit/manipulation/IC in all_integrated_circuits)
if(IC.spawn_flags & spawn_flags_to_use)
for(var/i = 1 to 4)
@@ -540,8 +540,8 @@
/obj/item/weapon/storage/bag/circuits/mini/power/all
spawn_flags_to_use = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/weapon/storage/bag/circuits/mini/power/New()
..()
/obj/item/weapon/storage/bag/circuits/mini/power/Initialize()
. = ..()
for(var/obj/item/integrated_circuit/passive/power/IC in all_integrated_circuits)
if(IC.spawn_flags & spawn_flags_to_use)
for(var/i = 1 to 4)