Handheld EFTPOS offering (#27978)

* Handheld EFTPOS offering

* Apply suggestions from code review

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>

---------

Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
Charlie Nolan
2025-01-24 23:54:36 +00:00
committed by GitHub
co-authored by Burzah
parent 72a06a1d8c
commit a809609e0c
8 changed files with 172 additions and 83 deletions
+23
View File
@@ -140,6 +140,29 @@
/datum/status_effect/high_five/dap/get_missed_message()
return "sadly can't find anybody to give daps to, and daps [owner.p_themselves()]. Shameful."
/datum/status_effect/high_five/offering_eftpos
id = "offering_eftpos"
request = "holds out an EFTPOS device."
item_path = /obj/item/eftpos
/datum/status_effect/high_five/offering_eftpos/get_missed_message()
return "pulls back the EFTPOS device."
/datum/status_effect/high_five/offering_eftpos/on_apply()
owner.custom_emote(EMOTE_VISIBLE, request)
owner.create_point_bubble_from_path(item_path, FALSE)
RegisterSignal(owner, COMSIG_ATOM_RANGED_ATTACKED, PROC_REF(on_ranged_attack))
return TRUE
/datum/status_effect/high_five/offering_eftpos/on_remove()
UnregisterSignal(owner, COMSIG_ATOM_RANGED_ATTACKED)
/datum/status_effect/high_five/offering_eftpos/proc/on_ranged_attack(mob/living/me, mob/living/carbon/human/attacker)
SIGNAL_HANDLER // COMSIG_ATOM_RANGED_ATTACKED
if(get_dist(me, attacker) <= 2)
to_chat(attacker, "<span class='warning'>You need to have your ID in hand to scan it!</span>")
return COMPONENT_CANCEL_ATTACK_CHAIN
/datum/status_effect/high_five/handshake
id = "handshake"
critical_success = "give each other an EPIC handshake!"