mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
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:
@@ -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!"
|
||||
|
||||
Reference in New Issue
Block a user