Initialize fixing (#17279)

* Initialoize fixing

* diff fix

* add init grep test

* fixed missed ones

* .

* some more

* ,
This commit is contained in:
Kashargul
2025-03-08 13:59:29 -05:00
committed by GitHub
parent 76183beaa5
commit 46bea7cfa2
755 changed files with 1905 additions and 1904 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
var/cell_type = /obj/item/cell/apc
var/cell_number = 3
/obj/machinery/power/smes/batteryrack/mapped/Initialize()
/obj/machinery/power/smes/batteryrack/mapped/Initialize(mapload)
. = ..()
for(var/i = 1 to cell_number)
if(i > max_cells)
+2 -2
View File
@@ -29,7 +29,7 @@
for(var/datum/tgui_module/rcon/R in world)
R.FindDevices()
/obj/machinery/power/breakerbox/Initialize()
/obj/machinery/power/breakerbox/Initialize(mapload)
. = ..()
default_apply_parts()
@@ -37,7 +37,7 @@
icon_state = "bbox_on"
// Enabled on server startup. Used in substations to keep them in bypass mode.
/obj/machinery/power/breakerbox/activated/Initialize()
/obj/machinery/power/breakerbox/activated/Initialize(mapload)
. = ..()
return INITIALIZE_HINT_LATELOAD
+5 -5
View File
@@ -527,7 +527,7 @@ var/list/possible_cable_coil_colours = list(
uses_charge = 1
charge_costs = list(1)
/obj/item/stack/cable_coil/Initialize(ml, length = MAXCOIL, var/param_color = null)
/obj/item/stack/cable_coil/Initialize(mapload, length = MAXCOIL, var/param_color = null)
. = ..()
amount = length
if (param_color) // It should be red by default, so only recolor it if parameter was specified.
@@ -824,7 +824,7 @@ var/list/possible_cable_coil_colours = list(
/obj/item/stack/cable_coil/cut
item_state = "coil2"
/obj/item/stack/cable_coil/cut/Initialize(ml)
/obj/item/stack/cable_coil/cut/Initialize(mapload)
. = ..()
amount = rand(1,2)
pixel_x = rand(-2,2)
@@ -904,12 +904,12 @@ 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/Initialize(mapload)
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/Initialize(mapload)
stacktype = /obj/item/stack/cable_coil
color = pick(COLOR_RED, COLOR_YELLOW, COLOR_ORANGE)
amount = 30
@@ -952,7 +952,7 @@ var/list/possible_cable_coil_colours = list(
stacktype = null
toolspeed = 0.25
/obj/item/stack/cable_coil/alien/Initialize(ml, length = MAXCOIL, var/param_color = null) //There has to be a better way to do this.
/obj/item/stack/cable_coil/alien/Initialize(mapload, 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)
+1 -1
View File
@@ -36,7 +36,7 @@
var/standard_overlays = TRUE
var/last_overlay_state = null // Used to optimize update_icon() calls.
/obj/item/cell/Initialize()
/obj/item/cell/Initialize(mapload)
. = ..()
c_uid = cell_uid++
update_icon()
+2 -2
View File
@@ -202,7 +202,7 @@
/obj/item/cell/emergency_light/update_icon() //No visible charge indicator
return
/obj/item/cell/emergency_light/Initialize()
/obj/item/cell/emergency_light/Initialize(mapload)
. = ..()
var/area/A = get_area(src)
if(!A.lightswitch || !A.light_power)
@@ -222,7 +222,7 @@
var/amount = 100
var/used = FALSE
/obj/item/fbp_backup_cell/Initialize()
/obj/item/fbp_backup_cell/Initialize(mapload)
. = ..()
add_overlay("[icon_state]_100")
+2 -2
View File
@@ -32,7 +32,7 @@ GLOBAL_LIST_EMPTY(fusion_cores)
/obj/machinery/power/fusion_core/mapped
anchored = TRUE
/obj/machinery/power/fusion_core/Initialize()
/obj/machinery/power/fusion_core/Initialize(mapload)
. = ..()
GLOB.fusion_cores += src
@@ -41,7 +41,7 @@ GLOBAL_LIST_EMPTY(fusion_cores)
default_apply_parts()
/obj/machinery/power/fusion_core/mapped/Initialize()
/obj/machinery/power/fusion_core/mapped/Initialize(mapload)
. = ..()
connect_to_network()
@@ -17,7 +17,7 @@
fuel_colour = _colour
..(newloc)
/obj/item/fuel_assembly/Initialize()
/obj/item/fuel_assembly/Initialize(mapload)
. = ..()
var/datum/material/material = get_material_by_name(fuel_type)
if(istype(material))
@@ -8,7 +8,7 @@
circuit = /obj/item/circuitboard/fusion_fuel_compressor
/obj/machinery/fusion_fuel_compressor/Initialize()
/obj/machinery/fusion_fuel_compressor/Initialize(mapload)
. = ..()
default_apply_parts()
@@ -18,7 +18,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
var/injecting = 0
var/obj/item/fuel_assembly/cur_assembly
/obj/machinery/fusion_fuel_injector/Initialize()
/obj/machinery/fusion_fuel_injector/Initialize(mapload)
. = ..()
GLOB.fuel_injectors += src
default_apply_parts()
@@ -21,7 +21,7 @@ GLOBAL_LIST_EMPTY(gyrotrons)
anchored = TRUE
state = 2
/obj/machinery/power/emitter/gyrotron/Initialize()
/obj/machinery/power/emitter/gyrotron/Initialize(mapload)
GLOB.gyrotrons += src
default_apply_parts()
return ..()
+1 -2
View File
@@ -27,7 +27,7 @@ GLOBAL_LIST_EMPTY(all_turbines)
var/lastgenlev = 0
var/datum/looping_sound/generator/soundloop
/obj/machinery/power/generator/Initialize()
/obj/machinery/power/generator/Initialize(mapload)
soundloop = new(list(src), FALSE)
desc = initial(desc) + " Rated for [round(max_power/1000)] kW."
GLOB.all_turbines += src
@@ -289,4 +289,3 @@ GLOBAL_LIST_EMPTY(all_turbines)
sleep(1)
if(i >= limit)
break
+2 -2
View File
@@ -24,11 +24,11 @@
var/effectiverange = 25
// Borrows code from cloning computer
/obj/machinery/computer/gravity_control_computer/Initialize()
/obj/machinery/computer/gravity_control_computer/Initialize(mapload)
. = ..()
updatemodules()
/obj/machinery/gravity_generator/Initialize()
/obj/machinery/gravity_generator/Initialize(mapload)
. = ..()
locatelocalareas()
+2 -2
View File
@@ -93,7 +93,7 @@ GLOBAL_LIST_EMPTY(gravity_generators)
use_power = USE_POWER_ACTIVE
current_overlay = "activated"
/obj/machinery/gravity_generator/main/station/Initialize()
/obj/machinery/gravity_generator/main/station/Initialize(mapload)
. = ..()
setup_parts()
middle.add_overlay("activated")
@@ -127,7 +127,7 @@ GLOBAL_LIST_EMPTY(gravity_generators)
var/list/levels = list()
var/list/areas = list()
/obj/machinery/gravity_generator/main/Initialize()
/obj/machinery/gravity_generator/main/Initialize(mapload)
..()
return INITIALIZE_HINT_LATELOAD
+1 -1
View File
@@ -15,7 +15,7 @@
var/wire_allow_manual_3 = FALSE
var/opened = FALSE
/obj/machinery/power/grid_checker/Initialize()
/obj/machinery/power/grid_checker/Initialize(mapload)
. = ..()
connect_to_network()
update_icon()
+2 -2
View File
@@ -260,13 +260,13 @@
/obj/machinery/light/broken
icon_state = "tube-broken"
/obj/machinery/light/broken/Initialize()
/obj/machinery/light/broken/Initialize(mapload)
. = ..()
broken()
/obj/machinery/light/broken/small
icon_state = "bulb-broken"
/obj/machinery/light/broken/small/Initialize()
/obj/machinery/light/broken/small/Initialize(mapload)
. = ..()
broken()
+1 -1
View File
@@ -126,7 +126,7 @@
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)
. = ..()
default_apply_parts()
if(anchored)
+5 -5
View File
@@ -93,7 +93,7 @@
var/power_gen = 1000 // Enough to power a single APC. 4000 output with T4 capacitor.
var/irradiate = TRUE // RTGs irradiate surroundings, but only when panel is open.
/obj/machinery/power/rtg/Initialize()
/obj/machinery/power/rtg/Initialize(mapload)
. = ..()
if(ispath(circuit))
circuit = new circuit(src)
@@ -251,7 +251,7 @@
/obj/machinery/power/rtg/abductor/built
icon_state = "core"
/obj/machinery/power/rtg/abductor/built/Initialize()
/obj/machinery/power/rtg/abductor/built/Initialize(mapload)
. = ..()
cell = new(src)
RefreshParts()
@@ -265,7 +265,7 @@
/obj/machinery/power/rtg/abductor/hybrid/built
icon_state = "coreb"
/obj/machinery/power/rtg/abductor/hybrid/built/Initialize()
/obj/machinery/power/rtg/abductor/hybrid/built/Initialize(mapload)
. = ..()
cell = new /obj/item/cell/void/hybrid(src)
RefreshParts()
@@ -329,7 +329,7 @@
interact_offline = TRUE
density = FALSE
/obj/machinery/power/rtg/reg/Initialize()
/obj/machinery/power/rtg/reg/Initialize(mapload)
pixel_x = -32
. = ..()
@@ -460,7 +460,7 @@
var/time_per_sheet = 120 //fuel efficiency - how long 1 sheet lasts at power level 1
var/max_sheets = 100 //max capacity of the hopper
/obj/machinery/power/port_gen/large_altevian/Initialize()
/obj/machinery/power/port_gen/large_altevian/Initialize(mapload)
.=..()
if(anchored)
connect_to_network()
+1 -1
View File
@@ -5,7 +5,7 @@
icon_state = "privacy0"
var/nextUse = 0
/obj/structure/privacyswitch/Initialize()
/obj/structure/privacyswitch/Initialize(mapload)
var/area/A = get_area(src)
if(A?.flag_check(AREA_BLOCK_GHOST_SIGHT))
icon_state = "privacy1"
@@ -31,7 +31,7 @@
/obj/machinery/power/sensor/New()
..()
auto_set_name()
/obj/machinery/power/sensor/Initialize()
/obj/machinery/power/sensor/Initialize(mapload)
. = ..()
history["supply"] = list()
history["demand"] = list()
@@ -18,7 +18,7 @@
var/list/shockdirs
var/hasShocked = 0 //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
/obj/machinery/containment_field/Initialize()
/obj/machinery/containment_field/Initialize(mapload)
. = ..()
shockdirs = list(turn(dir,90),turn(dir,-90))
sense_proximity(callback = TYPE_PROC_REF(/atom,HasProximity))
+1 -1
View File
@@ -50,7 +50,7 @@
src.set_dir(turn(src.dir, 90))
return 1
/obj/machinery/power/emitter/Initialize()
/obj/machinery/power/emitter/Initialize(mapload)
. = ..()
if(state == 2 && anchored)
connect_to_network()
+1 -2
View File
@@ -3,7 +3,7 @@
icon_state = "emitter0"
var/previous_state = 0
/obj/machinery/power/emitter/Initialize()
/obj/machinery/power/emitter/Initialize(mapload)
. = ..()
previous_state = state
@@ -35,4 +35,3 @@
icon_state = "emitter_+a"
else
icon_state = "emitter"
@@ -27,7 +27,7 @@
var/max_storage = 3 // How many items can be jammed into it?
var/list/recipes // The list containing the Particle Smasher's recipes.
/obj/machinery/particle_smasher/Initialize()
/obj/machinery/particle_smasher/Initialize(mapload)
. = ..()
storage = list()
update_icon()
+1 -1
View File
@@ -66,7 +66,7 @@ GLOBAL_LIST_EMPTY(smeses)
charge -= smes_amt
return smes_amt / SMESRATE
/obj/machinery/power/smes/Initialize()
/obj/machinery/power/smes/Initialize(mapload)
. = ..()
GLOB.smeses += src
add_nearby_terminals()
+3 -3
View File
@@ -44,14 +44,14 @@
// These are used on individual outposts as backup should power line be cut, or engineering outpost lost power.
// 1M Charge, 150K I/O
/obj/machinery/power/smes/buildable/outpost_substation/Initialize()
/obj/machinery/power/smes/buildable/outpost_substation/Initialize(mapload)
. = ..()
component_parts += new /obj/item/smes_coil/weak(src)
recalc_coils()
// This one is pre-installed on engineering shuttle. Allows rapid charging/discharging for easier transport of power to outpost
// 11M Charge, 2.5M I/O
/obj/machinery/power/smes/buildable/power_shuttle/Initialize()
/obj/machinery/power/smes/buildable/power_shuttle/Initialize(mapload)
. = ..()
component_parts += new /obj/item/smes_coil/super_io(src)
component_parts += new /obj/item/smes_coil/super_io(src)
@@ -59,7 +59,7 @@
recalc_coils()
// Pre-installed and pre-charged SMES hidden from the station, for use in submaps.
/obj/machinery/power/smes/buildable/point_of_interest/Initialize()
/obj/machinery/power/smes/buildable/point_of_interest/Initialize(mapload)
. = ..()
charge = capacity // Should be enough for an individual POI.
RCon = FALSE
+1 -1
View File
@@ -285,7 +285,7 @@ GLOBAL_LIST_EMPTY(solars_list)
/obj/machinery/power/solar_control/config_start
auto_start = SOLAR_AUTO_START_CONFIG
/obj/machinery/power/solar_control/Initialize()
/obj/machinery/power/solar_control/Initialize(mapload)
. = ..()
connect_to_network()
set_panels(cdir)
@@ -113,7 +113,7 @@
..()
uid = gl_uid++
/obj/machinery/power/supermatter/Initialize()
/obj/machinery/power/supermatter/Initialize(mapload)
soundloop = new(list(src), TRUE)
return ..()
+1 -1
View File
@@ -33,7 +33,7 @@
..()
wires = new(src)
/obj/machinery/power/tesla_coil/Initialize()
/obj/machinery/power/tesla_coil/Initialize(mapload)
. = ..()
default_apply_parts()
+1 -1
View File
@@ -27,7 +27,7 @@
..()
miniball = is_miniball
/obj/singularity/energy_ball/Initialize()
/obj/singularity/energy_ball/Initialize(mapload)
. = ..()
if(!miniball)
set_light(10, 7, "#EEEEFF")
+3 -3
View File
@@ -86,7 +86,7 @@
#define COMPFRICTION 5e5
#define COMPSTARTERLOAD 2800
/obj/machinery/compressor/Initialize()
/obj/machinery/compressor/Initialize(mapload)
. = ..()
default_apply_parts()
gas_contained = new()
@@ -194,7 +194,7 @@
#define TURBGENQ 100000
#define TURBGENG 0.8
/obj/machinery/power/turbine/Initialize()
/obj/machinery/power/turbine/Initialize(mapload)
. = ..()
default_apply_parts()
// The outlet is pointed at the direction of the turbine component
@@ -318,7 +318,7 @@
// Turbine Computer
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/obj/machinery/computer/turbine_computer/Initialize()
/obj/machinery/computer/turbine_computer/Initialize(mapload)
..()
return INITIALIZE_HINT_LATELOAD