mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-15 10:04:30 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user