From 0be6fd113ab9a1462f3772382cda4be240f12d70 Mon Sep 17 00:00:00 2001 From: RavingManiac Date: Tue, 7 Apr 2015 03:00:51 +1000 Subject: [PATCH] PLayer can now pay vending machines without removing ID from PDA or wallet. Clicking on the vending machine with ID/PDA/wallet/cash also brings up the menu instead of attacking the vending machine. --- code/game/machinery/vending.dm | 28 +++++++++++++++++++++++++--- html/changelog.html | 9 +++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index d5b97e2772..8d9653c36a 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -186,6 +186,22 @@ var/obj/item/weapon/card/id/C = W paid = pay_with_card(C) handled = 1 + else if (istype(W, /obj/item/device/pda)) + var/obj/item/device/pda/C = W + if(C.id) + paid = pay_with_card(C.id,"\improper PDA") + handled = 1 + else + user << "There is no ID in [C]" + return + else if (istype(W, /obj/item/weapon/storage/wallet)) + var/obj/item/weapon/storage/wallet/C = W + if(C.front_id) + paid = pay_with_card(C.front_id,"wallet") + handled = 1 + else + user << "There is no ID in [C]" + return else if (istype(W, /obj/item/weapon/spacecash/ewallet)) var/obj/item/weapon/spacecash/ewallet/C = W paid = pay_with_ewallet(C) @@ -202,7 +218,10 @@ nanomanager.update_uis(src) return // don't smack that machine with your 2 thalers - if (istype(W, /obj/item/weapon/card/emag)) + if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda) || istype(W, /obj/item/weapon/storage/wallet) || istype(W, /obj/item/weapon/spacecash/ewallet) || istype(W, /obj/item/weapon/spacecash)) + attack_hand(user) + return + else if (istype(W, /obj/item/weapon/card/emag)) src.emagged = 1 user << "You short out the product lock on [src]" return @@ -316,8 +335,11 @@ * Takes payment for whatever is the currently_vending item. Returns 1 if * successful, 0 if failed */ -/obj/machinery/vending/proc/pay_with_card(var/obj/item/weapon/card/id/I) - visible_message("[usr] swipes a card through [src].") +/obj/machinery/vending/proc/pay_with_card(var/obj/item/weapon/card/id/I, var/container_name = null) + if(container_name) + visible_message("[usr] swipes \an [container_name] through [src].") + else + visible_message("[usr] swipes a card through [src].") var/datum/money_account/customer_account = get_account(I.associated_account_number) if (!customer_account) src.status_message = "Error: Unable to access account. Please contact technical support if problem persists." diff --git a/html/changelog.html b/html/changelog.html index 11ccdbedce..ddd819f82f 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,15 @@ should be listed in the changelog upon commit though. Thanks. --> +
+

7 April 2015

+

RavingManiac updated:

+ +
+ +

24 February 2015

Zuhayr updated: