From 79f5dc9c3fc48810928f7e660cf2169069c5d1ef Mon Sep 17 00:00:00 2001 From: Casey Date: Thu, 23 Jun 2022 06:35:21 -0400 Subject: [PATCH] Merge pull request #13150 from Heroman3003/runtime-2 Fixes more runtimes --- code/_onclick/hud/hud.dm | 10 +++++++--- code/controllers/subsystems/throwing.dm | 3 +++ .../items/devices/communicator/messaging.dm | 2 +- code/modules/mob/living/silicon/pai/pai_hud.dm | 14 ++++++++------ code/modules/vore/eating/stumblevore_vr.dm | 2 +- 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 6298747901..642ec99c73 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -192,7 +192,7 @@ var/list/global_huds = list( var/icon/ui_style var/ui_color var/ui_alpha - + // TGMC Ammo HUD Port var/list/obj/screen/ammo_hud_list = list() @@ -368,6 +368,9 @@ var/list/global_huds = list( toggle_hud_vis(full) /mob/proc/toggle_hud_vis(full) + if(!client) + return FALSE + if(hud_used.hud_shown) hud_used.hud_shown = 0 if(hud_used.adding) @@ -405,7 +408,8 @@ var/list/global_huds = list( return TRUE /mob/living/carbon/human/toggle_hud_vis(full) - ..() + if(!(. = ..())) + return FALSE // Prevents humans from hiding a few hud elements if(!hud_used.hud_shown) // transitioning to hidden @@ -466,7 +470,7 @@ var/list/global_huds = list( /mob/new_player/add_click_catcher() return - + /* TGMC Ammo HUD Port * These procs call to screen_objects.dm's respective procs. * All these do is manage the amount of huds on screen and set the HUD. diff --git a/code/controllers/subsystems/throwing.dm b/code/controllers/subsystems/throwing.dm index 6c3a799b28..101c71a147 100644 --- a/code/controllers/subsystems/throwing.dm +++ b/code/controllers/subsystems/throwing.dm @@ -145,6 +145,9 @@ SUBSYSTEM_DEF(throwing) AM.Move(step, get_dir(AM, step)) + if (!AM) // Us moving somehow destroyed us? + return + if (!AM.throwing) // we hit something during our move finalize(hit = TRUE) return diff --git a/code/game/objects/items/devices/communicator/messaging.dm b/code/game/objects/items/devices/communicator/messaging.dm index d56ed07c2e..d7ac0e7824 100644 --- a/code/game/objects/items/devices/communicator/messaging.dm +++ b/code/game/objects/items/devices/communicator/messaging.dm @@ -57,7 +57,7 @@ var/who = null if(isobserver(candidate)) var/mob/observer/dead/ghost = candidate - who = ghost + who = ghost.name im_list += list(list("address" = origin_address, "to_address" = exonet.address, "im" = text)) else if(istype(candidate, /obj/item/device/communicator)) var/obj/item/device/communicator/comm = candidate diff --git a/code/modules/mob/living/silicon/pai/pai_hud.dm b/code/modules/mob/living/silicon/pai/pai_hud.dm index aede47e7e1..41f4c5f61b 100644 --- a/code/modules/mob/living/silicon/pai/pai_hud.dm +++ b/code/modules/mob/living/silicon/pai/pai_hud.dm @@ -20,13 +20,13 @@ if("software interface") p.paiInterface() - + if("radio configuration") p.radio.tgui_interact(p) if("pda") p.pda.cmd_pda_open_ui() - + if("communicator") p.communicator.activate() @@ -41,7 +41,7 @@ else p.hud_used.inventory_shown = 1 p.client.screen += p.hud_used.other - + if("directives") p.directives() @@ -53,10 +53,10 @@ if("medical records") p.med_records() - + if("security records") p.sec_records() - + if("remote signaler") p.remote_signal() @@ -364,7 +364,9 @@ pai_fold_display.icon_state = "unfolded" /mob/living/silicon/pai/toggle_hud_vis(full) - + if(!client) + return FALSE + if(hud_used.hud_shown) hud_used.hud_shown = 0 if(hud_used.adding) diff --git a/code/modules/vore/eating/stumblevore_vr.dm b/code/modules/vore/eating/stumblevore_vr.dm index 0928dcccff..7c17c604b3 100644 --- a/code/modules/vore/eating/stumblevore_vr.dm +++ b/code/modules/vore/eating/stumblevore_vr.dm @@ -37,7 +37,7 @@ else if(M.CanStumbleVore(src)) visible_message("[M] flops carlessly into [src]!") perform_the_nom(M,src,M,M.vore_selected,1) - else if(S.species.lightweight == 1) + else if(istype(S) && S.species.lightweight == 1) visible_message("[M] carelessly bowls [src] over!") M.forceMove(get_turf(src)) M.apply_damage(0.5, BRUTE)