The road to Initialize() stability - Enforcing parent call on New(), Initialize() and Destroy() (#14719)

* The road to Initialize() stability

* Fixes sanity, for now
This commit is contained in:
AffectedArc07
2020-10-28 12:35:36 -04:00
committed by GitHub
parent 997f527f3a
commit 2c37ae8fd0
50 changed files with 102 additions and 59 deletions
+7
View File
@@ -200,6 +200,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
var/obj/effect/hallucination/simple/xeno/xeno = null
/obj/effect/hallucination/xeno_attack/New(loc, mob/living/carbon/T)
. = ..()
target = T
for(var/obj/machinery/atmospherics/unary/vent_pump/U in orange(7,target))
if(!U.welded)
@@ -340,6 +341,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
var/obj/effect/hallucination/simple/singularity/s = null
/obj/effect/hallucination/singularity_scare/New(loc, mob/living/carbon/T)
. = ..()
target = T
var/turf/start = get_turf(T)
var/screen_border = pick(GLOB.cardinal)
@@ -370,6 +372,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/hallucination/battle
/obj/effect/hallucination/battle/New(loc, mob/living/carbon/T)
. = ..()
target = T
var/hits = rand(2,5)
switch(rand(1,5))
@@ -459,6 +462,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
var/list/image/delusions = list()
/obj/effect/hallucination/delusion/New(loc, mob/living/carbon/T, force_kind = null, duration = 300,skip_nearby = 1, custom_icon = null, custom_icon_file = null)
. = ..()
target = T
var/image/A = null
var/kind = force_kind ? force_kind : pick("clown", "corgi", "carp", "skeleton", "demon","zombie")
@@ -707,6 +711,7 @@ GLOBAL_LIST_INIT(non_fakeattack_weapons, list(/obj/item/gun/projectile, /obj/ite
var/list/doors = list()
/obj/effect/hallucination/bolts/New(loc, mob/living/carbon/T, door_number = -1) //-1 for sever 1-2 for subtle
. = ..()
target = T
var/image/I = null
var/count = 0
@@ -731,6 +736,7 @@ GLOBAL_LIST_INIT(non_fakeattack_weapons, list(/obj/item/gun/projectile, /obj/ite
/obj/effect/hallucination/whispers
/obj/effect/hallucination/whispers/New(loc,var/mob/living/carbon/T)
. = ..()
target = T
var/speak_messages = list("I'm watching you...","[target.name]!","Get out!","Kchck-Chkck? Kchchck!","Did you hear that?","What did you do ?","Why?","Give me that!","Honk!","HELP!!", "EI NATH!!", "RUN!!", "Kill me!","O bidai nabora se'sma!")
var/radio_messages = list("Xenos!","Singularity loose!","Comms down!","They are arming the nuke!","They butchered Ian!","H-help!","[pick("Cult", "Wizard", "Ling", "Ops", "Revenant", "Murderer", "Harm", "I hear flashing", "Help")] in [pick(GLOB.teleportlocs)][prob(50)?"!":"!!"]","Where's [target.name]?","Call the shuttle!","AI rogue!!")
@@ -766,6 +772,7 @@ GLOBAL_LIST_INIT(non_fakeattack_weapons, list(/obj/item/gun/projectile, /obj/ite
/obj/effect/hallucination/message
/obj/effect/hallucination/message/New(loc,var/mob/living/carbon/T)
. = ..()
target = T
var/chosen = pick("<span class='userdanger'>The light burns you!</span>",
"<span class='danger'>You don't feel like yourself.</span>",