mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-30 07:28:53 +01:00
Initialize fixing (#17279)
* Initialoize fixing * diff fix * add init grep test * fixed missed ones * . * some more * ,
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
unacidable = TRUE
|
||||
plane = TURF_PLANE
|
||||
layer = ABOVE_TURF_LAYER
|
||||
var/delete_me
|
||||
|
||||
var/health = 15
|
||||
var/obj/effect/alien/weeds/node/linked_node = null
|
||||
@@ -40,7 +41,7 @@
|
||||
|
||||
/obj/effect/alien/weeds/Initialize(mapload, var/node, var/newcolor)
|
||||
. = ..()
|
||||
if(isspace(loc))
|
||||
if(isspace(loc) || delete_me)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
linked_node = node
|
||||
@@ -82,6 +83,9 @@
|
||||
if(existing == src)
|
||||
continue
|
||||
else
|
||||
if(!(existing.flags & ATOM_INITIALIZED))
|
||||
existing.delete_me = TRUE
|
||||
continue
|
||||
qdel(existing)
|
||||
|
||||
linked_node = src
|
||||
|
||||
@@ -11,7 +11,7 @@ GLOBAL_LIST_EMPTY(bump_teleporters)
|
||||
density = TRUE
|
||||
opacity = 0
|
||||
|
||||
/obj/effect/bump_teleporter/Initialize()
|
||||
/obj/effect/bump_teleporter/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.bump_teleporters += src
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
time_to_live = 300
|
||||
pass_flags = PASSTABLE | PASSGRILLE | PASSGLASS //PASSGLASS is fine here, it's just so the visual effect can "flow" around glass
|
||||
|
||||
/obj/effect/effect/smoke/chem/Initialize()
|
||||
/obj/effect/effect/smoke/chem/Initialize(mapload)
|
||||
. = ..()
|
||||
create_reagents(500)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "dirt"
|
||||
|
||||
/obj/effect/decal/cleanable/chemcoating/Initialize()
|
||||
/obj/effect/decal/cleanable/chemcoating/Initialize(mapload)
|
||||
create_reagents(100)
|
||||
. = ..()
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
dries = FALSE // We do this ourselves
|
||||
slips = FALSE
|
||||
|
||||
/obj/effect/effect/foam/firefighting/Initialize()
|
||||
/obj/effect/effect/foam/firefighting/Initialize(mapload)
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
/obj/effect/effect/foam/firefighting/process()
|
||||
if(lifetime-- <= 0)
|
||||
flick("[icon_state]-disolve", src)
|
||||
QDEL_IN(src, 5)
|
||||
QDEL_IN(src, 5)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
mouse_opacity = 0
|
||||
pass_flags = PASSTABLE | PASSGRILLE | PASSBLOB
|
||||
|
||||
/obj/effect/effect/water/Initialize()
|
||||
/obj/effect/effect/water/Initialize(mapload)
|
||||
. = ..()
|
||||
QDEL_IN(src, 15 SECONDS)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon = 'icons/effects/effects_vr.dmi'
|
||||
icon_state = "confetti"
|
||||
|
||||
/obj/effect/effect/sparks/Initialize()
|
||||
/obj/effect/effect/sparks/Initialize(mapload)
|
||||
. = ..()
|
||||
playsound(src, "sounds/items/confetti.ogg ", 100, 1)
|
||||
|
||||
@@ -39,4 +39,4 @@
|
||||
sleep(5)
|
||||
step(confetti,direction)
|
||||
spawn(20)
|
||||
src.total_sparks--
|
||||
src.total_sparks--
|
||||
|
||||
@@ -265,12 +265,12 @@ var/global/list/image/splatter_cache=list()
|
||||
var/list/datum/disease/viruses = list()
|
||||
var/dry = 0 // Keeps the lag down
|
||||
|
||||
/obj/effect/decal/cleanable/mucus/Initialize()
|
||||
/obj/effect/decal/cleanable/mucus/mapped/Initialize(mapload)
|
||||
. = ..()
|
||||
VARSET_IN(src, dry, TRUE, DRYING_TIME * 2)
|
||||
|
||||
//This version should be used for admin spawns and pre-mapped virus vectors (e.g. in PoIs), this version does not dry
|
||||
/obj/effect/decal/cleanable/mucus/mapped/Initialize()
|
||||
/obj/effect/decal/cleanable/mucus/mapped/Initialize(mapload)
|
||||
. = ..()
|
||||
viruses |= new /datum/disease/advance
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
pixel_x = -32
|
||||
pixel_y = 0
|
||||
|
||||
/obj/structure/sign/poster/Initialize()
|
||||
/obj/structure/sign/poster/Initialize(mapload)
|
||||
. = ..()
|
||||
if (poster_type)
|
||||
var/path = text2path(poster_type)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
icon_state = "rolled_poster_nt"
|
||||
poster_type = /obj/structure/sign/poster/nanotrasen
|
||||
|
||||
/obj/item/poster/nanotrasen/Initialize(turf/loc, var/decl/poster/P = null)
|
||||
/obj/item/poster/nanotrasen/Initialize(mapload, var/decl/poster/P = null)
|
||||
if(!ispath(src.poster_decl) && !ispath(P) && !istype(P))
|
||||
src.poster_decl = get_poster_decl(/decl/poster/nanotrasen, FALSE)
|
||||
return ..()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/effect/decal/warning_stripes
|
||||
icon = 'icons/effects/warning_stripes.dmi'
|
||||
|
||||
/obj/effect/decal/warning_stripes/Initialize()
|
||||
/obj/effect/decal/warning_stripes/Initialize(mapload)
|
||||
. = ..()
|
||||
var/turf/T=get_turf(src)
|
||||
var/image/I=image(icon, icon_state = icon_state, dir = dir)
|
||||
|
||||
@@ -102,7 +102,7 @@ steam.start() -- spawns the effect
|
||||
anchored = TRUE
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/effect/sparks/Initialize()
|
||||
/obj/effect/effect/sparks/Initialize(mapload)
|
||||
. = ..()
|
||||
playsound(src, "sparks", 100, 1)
|
||||
var/turf/T = src.loc
|
||||
@@ -179,7 +179,7 @@ steam.start() -- spawns the effect
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
|
||||
/obj/effect/effect/smoke/Initialize()
|
||||
/obj/effect/effect/smoke/Initialize(mapload)
|
||||
. = ..()
|
||||
if(time_to_live)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), src), time_to_live, TIMER_DELETE_ME)
|
||||
@@ -288,7 +288,7 @@ steam.start() -- spawns the effect
|
||||
opacity = FALSE
|
||||
var/strength = 5 // How much damage to do inside each affect()
|
||||
|
||||
/obj/effect/effect/smoke/elemental/Initialize()
|
||||
/obj/effect/effect/smoke/elemental/Initialize(mapload)
|
||||
START_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
anchored = TRUE
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/expl_particles/Initialize()
|
||||
/obj/effect/expl_particles/Initialize(mapload)
|
||||
. = ..()
|
||||
QDEL_IN(src, 1.5 SECONDS)
|
||||
return
|
||||
@@ -41,7 +41,7 @@
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
|
||||
/obj/effect/explosion/Initialize()
|
||||
/obj/effect/explosion/Initialize(mapload)
|
||||
. = ..()
|
||||
QDEL_IN(src, 1 SECOND)
|
||||
return
|
||||
|
||||
@@ -16,7 +16,7 @@ Admin verb is called by code\modules\admin\verbs\event_triggers.dm
|
||||
var/isLoud = FALSE
|
||||
var/isNarrate = FALSE
|
||||
|
||||
/obj/effect/landmark/event_trigger/Initialize()
|
||||
/obj/effect/landmark/event_trigger/Initialize(mapload)
|
||||
. = ..()
|
||||
coordinates = "(X:[loc.x];Y:[loc.y];Z:[loc.z])"
|
||||
|
||||
@@ -89,7 +89,7 @@ Admin verb is called by code\modules\admin\verbs\event_triggers.dm
|
||||
var/isWarning = FALSE //For personal messages
|
||||
isNarrate = TRUE
|
||||
|
||||
/obj/effect/landmark/event_trigger/auto_narrate/Initialize()
|
||||
/obj/effect/landmark/event_trigger/auto_narrate/Initialize(mapload)
|
||||
. = ..()
|
||||
message_range = world.view
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ var/global/list/global_used_pois = list()
|
||||
/obj/effect/landmark/poi_loader/New()
|
||||
INITIALIZE_IMMEDIATE(/obj/effect/landmark/poi_loader)
|
||||
|
||||
/obj/effect/landmark/poi_loader/Initialize()
|
||||
/obj/effect/landmark/poi_loader/Initialize(mapload)
|
||||
src.load_poi()
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
name = "Antag Latespawn"
|
||||
var/antag_id
|
||||
|
||||
/obj/effect/landmark/late_antag/Initialize()
|
||||
/obj/effect/landmark/late_antag/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/antagonist/A = all_antag_types[antag_id]
|
||||
if(istype(A))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "x"
|
||||
unacidable = TRUE//Just to be sure.
|
||||
|
||||
/obj/effect/manifest/Initialize()
|
||||
/obj/effect/manifest/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
invisibility = 101
|
||||
|
||||
@@ -31,7 +31,7 @@ GLOBAL_LIST_EMPTY(all_beam_points)
|
||||
var/beam_type = /obj/effect/ebeam // The type of beam. Default has no special properties. Some others may do things like hurt things touching it.
|
||||
var/beam_sleep_time = 3 // How often the beam updates visually. Suggested to leave this alone, 3 is already fast.
|
||||
|
||||
/obj/effect/map_effect/beam_point/Initialize()
|
||||
/obj/effect/map_effect/beam_point/Initialize(mapload)
|
||||
GLOB.all_beam_points += src
|
||||
if(make_beams_on_init)
|
||||
create_beams()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/effect_cardinals_only = FALSE // If true, effects only move in cardinal directions.
|
||||
var/effect_forced_dir = null // If set, effects emitted will always move in this direction.
|
||||
|
||||
/obj/effect/map_effect/interval/effect_emitter/Initialize()
|
||||
/obj/effect/map_effect/interval/effect_emitter/Initialize(mapload)
|
||||
effect_system = new effect_system_type()
|
||||
effect_system.attach(src)
|
||||
configure_effects()
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
var/interval_lower_bound = 5 SECONDS // Lower number for how often the map_effect will trigger.
|
||||
var/interval_upper_bound = 5 SECONDS // Higher number for above.
|
||||
|
||||
/obj/effect/map_effect/interval/Initialize()
|
||||
/obj/effect/map_effect/interval/Initialize(mapload)
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/effect/map_effect/interval/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
@@ -44,7 +44,7 @@
|
||||
//Not yet!
|
||||
if(world.time < next_attempt)
|
||||
return
|
||||
|
||||
|
||||
// Check to see if we're useful first.
|
||||
if(!always_run && !check_for_player_proximity(src, proximity_needed, ignore_ghosts, ignore_afk))
|
||||
next_attempt = world.time + retry_delay
|
||||
|
||||
@@ -145,7 +145,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
var/portal_id = "test" // For a portal to be made, both the A and B sides need to share the same ID value.
|
||||
var/list/portal_lines = list()
|
||||
|
||||
/obj/effect/map_effect/portal/master/Initialize()
|
||||
/obj/effect/map_effect/portal/master/Initialize(mapload)
|
||||
GLOB.all_portal_masters += src
|
||||
find_lines()
|
||||
..()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "radiation_emitter"
|
||||
var/radiation_power = 30 // Bigger numbers means more radiation.
|
||||
|
||||
/obj/effect/map_effect/radiation_emitter/Initialize()
|
||||
/obj/effect/map_effect/radiation_emitter/Initialize(mapload)
|
||||
START_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
SSradiation.radiate(src, radiation_power)
|
||||
|
||||
/obj/effect/map_effect/radiation_emitter/strong
|
||||
radiation_power = 100
|
||||
radiation_power = 100
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// The trap item will be triggered in some manner when detonating. Default only checks for grenades.
|
||||
var/obj/item/trap = null
|
||||
|
||||
/obj/effect/mine/Initialize()
|
||||
/obj/effect/mine/Initialize(mapload)
|
||||
icon_state = "landmine_armed"
|
||||
wires = new(src)
|
||||
. = ..()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
invisibility = 0
|
||||
var/time_to_die = 10 SECONDS // Afer which, it will delete itself.
|
||||
|
||||
/obj/effect/temporary_effect/Initialize()
|
||||
/obj/effect/temporary_effect/Initialize(mapload)
|
||||
. = ..()
|
||||
if(time_to_die)
|
||||
QDEL_IN(src, time_to_die)
|
||||
@@ -33,7 +33,7 @@
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
|
||||
/obj/effect/temporary_effect/cleave_attack/Initialize() // Makes the slash fade smoothly. When completely transparent it should qdel itself.
|
||||
/obj/effect/temporary_effect/cleave_attack/Initialize(mapload) // Makes the slash fade smoothly. When completely transparent it should qdel itself.
|
||||
. = ..()
|
||||
animate(src, alpha = 0, time = time_to_die - 1)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
time_to_die = 1 SECOND
|
||||
pixel_x = -32
|
||||
|
||||
/obj/effect/temporary_effect/lightning_strike/Initialize()
|
||||
/obj/effect/temporary_effect/lightning_strike/Initialize(mapload)
|
||||
icon_state += "[rand(1,2)]" // To have two variants of lightning sprites.
|
||||
animate(src, alpha = 0, time = time_to_die - 1)
|
||||
. = ..()
|
||||
@@ -114,7 +114,7 @@
|
||||
var/trans_angle
|
||||
var/icon_dist
|
||||
|
||||
/obj/effect/abstract/directional_lighting/Initialize()
|
||||
/obj/effect/abstract/directional_lighting/Initialize(mapload)
|
||||
. = ..()
|
||||
vis_contents += light_spot
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
layer = ABOVE_MOB_LAYER
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/overlay/wallrot/Initialize()
|
||||
/obj/effect/overlay/wallrot/Initialize(mapload)
|
||||
. = ..()
|
||||
pixel_x += rand(-10, 10)
|
||||
pixel_y += rand(-10, 10)
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
var/static/matrix/normal_transform
|
||||
|
||||
/obj/effect/overlay/light_cone/Initialize()
|
||||
/obj/effect/overlay/light_cone/Initialize(mapload)
|
||||
. = ..()
|
||||
apply_standard_transform()
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/portal/Initialize()
|
||||
/obj/effect/portal/Initialize(mapload)
|
||||
. = ..()
|
||||
QDEL_IN(src, 30 SECONDS)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/effect/temporary_effect/eruption/Initialize()
|
||||
/obj/effect/temporary_effect/eruption/Initialize(mapload)
|
||||
. = ..()
|
||||
flick("[icon_state]_create",src)
|
||||
|
||||
@@ -51,4 +51,4 @@
|
||||
L.fire_stacks += 2
|
||||
L.add_modifier(/datum/modifier/fire/stack_managed/intense, 30 SECONDS)
|
||||
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
if(co != null) carbon_amt = co
|
||||
..()
|
||||
|
||||
/obj/effect/spawner/newbomb/Initialize(newloc)
|
||||
..(newloc)
|
||||
/obj/effect/spawner/newbomb/Initialize(mapload)
|
||||
..()
|
||||
var/obj/item/transfer_valve/V = new(src.loc)
|
||||
var/obj/item/tank/phoron/PT = new(V)
|
||||
var/obj/item/tank/oxygen/OT = new(V)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// If the effect's color is not set, it will be chosen at random.
|
||||
var/color_secondary // The hexcode for the desired secondary color of your graffiti. If blank, it will inherit this effect's color.
|
||||
|
||||
/obj/effect/graffitispawner/Initialize()
|
||||
/obj/effect/graffitispawner/Initialize(mapload)
|
||||
..()
|
||||
|
||||
if(!color)
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
/obj/effect/spider/stickyweb
|
||||
icon_state = "stickyweb1"
|
||||
|
||||
/obj/effect/spider/stickyweb/Initialize()
|
||||
/obj/effect/spider/stickyweb/Initialize(mapload)
|
||||
if(prob(50))
|
||||
icon_state = "stickyweb2"
|
||||
return ..()
|
||||
@@ -98,7 +98,7 @@
|
||||
var/spider_type = /obj/effect/spider/spiderling
|
||||
var/faction = FACTION_SPIDERS
|
||||
|
||||
/obj/effect/spider/eggcluster/Initialize()
|
||||
/obj/effect/spider/eggcluster/Initialize(mapload)
|
||||
pixel_x = rand(3,-3)
|
||||
pixel_y = rand(3,-3)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
@@ -173,7 +173,7 @@ GLOBAL_LIST_EMPTY(mapped_autostrips_mob)
|
||||
var/obj/effect/landmark/the_landmark = null
|
||||
var/landmark_id = null
|
||||
|
||||
/obj/effect/step_trigger/teleporter/landmark/Initialize()
|
||||
/obj/effect/step_trigger/teleporter/landmark/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/obj/effect/landmark/teleport_mark/mark in GLOB.tele_landmarks)
|
||||
if(mark.landmark_id == landmark_id)
|
||||
@@ -190,7 +190,7 @@ GLOBAL_LIST_EMPTY(tele_landmarks)
|
||||
/obj/effect/landmark/teleport_mark
|
||||
var/landmark_id = null
|
||||
|
||||
/obj/effect/landmark/teleport_mark/Initialize()
|
||||
/obj/effect/landmark/teleport_mark/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.tele_landmarks += src
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/randomdir = TRUE
|
||||
var/timerid
|
||||
|
||||
/obj/effect/temp_visual/Initialize()
|
||||
/obj/effect/temp_visual/Initialize(mapload)
|
||||
. = ..()
|
||||
if(randomdir)
|
||||
dir = pick(list(NORTH, SOUTH, EAST, WEST))
|
||||
@@ -31,7 +31,7 @@
|
||||
/obj/effect/temp_visual/dir_setting
|
||||
randomdir = FALSE
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/Initialize(loc, set_dir)
|
||||
/obj/effect/temp_visual/dir_setting/Initialize(mapload, set_dir)
|
||||
if(set_dir)
|
||||
dir = set_dir
|
||||
. = ..()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/duration = 10 //in deciseconds
|
||||
var/randomdir = TRUE
|
||||
|
||||
/obj/effect/temp_visual/Initialize()
|
||||
/obj/effect/temp_visual/Initialize(mapload)
|
||||
. = ..()
|
||||
if(randomdir)
|
||||
set_dir(pick(global.cardinal))
|
||||
|
||||
Reference in New Issue
Block a user