Makes COMSIG_MOB_SWAP_HANDS pass the current and previous held items as args (#95055)

## About The Pull Request

Tin, that's all. In a lot of cases you will want to have these,
especially if you are using elements with this signal.

## Why It's Good For The Game

Better code

## Changelog

Not player-facing
This commit is contained in:
Bloop
2026-01-31 16:47:36 -05:00
committed by GitHub
parent a44463ab87
commit 9526ed6e78
5 changed files with 8 additions and 9 deletions
+2 -2
View File
@@ -57,10 +57,10 @@
if (STAGE_PICK_SOMETHING_UP)
show_instruction("Pick something up!")
/datum/tutorial/drop/proc/on_swap_hands()
/datum/tutorial/drop/proc/on_swap_hands(mob/living/source, obj/item/swapped_to, obj/item/swapped_from)
SIGNAL_HANDLER
if (isnull(user.get_active_held_item()))
if (isnull(swapped_to))
if (stage != STAGE_PICK_SOMETHING_UP)
stage = STAGE_PICK_SOMETHING_UP
show_instructions()
@@ -68,14 +68,14 @@
if (STAGE_PICK_UP_ITEM)
show_instruction("Pick something up!")
/datum/tutorial/switch_hands/proc/on_swap_hands()
/datum/tutorial/switch_hands/proc/on_swap_hands(mob/living/source, obj/item/swapped_to, obj/item/swapped_from)
SIGNAL_HANDLER
//FIXME: this checking breaks easily
if (isnull(user.get_active_held_item()))
if (isnull(swapped_to))
stage = STAGE_PICK_UP_ITEM
show_instructions()
else if (isnull(user.get_inactive_held_item()))
else if (isnull(swapped_from))
stage = STAGE_SHOULD_SWAP_HAND
show_instructions()
else