Stamp papers quickly with a right click (#82993)

## About The Pull Request

Right clicking a paper with a stamp will quickly place down the stamp

## Why It's Good For The Game


![fast](https://github.com/tgstation/tgstation/assets/95130227/de3eab11-e8bf-4266-aab6-97c8434663d7)


## Changelog
🆑
qol: You can now quickly stamp papers with a right click
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
The Sharkening
2024-05-01 19:18:33 -06:00
committed by GitHub
co-authored by MrMelbert
parent ce4880a11d
commit 9975eabef6
+21 -2
View File
@@ -441,8 +441,8 @@
// Handle stamping items.
if(writing_stats["interaction_mode"] == MODE_STAMPING)
if(!user.can_read(src) || user.is_blind())
//The paper's stampable window area is assumed approx 400x500
add_stamp(writing_stats["stamp_class"], rand(0, 400), rand(0, 500), rand(0, 360), writing_stats["stamp_icon_state"])
//The paper's stampable window area is assumed approx 300x400
add_stamp(writing_stats["stamp_class"], rand(0, 300), rand(0, 400), rand(0, 360), writing_stats["stamp_icon_state"])
user.visible_message(span_notice("[user] blindly stamps [src] with \the [attacking_item]!"))
to_chat(user, span_notice("You stamp [src] with \the [attacking_item] the best you can!"))
playsound(src, 'sound/items/handling/standard_stamp.ogg', 50, vary = TRUE)
@@ -454,6 +454,25 @@
ui_interact(user)
return ..()
/// Secondary right click interaction to quickly stamp things
/obj/item/paper/item_interaction_secondary(mob/living/user, obj/item/tool, list/modifiers)
var/list/writing_stats = tool.get_writing_implement_details()
if(!length(writing_stats))
return NONE
if(writing_stats["interaction_mode"] != MODE_STAMPING)
return NONE
if(!user.can_read(src) || user.is_blind()) // Just leftclick instead
return NONE
add_stamp(writing_stats["stamp_class"], rand(1, 300), rand(1, 400), stamp_icon_state = writing_stats["stamp_icon_state"])
user.visible_message(
span_notice("[user] quickly stamps [src] with [tool] without looking."),
span_notice("You quickly stamp [src] with [tool] without looking."),
)
playsound(src, 'sound/items/handling/standard_stamp.ogg', 50, vary = TRUE)
return ITEM_INTERACT_BLOCKING // Stop the UI from opening.
/**
* Attempts to ui_interact the paper to the given user, with some sanity checking
* to make sure the camera still exists via the weakref and that this paper is still