From 2e5b7bc30a3a6fb89f93005233a5e8cdaa43e75f Mon Sep 17 00:00:00 2001 From: Return <110273561+ReturnToZender@users.noreply.github.com> Date: Tue, 26 Aug 2025 10:04:21 -0500 Subject: [PATCH] Misc. runtime fixes (#4545) ## About The Pull Request No player-facing changes This fixes a runtime in donator status code by making it return if there is no prefs.parent This fixes a runtime in emote code by making the code check if the user is living so the variable isn't undefined This fixes a runtime in Skyrat MODsuit code by making the code check if there isn't a wearer ## Why It's Good For The Game I fix ## Proof Of Testing
Screenshots/Videos
## Changelog :cl: ReturnToZender /:cl: --- .../human/MOD_sprite_accessories/mod_accessory_handler.dm | 8 ++++---- modular_skyrat/modules/emotes/code/emotes.dm | 4 ++-- .../modules/player_ranks/code/subsystem/player_ranks.dm | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/MOD_sprite_accessories/mod_accessory_handler.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/MOD_sprite_accessories/mod_accessory_handler.dm index 64b46ed569e..3e6db4d1580 100644 --- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/MOD_sprite_accessories/mod_accessory_handler.dm +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/MOD_sprite_accessories/mod_accessory_handler.dm @@ -7,22 +7,22 @@ return update_external_organs_modsuit_status(is_sealed && active) - wearer.update_body_parts(TRUE) + wearer?.update_body_parts(TRUE) /obj/item/mod/control/control_activation(is_on) . = ..() update_external_organs_modsuit_status(is_on) - wearer.update_body_parts(TRUE) + wearer?.update_body_parts(TRUE) /obj/item/mod/control/deploy(mob/user, obj/item/part, instant = FALSE) . = ..() update_external_organs_modsuit_status(active) - wearer.update_body_parts(TRUE) + wearer?.update_body_parts(TRUE) /obj/item/mod/control/retract(mob/user, obj/item/part, instant = FALSE) . = ..() update_external_organs_modsuit_status(FALSE) - wearer.update_body_parts(TRUE) + wearer?.update_body_parts(TRUE) /// Simple helper proc to force an update of the external organs appearance /// if necessary. diff --git a/modular_skyrat/modules/emotes/code/emotes.dm b/modular_skyrat/modules/emotes/code/emotes.dm index e038723f7bb..44f6e00fa0b 100644 --- a/modular_skyrat/modules/emotes/code/emotes.dm +++ b/modular_skyrat/modules/emotes/code/emotes.dm @@ -258,7 +258,7 @@ 'modular_skyrat/modules/emotes/sound/emotes/clap4.ogg') /datum/emote/living/clap/can_run_emote(mob/living/carbon/user, status_check = TRUE , intentional) - if(user.usable_hands < 2) + if(!istype(user) || user.usable_hands < 2) return FALSE return ..() @@ -276,7 +276,7 @@ 'modular_zubbers/sound/emotes/claponce2.ogg') /datum/emote/living/clap1/can_run_emote(mob/living/carbon/user, status_check = TRUE , intentional) - if(user.usable_hands < 2) + if(!istype(user) || user.usable_hands < 2) return FALSE return ..() diff --git a/modular_skyrat/modules/player_ranks/code/subsystem/player_ranks.dm b/modular_skyrat/modules/player_ranks/code/subsystem/player_ranks.dm index ffeb836dba3..58dbfcae91c 100644 --- a/modular_skyrat/modules/player_ranks/code/subsystem/player_ranks.dm +++ b/modular_skyrat/modules/player_ranks/code/subsystem/player_ranks.dm @@ -118,7 +118,7 @@ SUBSYSTEM_DEF(player_ranks) * * prefs - The preferences datum to check the donator_status eligibility. */ /datum/controller/subsystem/player_ranks/proc/update_prefs_donator_status(datum/preferences/prefs) - if(!prefs) + if(!prefs || !prefs.parent) return prefs.unlock_content = !!prefs.parent.IsByondMember()