From 975d9ed8e3d4e7a723a8000720869c6ec9995d50 Mon Sep 17 00:00:00 2001 From: Contrabang <91113370+Contrabang@users.noreply.github.com> Date: Fri, 15 Nov 2024 06:22:09 -0500 Subject: [PATCH] Fixes a bunch of runtimes (#27363) * hjnbujihbhuji * uioybgyub * Fixes a bunch of crunchy runtimes --- code/_onclick/hud/hud_datum.dm | 6 +++--- code/game/objects/effects/decals/Cleanable/humans.dm | 2 +- code/game/objects/effects/decals/cleanable.dm | 2 +- code/modules/atmospherics/gasmixtures/gas_mixture.dm | 5 +++++ code/modules/mob/living/simple_animal/hostile/hostile.dm | 3 +++ code/modules/mob/mob.dm | 2 ++ 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/code/_onclick/hud/hud_datum.dm b/code/_onclick/hud/hud_datum.dm index 5c3e19c77fd..422c9ac57b9 100644 --- a/code/_onclick/hud/hud_datum.dm +++ b/code/_onclick/hud/hud_datum.dm @@ -227,11 +227,11 @@ if(HUD_STYLE_ACTIONHUD) //No HUD hud_shown = TRUE //Governs behavior of other procs if(static_inventory.len) - mymob.client.screen -= static_inventory + screenmob.client.screen -= static_inventory if(toggleable_inventory.len) - mymob.client.screen -= toggleable_inventory + screenmob.client.screen -= toggleable_inventory if(infodisplay.len) - mymob.client.screen -= infodisplay + screenmob.client.screen -= infodisplay hud_version = display_hud_version persistent_inventory_update(screenmob) diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 0b09e533b47..38a79e45b2f 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -71,7 +71,7 @@ else animate_levitate(src, -1, rand(30,120)) - if(weightless_image.icon_state) + if(weightless_image && weightless_image.icon_state) icon_state = weightless_image.icon_state overlays -= weightless_image diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 47e3693f95f..cf914e6fb03 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -87,10 +87,10 @@ /obj/effect/decal/cleanable/Initialize(mapload) . = ..() + prepare_huds() if(should_merge_decal(loc)) return INITIALIZE_HINT_QDEL var/datum/atom_hud/data/janitor/jani_hud = GLOB.huds[DATA_HUD_JANITOR] - prepare_huds() jani_hud.add_to_hud(src) jani_hud_set_sign() if(random_icon_states && length(src.random_icon_states) > 0) diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index aa1abcaf979..eba569848dd 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -664,6 +664,9 @@ What are the archived variables for? var/total_agent_b = 0 for(var/datum/gas_mixture/G as anything in mixtures) + if(!istype(G)) + stack_trace("share_many_airs had [G] in mixtures ([json_encode(mixtures)])") + continue total_volume += G.volume var/heat_capacity = G.heat_capacity() total_heat_capacity += heat_capacity @@ -685,6 +688,8 @@ What are the archived variables for? //Update individual gas_mixtures by volume ratio for(var/datum/gas_mixture/G as anything in mixtures) + if(!istype(G)) + continue G.private_oxygen = total_oxygen * G.volume / total_volume G.private_nitrogen = total_nitrogen * G.volume / total_volume G.private_toxins = total_toxins * G.volume / total_volume diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index b94de5402a0..ecf791c723c 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -472,6 +472,9 @@ A.attack_animal(src)//Bang on it till we get out /mob/living/simple_animal/hostile/proc/FindHidden() + if(QDELETED(target)) + LoseTarget() + return if(istype(target.loc, /obj/structure/closet) || istype(target.loc, /obj/machinery/disposal) || istype(target.loc, /obj/machinery/sleeper) || istype(target.loc, /obj/machinery/bodyscanner) || istype(target.loc, /obj/machinery/recharge_station)) var/atom/A = target.loc Goto(A,move_to_delay,minimum_distance) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index e2107763158..f5fdfa4bd1c 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -613,6 +613,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(run_examinate), A)) /mob/proc/run_examinate(atom/A) + if(QDELETED(A)) + return if(A.invisibility > see_invisible) A = get_turf(A) if(!has_vision(information_only = TRUE) && !isobserver(src))