[MIRROR] bunch of inits without return and a few easy new to init (#9773)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-01-03 11:06:49 -07:00
committed by GitHub
parent 052034eb7b
commit a3ac1d26d7
71 changed files with 330 additions and 312 deletions

View File

@@ -154,6 +154,7 @@
return
/obj/effect/gateway/active/Initialize()
. = ..()
addtimer(CALLBACK(src, PROC_REF(spawn_and_qdel)), rand(30, 60) SECONDS)
/obj/effect/gateway/active/proc/spawn_and_qdel()

View File

@@ -8,55 +8,70 @@
density = FALSE
anchored = TRUE
/obj/effect/bhole/New()
spawn(4)
controller()
/obj/effect/bhole/Initialize()
. = ..()
addtimer(CALLBACK(src, PROC_REF(controller)), 0.4 SECONDS, TIMER_DELETE_ME)
/obj/effect/bhole/proc/controller()
while(src)
if(!isturf(loc))
qdel(src)
return
if(!isturf(loc))
qdel(src)
return
//DESTROYING STUFF AT THE EPICENTER
for(var/mob/living/M in orange(1,src))
qdel(M)
for(var/obj/O in orange(1,src))
qdel(O)
var/base_turf = get_base_turf_by_area(src)
for(var/turf/simulated/ST in orange(1,src))
if(ST.type == base_turf)
continue
ST.ChangeTurf(base_turf)
addtimer(CALLBACK(src, PROC_REF(pull_1)), 0.6 SECONDS, TIMER_DELETE_ME)
//DESTROYING STUFF AT THE EPICENTER
for(var/mob/living/M in orange(1,src))
qdel(M)
for(var/obj/O in orange(1,src))
qdel(O)
var/base_turf = get_base_turf_by_area(src)
for(var/turf/simulated/ST in orange(1,src))
if(ST.type == base_turf)
continue
ST.ChangeTurf(base_turf)
/obj/effect/bhole/proc/pull_1()
grav(10, 4, 10, 0)
addtimer(CALLBACK(src, PROC_REF(pull_2)), 0.6 SECONDS, TIMER_DELETE_ME)
sleep(6)
grav(10, 4, 10, 0 )
sleep(6)
grav( 8, 4, 10, 0 )
sleep(6)
grav( 9, 4, 10, 0 )
sleep(6)
grav( 7, 3, 40, 1 )
sleep(6)
grav( 5, 3, 40, 1 )
sleep(6)
grav( 6, 3, 40, 1 )
sleep(6)
grav( 4, 2, 50, 6 )
sleep(6)
grav( 3, 2, 50, 6 )
sleep(6)
grav( 2, 2, 75,25 )
sleep(6)
/obj/effect/bhole/proc/pull_2()
grav(8, 4, 10, 0)
addtimer(CALLBACK(src, PROC_REF(pull_3)), 0.6 SECONDS, TIMER_DELETE_ME)
/obj/effect/bhole/proc/pull_3()
grav(9, 4, 10, 0)
addtimer(CALLBACK(src, PROC_REF(pull_4)), 0.6 SECONDS, TIMER_DELETE_ME)
/obj/effect/bhole/proc/pull_4()
grav(7, 3, 40, 1)
addtimer(CALLBACK(src, PROC_REF(pull_5)), 0.6 SECONDS, TIMER_DELETE_ME)
//MOVEMENT
if( prob(50) )
src.anchored = FALSE
step(src,pick(alldirs))
src.anchored = TRUE
/obj/effect/bhole/proc/pull_5()
grav(5, 3, 40, 1)
addtimer(CALLBACK(src, PROC_REF(pull_6)), 0.6 SECONDS, TIMER_DELETE_ME)
/obj/effect/bhole/proc/pull_6()
grav(6, 3, 40, 1)
addtimer(CALLBACK(src, PROC_REF(pull_7)), 0.6 SECONDS, TIMER_DELETE_ME)
/obj/effect/bhole/proc/pull_7()
grav(4, 2, 50, 6)
addtimer(CALLBACK(src, PROC_REF(pull_8)), 0.6 SECONDS, TIMER_DELETE_ME)
/obj/effect/bhole/proc/pull_8()
grav(3, 2, 50, 6)
addtimer(CALLBACK(src, PROC_REF(pull_9)), 0.6 SECONDS, TIMER_DELETE_ME)
/obj/effect/bhole/proc/pull_9()
grav(2, 2, 75,25)
addtimer(CALLBACK(src, PROC_REF(move)), 0.6 SECONDS, TIMER_DELETE_ME)
/obj/effect/bhole/proc/move()
//MOVEMENT
if(prob(50))
anchored = FALSE
step(src, pick(alldirs))
anchored = TRUE
controller()
/obj/effect/bhole/proc/grav(var/r, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
if(!isturf(loc)) //blackhole cannot be contained inside anything. Weird stuff might happen

View File

@@ -11,8 +11,8 @@
var/obj/item/inserted_spell/inserting = null
var/allow_stacking = 0
/obj/item/spell/insert/New()
..()
/obj/item/spell/insert/Initialize()
. = ..()
set_light(spell_light_range, spell_light_intensity, l_color = light_color)
/obj/item/inserted_spell

View File

@@ -9,8 +9,8 @@
var/spell_light_intensity = 2
var/spell_light_range = 3
/obj/item/spell/modifier/New()
..()
/obj/item/spell/modifier/Initialize()
. = ..()
set_light(spell_light_range, spell_light_intensity, l_color = light_color)
/obj/item/spell/modifier/on_melee_cast(atom/hit_atom, mob/user)
@@ -38,4 +38,4 @@
// Technomancer specific subtype which keeps track of spell power and gets targeted specificially by Dispel.
/datum/modifier/technomancer
var/spell_power = null // Set by on_add_modifier.
var/spell_power = null // Set by on_add_modifier.

View File

@@ -15,8 +15,8 @@
cast_methods = CAST_USE
aspect = ASPECT_TELE
/obj/item/spell/phase_shift/New()
..()
/obj/item/spell/phase_shift/Initialize()
. = ..()
set_light(3, 2, l_color = "#FA58F4")
/obj/effect/phase_shift
@@ -28,8 +28,8 @@
/obj/effect/phase_shift/ex_act()
return
/obj/effect/phase_shift/New()
..()
/obj/effect/phase_shift/Initialize()
. = ..()
set_light(3, 5, l_color = "#FA58F4")
START_PROCESSING(SSobj, src)

View File

@@ -18,8 +18,8 @@
adjust_instability(4)
..()
/obj/item/spell/spawner/darkness/New()
..()
/obj/item/spell/spawner/darkness/Initialize()
. = ..()
set_light(6, -20, l_color = "#FFFFFF")
/obj/effect/temporary_effect/darkness
@@ -28,4 +28,4 @@
invisibility = 101
light_range = 6
light_power = -20
light_on = TRUE
light_on = TRUE

View File

@@ -14,8 +14,8 @@
aspect = ASPECT_UNSTABLE
spawner_type = /obj/effect/temporary_effect/destablize
/obj/item/spell/spawner/destablize/New()
..()
/obj/item/spell/spawner/destablize/Initialize()
. = ..()
set_light(3, 2, l_color = "#C26DDE")
/obj/item/spell/spawner/destablize/on_ranged_cast(atom/hit_atom, mob/user)
@@ -51,4 +51,4 @@
var/outgoing_instability = instability_power * ( 1 / (radius**2) )
L.receive_radiated_instability(outgoing_instability)
pulses_remaining--
qdel(src)
qdel(src)

View File

@@ -13,8 +13,8 @@
aspect = ASPECT_EMP
spawner_type = /obj/effect/temporary_effect/pulse/pulsar
/obj/item/spell/spawner/pulsar/New()
..()
/obj/item/spell/spawner/pulsar/Initialize()
. = ..()
set_light(3, 2, l_color = "#2ECCFA")
/obj/item/spell/spawner/pulsar/on_ranged_cast(atom/hit_atom, mob/user)
@@ -44,7 +44,6 @@
. = ..()
/obj/effect/temporary_effect/pulse/proc/pulse_loop()
set waitfor = FALSE
if(pulses_remaining > 0)
pulsetimer = addtimer(CALLBACK(src, PROC_REF(pulse_loop)), pulse_delay, TIMER_STOPPABLE)