mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +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:
@@ -234,7 +234,10 @@
|
||||
return
|
||||
// If it has any of the highfive statuses, dap, handshake, etc
|
||||
var/datum/status_effect/effect = has_status_effect_type(STATUS_EFFECT_HIGHFIVE)
|
||||
if(effect)
|
||||
if(istype(effect, STATUS_EFFECT_OFFERING_EFTPOS))
|
||||
to_chat(M, "<span class='warning'>You need to have your ID in hand to scan it!</span>")
|
||||
return
|
||||
else if(effect)
|
||||
M.apply_status_effect(effect.type)
|
||||
return
|
||||
// BEGIN HUGCODE - N3X
|
||||
|
||||
@@ -404,6 +404,31 @@
|
||||
status = STATUS_EFFECT_DAP
|
||||
key_third_person = "daps"
|
||||
|
||||
/datum/emote/living/carbon/human/highfive/payme
|
||||
key = "payme"
|
||||
status = STATUS_EFFECT_OFFERING_EFTPOS
|
||||
|
||||
/datum/emote/living/carbon/human/highfive/payme/run_emote(mob/living/user, params, type_override, intentional)
|
||||
var/obj/item/eftpos/eftpos = user.is_holding_item_of_type(/obj/item/eftpos)
|
||||
if(!eftpos)
|
||||
to_chat(user, "<span class='warning'>You must be holding an EFTPOS to do that!</span>")
|
||||
return TRUE
|
||||
if(!eftpos.can_offer)
|
||||
to_chat(user, "<span class='warning'>[eftpos] is too bulky to hold out to someone!</span>")
|
||||
return TRUE
|
||||
if(!eftpos.transaction_locked)
|
||||
to_chat(user, "<span class='warning'>You must lock [eftpos] before it can accept payments.</span>")
|
||||
return TRUE
|
||||
if(user.has_status_effect(status))
|
||||
user.visible_message("<span class='notice'>[user.name] shakes [eftpos] around slightly, impatiently waiting for someone to scan their card.</span>")
|
||||
return TRUE
|
||||
|
||||
var/datum/result = set_status(user)
|
||||
if(QDELETED(result))
|
||||
return TRUE
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/emote/living/carbon/human/highfive/handshake
|
||||
key = "handshake"
|
||||
key_third_person = "handshakes"
|
||||
|
||||
Reference in New Issue
Block a user