Merge pull request #16609 from SabreML/GC-fixes-1

GC fix bundle #1
This commit is contained in:
variableundefined
2021-09-06 22:15:44 -05:00
committed by GitHub
15 changed files with 163 additions and 94 deletions
+14 -11
View File
@@ -212,6 +212,20 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
GLOB.shuttle_caller_list += src
..()
/mob/living/silicon/ai/Destroy()
GLOB.ai_list -= src
GLOB.shuttle_caller_list -= src
SSshuttle.autoEvac()
if(malfhacking)
deltimer(malfhacking)
malfhacking = null
QDEL_NULL(eyeobj) // No AI, no Eye
QDEL_NULL(aiPDA)
QDEL_NULL(aiMulti)
QDEL_NULL(aiRadio)
QDEL_NULL(builtInCamera)
return ..()
/mob/living/silicon/ai/proc/on_mob_init()
to_chat(src, "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>")
to_chat(src, "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>")
@@ -314,17 +328,6 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
return TRUE
/mob/living/silicon/ai/Destroy()
GLOB.ai_list -= src
GLOB.shuttle_caller_list -= src
SSshuttle.autoEvac()
QDEL_NULL(eyeobj) // No AI, no Eye
if(malfhacking)
deltimer(malfhacking)
malfhacking = null
malfhack = null
return ..()
/*
The AI Power supply is a dummy object used for powering the AI since only machinery should be using power.
@@ -33,27 +33,16 @@
// break_stuff_probability = 2
faction = list("scarybat")
var/mob/living/owner
gold_core_spawnable = HOSTILE_SPAWN
/mob/living/simple_animal/hostile/scarybat/New(loc, mob/living/L as mob)
..()
/mob/living/simple_animal/hostile/scarybat/Initialize(mapload, mob/living/L)
. = ..()
if(istype(L))
owner = L
faction += "\ref[L]"
/mob/living/simple_animal/hostile/scarybat/Process_Spacemove(check_drift = 0)
return ..() //No drifting in space for space carp! //original comments do not steal
/mob/living/simple_animal/hostile/scarybat/Found(atom/A)//This is here as a potential override to pick a specific target if available
if(istype(A) && A == owner)
return 0
return ..()
/mob/living/simple_animal/hostile/scarybat/CanAttack(atom/the_target)//This is here as a potential override to pick a specific target if available
if(istype(the_target) && the_target == owner)
return 0
return ..()
/mob/living/simple_animal/hostile/scarybat/AttackingTarget()
. =..()
var/mob/living/L = .