Fixes a bunch of runtimes (#27363)

* hjnbujihbhuji

* uioybgyub

* Fixes a bunch of crunchy runtimes
This commit is contained in:
Contrabang
2024-11-15 11:22:09 +00:00
committed by GitHub
parent 8e4732922a
commit 975d9ed8e3
6 changed files with 15 additions and 5 deletions
+3 -3
View File
@@ -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)
@@ -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
@@ -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)
@@ -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
@@ -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)
+2
View File
@@ -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))