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

🆑 Melbert
fix: Clown PDAs slip people when not worn
/🆑

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
This commit is contained in:
MrMelbert
2024-03-26 20:54:56 -05:00
committed by GitHub
parent 2c335bc2f0
commit bcdf65e5b9

View File

@@ -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