Revert "[MIRROR] /atom New() => Initialize() [MDB IGNORE]"

This commit is contained in:
Novacat
2022-08-27 08:49:56 -04:00
committed by GitHub
parent 0be7af4774
commit 1aa4c73e8d
599 changed files with 3329 additions and 4983 deletions
+2 -2
View File
@@ -15,8 +15,8 @@
var/obj/machinery/power/am_engine/injector/connected_I = null
var/state = STATE_DEFAULT
/obj/machinery/computer/am_engine/Initialize()
. = ..()
/obj/machinery/computer/am_engine/New()
..()
spawn( 24 )
for(var/obj/machinery/power/am_engine/engine/E in world)
if(E.engine_id == src.engine_id)
+2 -2
View File
@@ -29,8 +29,8 @@
var/stored_power = 0//Power to deploy per tick
/obj/machinery/power/am_control_unit/Initialize()
. = ..()
/obj/machinery/power/am_control_unit/New()
..()
linked_shielding = list()
linked_cores = list()
+4 -4
View File
@@ -28,8 +28,8 @@
//injector
/obj/machinery/power/am_engine/injector/Initialize()
. = ..()
/obj/machinery/power/am_engine/injector/New()
..()
spawn( 13 )
var/loc = get_step(src, NORTH)
src.connected = locate(/obj/machinery/power/am_engine/engine, get_step(loc, NORTH))
@@ -72,8 +72,8 @@
//engine
/obj/machinery/power/am_engine/engine/Initialize()
. = ..()
/obj/machinery/power/am_engine/engine/New()
..()
spawn( 7 )
var/loc = get_step(src, SOUTH)
src.connected = locate(/obj/machinery/power/am_engine/injector, get_step(loc, SOUTH))
+6 -3
View File
@@ -26,9 +26,12 @@
var/efficiency = 1//How many cores this core counts for when doing power processing, phoron in the air and stability could affect this
/obj/machinery/am_shielding/Initialize()
. = ..()
addtimer(CALLBACK(src, .proc/controllerscan), 1 SECOND)
/obj/machinery/am_shielding/New(loc)
..(loc)
spawn(10)
controllerscan()
return
/obj/machinery/am_shielding/proc/controllerscan(var/priorscan = 0)
//Make sure we are the only one here
+2 -2
View File
@@ -186,8 +186,8 @@ GLOBAL_LIST_EMPTY(apcs)
return drained_energy
/obj/machinery/power/apc/Initialize(var/ml, var/ndir, var/building=0)
. = ..(ml)
/obj/machinery/power/apc/New(turf/loc, var/ndir, var/building=0)
..()
wires = new(src)
GLOB.apcs += src
+2 -2
View File
@@ -28,8 +28,8 @@
should_be_mapped = TRUE
/obj/machinery/power/smes/batteryrack/Initialize()
. = ..()
/obj/machinery/power/smes/batteryrack/New()
..()
add_parts()
RefreshParts()
+12 -13
View File
@@ -89,8 +89,8 @@ var/list/possible_cable_coil_colours = list(
/obj/structure/cable/white
color = COLOR_WHITE
/obj/structure/cable/Initialize()
. = ..()
/obj/structure/cable/New()
..()
// ensure d1 & d2 reflect the icon_state for entering and exiting cable
@@ -522,9 +522,9 @@ var/list/possible_cable_coil_colours = list(
uses_charge = 1
charge_costs = list(1)
/obj/item/stack/cable_coil/Initialize(var/ml, length = MAXCOIL, var/param_color = null)
. = ..()
amount = length
/obj/item/stack/cable_coil/New(loc, length = MAXCOIL, var/param_color = null)
..()
src.amount = length
if (param_color) // It should be red by default, so only recolor it if parameter was specified.
color = param_color
pixel_x = rand(-2,2)
@@ -819,8 +819,8 @@ var/list/possible_cable_coil_colours = list(
/obj/item/stack/cable_coil/cut
item_state = "coil2"
/obj/item/stack/cable_coil/cut/Initialize()
. = ..()
/obj/item/stack/cable_coil/cut/New(loc)
..()
src.amount = rand(1,2)
pixel_x = rand(-2,2)
pixel_y = rand(-2,2)
@@ -899,16 +899,16 @@ var/list/possible_cable_coil_colours = list(
stacktype = /obj/item/stack/cable_coil
color = COLOR_BROWN
/obj/item/stack/cable_coil/random/Initialize()
/obj/item/stack/cable_coil/random/New()
stacktype = /obj/item/stack/cable_coil
color = pick(COLOR_RED, COLOR_BLUE, COLOR_LIME, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN, COLOR_SILVER, COLOR_GRAY, COLOR_BLACK, COLOR_MAROON, COLOR_OLIVE, COLOR_LIME, COLOR_TEAL, COLOR_NAVY, COLOR_PURPLE, COLOR_BEIGE, COLOR_BROWN)
. = ..()
..()
/obj/item/stack/cable_coil/random_belt/Initialize()
/obj/item/stack/cable_coil/random_belt/New()
stacktype = /obj/item/stack/cable_coil
color = pick(COLOR_RED, COLOR_YELLOW, COLOR_ORANGE)
amount = 30
. = ..()
..()
//Endless alien cable coil
@@ -947,8 +947,7 @@ var/list/possible_cable_coil_colours = list(
stacktype = null
toolspeed = 0.25
/obj/item/stack/cable_coil/alien/Initialize(var/ml, length = MAXCOIL, var/param_color = null) //There has to be a better way to do this.
. = ..()
/obj/item/stack/cable_coil/alien/New(loc, length = MAXCOIL, var/param_color = null) //There has to be a better way to do this.
if(embed_chance == -1) //From /obj/item, don't want to do what the normal cable_coil does
if(sharp)
embed_chance = force/w_class
+2 -2
View File
@@ -34,8 +34,8 @@
var/standard_overlays = TRUE
var/last_overlay_state = null // Used to optimize update_icon() calls.
/obj/item/weapon/cell/Initialize()
. = ..()
/obj/item/weapon/cell/New()
..()
c_uid = cell_uid++
charge = maxcharge
update_icon()
+10 -10
View File
@@ -9,8 +9,8 @@
maxcharge = 500
matter = list(MAT_STEEL = 700, MAT_GLASS = 40)
/obj/item/weapon/cell/crap/empty/Initialize()
. = ..()
/obj/item/weapon/cell/crap/empty/New()
..()
charge = 0
/*
@@ -23,8 +23,8 @@
maxcharge = 600 //600 max charge / 100 charge per shot = six shots
matter = list(MAT_STEEL = 700, MAT_GLASS = 40)
/obj/item/weapon/cell/secborg/empty/Initialize()
. = ..()
/obj/item/weapon/cell/secborg/empty/New()
..()
charge = 0
update_icon()
@@ -48,8 +48,8 @@
maxcharge = 10000
matter = list(MAT_STEEL = 700, MAT_GLASS = 60)
/obj/item/weapon/cell/high/empty/Initialize()
. = ..()
/obj/item/weapon/cell/high/empty/New()
..()
charge = 0
update_icon()
@@ -63,8 +63,8 @@
maxcharge = 20000
matter = list(MAT_STEEL = 700, MAT_GLASS = 70)
/obj/item/weapon/cell/super/empty/Initialize()
. = ..()
/obj/item/weapon/cell/super/empty/New()
..()
charge = 0
update_icon()
@@ -78,8 +78,8 @@
maxcharge = 30000
matter = list(MAT_STEEL = 700, MAT_GLASS = 80)
/obj/item/weapon/cell/hyper/empty/Initialize()
. = ..()
/obj/item/weapon/cell/hyper/empty/New()
..()
charge = 0
update_icon()
@@ -12,8 +12,8 @@
var/obj/machinery/power/fusion_core/cur_viewed_device
var/datum/tgui_module/rustcore_monitor/monitor
/obj/machinery/computer/fusion_core_control/Initialize()
. = ..()
/obj/machinery/computer/fusion_core_control/New()
..()
monitor = new(src)
monitor.core_tag = id_tag
+2 -2
View File
@@ -47,8 +47,8 @@
var/last_range
var/last_power
/obj/effect/fusion_em_field/Initialize(var/ml, var/obj/machinery/power/fusion_core/new_owned_core)
. = ..()
/obj/effect/fusion_em_field/New(loc, var/obj/machinery/power/fusion_core/new_owned_core)
..()
set_light(light_min_range,light_min_power)
last_range = light_min_range
@@ -12,10 +12,10 @@
var/radioactivity = 0
var/const/initial_amount = 3000000
/obj/item/weapon/fuel_assembly/Initialize(var/ml, var/_material, var/_colour)
/obj/item/weapon/fuel_assembly/New(var/newloc, var/_material, var/_colour)
fuel_type = _material
fuel_colour = _colour
. = ..(ml)
..(newloc)
/obj/item/weapon/fuel_assembly/Initialize()
. = ..()
@@ -53,14 +53,14 @@
return ..()
// Mapper shorthand.
/obj/item/weapon/fuel_assembly/deuterium/Initialize(var/ml)
. = ..(ml, "deuterium")
/obj/item/weapon/fuel_assembly/deuterium/New(var/newloc)
..(newloc, "deuterium")
/obj/item/weapon/fuel_assembly/tritium/Initialize(var/ml)
. = ..(ml, "tritium")
/obj/item/weapon/fuel_assembly/tritium/New(var/newloc)
..(newloc, "tritium")
/obj/item/weapon/fuel_assembly/phoron/Initialize(var/ml)
. = ..(ml, MAT_PHORON)
/obj/item/weapon/fuel_assembly/phoron/New(var/newloc)
..(newloc, "phoron")
/obj/item/weapon/fuel_assembly/supermatter/Initialize(var/ml)
. = ..(ml, "supermatter")
/obj/item/weapon/fuel_assembly/supermatter/New(var/newloc)
..(newloc, "supermatter")
@@ -10,8 +10,8 @@
var/scan_range = 25
var/datum/tgui_module/rustfuel_control/monitor
/obj/machinery/computer/fusion_fuel_control/Initialize()
. = ..()
/obj/machinery/computer/fusion_fuel_control/New()
..()
monitor = new(src)
monitor.fuel_tag = id_tag
@@ -11,8 +11,8 @@
var/scan_range = 25
var/datum/tgui_module/gyrotron_control/monitor
/obj/machinery/computer/gyrotron_control/Initialize()
. = ..()
/obj/machinery/computer/gyrotron_control/New()
..()
monitor = new(src)
monitor.gyro_tag = id_tag
monitor.scan_range = scan_range
+11 -10
View File
@@ -35,8 +35,8 @@ var/global/list/light_type_cache = list()
var/cell_connectors = TRUE
/obj/machinery/light_construct/Initialize(var/ml, var/newdir, var/building = 0, var/datum/frame/frame_types/frame_type, var/obj/machinery/light/fixture = null)
. = ..(ml)
/obj/machinery/light_construct/New(var/atom/newloc, var/newdir, var/building = 0, var/datum/frame/frame_types/frame_type, var/obj/machinery/light/fixture = null)
..(newloc)
if(fixture)
fixture_type = fixture.type
fixture.transfer_fingerprints_to(src)
@@ -293,14 +293,15 @@ var/global/list/light_type_cache = list()
var/lamp_shade = 1
overlay_color = LIGHT_COLOR_INCANDESCENT_BULB
/obj/machinery/light/flamp/Initialize(var/ml, obj/machinery/light_construct/construct = null)
. = ..(ml, construct)
/obj/machinery/light/flamp/Initialize(mapload, obj/machinery/light_construct/construct = null)
. = ..()
if(construct)
start_with_cell = FALSE
lamp_shade = 0
update_icon()
else if(start_with_cell && !no_emergency)
cell = new/obj/item/weapon/cell/emergency_light(src)
else
if(start_with_cell && !no_emergency)
cell = new/obj/item/weapon/cell/emergency_light(src)
/obj/machinery/light/flamp/flicker
@@ -326,8 +327,8 @@ var/global/list/light_type_cache = list()
//VOREStation Add End
// create a new lighting fixture
/obj/machinery/light/Initialize(var/ml, obj/machinery/light_construct/construct = null)
. = ..(ml)
/obj/machinery/light/Initialize(mapload, obj/machinery/light_construct/construct = null)
. =..()
if(construct)
start_with_cell = FALSE
@@ -1016,8 +1017,8 @@ var/global/list/light_type_cache = list()
desc = "A broken [name]."
/obj/item/weapon/light/Initialize(var/ml, obj/machinery/light/fixture = null)
. = ..(ml)
/obj/item/weapon/light/New(atom/newloc, obj/machinery/light/fixture = null)
..()
if(fixture)
status = fixture.status
rigged = fixture.rigged
+4 -5
View File
@@ -10,11 +10,6 @@
var/obj/item/weapon/tank/phoron/P = null
var/emagged = 0
var/heat = 0
/obj/machinery/power/port_gen/pacman2/Initialize()
. = ..()
default_apply_parts()
/*
process()
if(P)
@@ -35,6 +30,10 @@
P.air_contents.phoron -= 0.01
return
Initialize()
. = ..()
default_apply_parts()
RefreshParts()
var/temp_rating = 0
for(var/obj/item/weapon/stock_parts/SP in component_parts)
@@ -28,8 +28,8 @@
// Proc: New()
// Parameters: None
// Description: Automatically assigns name according to ID tag.
/obj/machinery/power/sensor/Initialize()
. = ..()
/obj/machinery/power/sensor/New()
..()
auto_set_name()
/obj/machinery/power/sensor/Initialize()
. = ..()
@@ -37,8 +37,8 @@
..()
*/
// On creation automatically connects to active sensors. This is delayed to ensure sensors already exist.
/obj/machinery/computer/power_monitor/Initialize()
. = ..()
/obj/machinery/computer/power_monitor/New()
..()
power_monitor = new(src)
// On user click opens the UI of this computer.
+2 -2
View File
@@ -17,8 +17,8 @@ var/global/list/rad_collectors = list()
var/locked = 0
var/drainratio = 1
/obj/machinery/power/rad_collector/Initialize()
. = ..()
/obj/machinery/power/rad_collector/New()
..()
rad_collectors += src
/obj/machinery/power/rad_collector/Destroy()
@@ -55,8 +55,8 @@ field_generator power level display
return
/obj/machinery/field_generator/Initialize()
. = ..()
/obj/machinery/field_generator/New()
..()
fields = list()
connected_gens = list()
return
@@ -33,10 +33,12 @@
movement_range = 25
energy = 50
/obj/effect/accelerated_particle/Initialize(var/ml, newdir = 2)
. = ..()
set_dir(newdir)
addtimer(CALLBACK(src, .proc/move), 1)
/obj/effect/accelerated_particle/New(loc, dir = 2)
src.loc = loc
src.set_dir(dir)
spawn(0)
move(1)
/obj/effect/accelerated_particle/Bump(atom/A)
if (A)
@@ -21,11 +21,11 @@
var/parts = null
var/datum/wires/particle_acc/control_box/wires = null
/obj/machinery/particle_accelerator/control_box/Initialize()
/obj/machinery/particle_accelerator/control_box/New()
wires = new(src)
connected_parts = list()
update_active_power_usage(initial(active_power_usage) * (strength + 1))
. = ..()
..()
/obj/machinery/particle_accelerator/control_box/Destroy()
if(active)
@@ -31,12 +31,12 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
var/chained = 0//Adminbus chain-grab
/obj/singularity/Initialize(var/ml, var/starting_energy = 50)
/obj/singularity/New(loc, var/starting_energy = 50)
//CARN: admin-alert for chuckle-fuckery.
admin_investigate_setup()
energy = starting_energy
. = ..()
..()
START_PROCESSING(SSobj, src)
for(var/obj/machinery/power/singularity_beacon/singubeacon in machines)
if(singubeacon.active)
-6
View File
@@ -156,12 +156,6 @@ GLOBAL_LIST_EMPTY(solars_list)
broken()
return
/obj/machinery/power/solar/fake/Initialize(mapload, glass_type)
. = ..(mapload, glass_type, 0)
/obj/machinery/power/solar/fake/process()
return PROCESS_KILL
//trace towards SSsun.sun to see if we're in shadow
/obj/machinery/power/solar/proc/occlusion()
@@ -110,8 +110,8 @@
var/datum/looping_sound/supermatter/soundloop
/obj/machinery/power/supermatter/Initialize()
. = ..()
/obj/machinery/power/supermatter/New()
..()
uid = gl_uid++
/obj/machinery/power/supermatter/Initialize()
@@ -539,7 +539,7 @@
icon = 'icons/obj/supermatter.dmi'
icon_state = "darkmatter_broken"
/obj/item/broken_sm/Initialize()
/obj/item/broken_sm/New()
message_admins("Broken SM shard created at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
START_PROCESSING(SSobj, src)
return ..()
+2 -2
View File
@@ -14,8 +14,8 @@
layer = WIRES_LAYER+0.01
/obj/machinery/power/terminal/Initialize()
. = ..()
/obj/machinery/power/terminal/New()
..()
var/turf/T = src.loc
if(level==1) hide(!T.is_plating())
return
+4 -1
View File
@@ -21,9 +21,12 @@
/obj/machinery/power/tesla_coil/pre_mapped
anchored = TRUE
/obj/machinery/power/tesla_coil/New()
..()
wires = new(src)
/obj/machinery/power/tesla_coil/Initialize()
. = ..()
wires = new(src)
default_apply_parts()
/obj/machinery/power/tesla_coil/Destroy()
+5 -2
View File
@@ -23,9 +23,12 @@
var/energy_to_raise = 32
var/energy_to_lower = -20
/obj/singularity/energy_ball/Initialize(var/ml, starting_energy = 50, is_miniball = FALSE)
. = ..()
/obj/singularity/energy_ball/New(loc, starting_energy = 50, is_miniball = FALSE)
..()
miniball = is_miniball
/obj/singularity/energy_ball/Initialize()
. = ..()
if(!miniball)
set_light(10, 7, "#EEEEFF")