Skip to content

Commit

Permalink
add custom payment
Browse files Browse the repository at this point in the history
  • Loading branch information
InsightfulParasite committed Dec 23, 2024
1 parent b032c27 commit d9828fa
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions ModularTegustation/delivery_doors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
/obj/structure/delivery_door/attackby(obj/item/I, mob/user)
var/ordered_item = locate(I) in item_order
if(ordered_item)
Reward(user, I, item_order[ordered_item])
item_order -= ordered_item
Reward(user, I, 30 + rand(-1,20))
return
if(istype(I, /obj/item/delivery_parcel))
// Deliver the item.
Expand All @@ -38,12 +38,13 @@
return TRUE

// Order items that are not safety sealed.
/obj/structure/delivery_door/proc/OrderItems(origin, obj/item/T = /obj/item/food/pizza/margherita)
/obj/structure/delivery_door/proc/OrderItems(origin, obj/item/T = /obj/item/food/pizza/margherita, delivery_payment = 30)
if(!isturf(origin) && !isatom(origin))
return FALSE
item_order = list(T)
item_order += T
item_order[T] = delivery_payment
var/obj/item/paper/P = new (get_turf(origin))
P.setText("<center><b>[address] orders a [initial(T.name)].</b></center>")
P.setText("<br><br><center><b>[address] orders a [initial(T.name)] for [delivery_payment] Ahn.</b></center>")
return TRUE

// Pay the pizzaman
Expand Down Expand Up @@ -79,8 +80,16 @@
icon_state = "pinpointer_syndicate"
custom_price = PAYCHECK_MEDIUM * 4
custom_premium_price = PAYCHECK_MEDIUM * 6
var/coords

/obj/item/pinpointer/cordnate/attack_self(mob/living/user)
/obj/item/pinpointer/coordinate/examine(mob/user)
. = ..()
if(!active || !target)
return
if(coords)
. += coords

/obj/item/pinpointer/coordinate/attack_self(mob/living/user)
if(active)
toggle_on()
user.visible_message(span_notice("[user] deactivates [user.p_their()] pinpointer."), span_notice("You deactivate your pinpointer."))
Expand All @@ -92,5 +101,6 @@
return

target = locate(target_x, target_y, user.z)
coords = "X:[target_x]|Y:[target_y]"
toggle_on()
user.visible_message(span_notice("[user] activates [user.p_their()] pinpointer."), span_notice("You activate your pinpointer."))

0 comments on commit d9828fa

Please sign in to comment.