From 0201610ace383c2da1023fe09262115e0e82d502 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Wed, 27 Mar 2024 20:39:36 +0300 Subject: [PATCH] [MIRROR] Fix clown PDA not slipping while not worn (#1654) (#2585) * Fix clown PDA not slipping while not worn (#82240) ## About The Pull Request `slipper` can and will be `null` if not worn, so this runtimed. broken for who-knows-how long, probably a year or so. ## Changelog :cl: Melbert fix: Clown PDAs slip people when not worn /:cl: --------- * Fix clown PDA not slipping while not worn --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> --- .../modular_computers/computers/item/role_tablet_presets.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/modular_computers/computers/item/role_tablet_presets.dm b/code/modules/modular_computers/computers/item/role_tablet_presets.dm index 4419c747e9d..18e89765072 100644 --- a/code/modules/modular_computers/computers/item/role_tablet_presets.dm +++ b/code/modules/modular_computers/computers/item/role_tablet_presets.dm @@ -348,8 +348,10 @@ ) AddComponent(/datum/component/wearertargeting/sitcomlaughter, CALLBACK(src, PROC_REF(after_sitcom_laugh))) -/// Return true if our wearer is in a position to slip someone +/// Returns whether the PDA can slip or not, if we have a wearer then check if they are in a position to slip someone. /obj/item/modular_computer/pda/clown/proc/try_slip(mob/living/slipper, mob/living/slippee) + if(isnull(slipper)) + return TRUE if(!istype(slipper.get_item_by_slot(ITEM_SLOT_FEET), /obj/item/clothing/shoes/clown_shoes)) to_chat(slipper,span_warning("[src] failed to slip anyone. Perhaps I shouldn't have abandoned my legacy...")) return FALSE