From caca0f86c3de1a23502ccb10c5fb666373f4f338 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 28 Apr 2022 04:46:48 -0700 Subject: [PATCH] a --- code/modules/ai/ai_holder.dm | 2 +- code/modules/mob/living/carbon/human/death.dm | 5 +++-- code/modules/mob/living/living.dm | 22 +++++++++---------- code/modules/mob/living/silicon/death.dm | 6 ++--- .../modules/mob/living/silicon/robot/death.dm | 16 ++++++++------ code/modules/mob/mob.dm | 2 +- 6 files changed, 27 insertions(+), 26 deletions(-) diff --git a/code/modules/ai/ai_holder.dm b/code/modules/ai/ai_holder.dm index d41a0d5ac42..14b88558068 100644 --- a/code/modules/ai/ai_holder.dm +++ b/code/modules/ai/ai_holder.dm @@ -22,7 +22,7 @@ var/intelligence_level = AI_NORMAL // Adjust to make the AI be intentionally dumber, or make it more robust (e.g. dodging grenades). var/autopilot = FALSE // If true, the AI won't be deactivated if a client gets attached to the AI's mob. var/busy = FALSE // If true, the SSticker will skip processing this mob until this is false. Good for if you need the - // mob to stay still (e.g. delayed attacking). If you need the mob to be inactive for an extended period of time, + // mob to stay still (e.g. delayed attacwking). If you need the mob to be inactive for an extended period of time, // consider sleeping the AI instead. diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 1cf92c2c5d1..5e5822e5cca 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -44,11 +44,12 @@ //mirror should drop on dust if(mirror) mirror.forceMove(drop_location()) + mirror = null if(species) - ..(species.dusted_anim, species.remains_type) + return ..(species.dusted_anim, species.remains_type) else - ..() + return ..() /mob/living/carbon/human/ash() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 9444fb53a15..8738cb818c3 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -42,19 +42,17 @@ buckled.unbuckle_mob(src, TRUE) if(selected_image) QDEL_NULL(selected_image) - if(LAZYLEN(organs)) - organs_by_name.Cut() - while(organs.len) - var/obj/item/OR = organs[1] - organs -= OR - qdel(OR) - if(LAZYLEN(internal_organs)) - internal_organs_by_name.Cut() - while(internal_organs.len) - var/obj/item/OR = internal_organs[1] - internal_organs -= OR - qdel(OR) + organs_by_name = null + internal_organs_by_name = null + for(var/obj/item/organ/O in organs) + if(!QDELETED(O)) + qdel(O) + organs = null + for(var/obj/item/organ/O in internal_organs) + if(!QDELETED(O)) + qdel(O) + internal_organs = null return ..() //mob verbs are faster than object verbs. See mob/verb/examine. diff --git a/code/modules/mob/living/silicon/death.dm b/code/modules/mob/living/silicon/death.dm index 33092e96c16..70876cb13c5 100644 --- a/code/modules/mob/living/silicon/death.dm +++ b/code/modules/mob/living/silicon/death.dm @@ -1,12 +1,12 @@ /mob/living/silicon/gib() - ..("gibbed-r") + . = ..("gibbed-r") gibs(loc, null, /obj/effect/gibspawner/robot) /mob/living/silicon/dust() - ..("dust-r", /obj/effect/decal/remains/robot) + return ..("dust-r", /obj/effect/decal/remains/robot) /mob/living/silicon/ash() - ..("dust-r") + return ..("dust-r") /mob/living/silicon/death(gibbed,deathmessage) if(in_contents_of(/obj/machinery/recharge_station))//exit the recharge station diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm index eceacfec5a9..dc5f65fe3a3 100644 --- a/code/modules/mob/living/silicon/robot/death.dm +++ b/code/modules/mob/living/silicon/robot/death.dm @@ -1,22 +1,24 @@ /mob/living/silicon/robot/dust() //Delete the MMI first so that it won't go popping out. if(mmi) - qdel(mmi) - ..() + QDEL_NULL(mmi) + return ..() /mob/living/silicon/robot/ash() if(mmi) - qdel(mmi) - ..() + QDEL_NULL(mmi) + return ..() /mob/living/silicon/robot/death(gibbed) if(camera) camera.status = 0 if(module) var/obj/item/gripper/G = locate(/obj/item/gripper) in module - if(G) G.drop_item() + if(G) + G.drop_item() var/obj/item/dogborg/sleeper/S = locate(/obj/item/dogborg/sleeper) in module //VOREStation edit. - if(S) S.go_out() //VOREStation edit. + if(S) + S.go_out() //VOREStation edit. remove_robot_verbs() sql_report_cyborg_death(src) - ..(gibbed,"shudders violently for a moment, then becomes motionless, its eyes slowly darkening.") + return ..(gibbed, "shudders violently for a moment, then becomes motionless, its eyes slowly darkening.") diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index a2c62c3f1f5..7bd22831738 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -59,7 +59,7 @@ living_mob_list -= src unset_machine() if(hud_used) - qdel(hud_used) + QDEL_NULL(hud_used) dispose_rendering() if(client) for(var/atom/movable/screen/movable/spell_master/spell_master in spell_masters)