Postmerge fixes

This commit is contained in:
Hubblenaut
2016-02-21 18:00:17 +01:00
parent c22f9b2996
commit 68495d8727
5 changed files with 41 additions and 18 deletions

View File

@@ -20,15 +20,15 @@
if(istype(W, /obj/item/weapon/spacecash))
if(istype(W, /obj/item/weapon/spacecash/ewallet)) return 0
var/obj/item/weapon/spacecash/bundle = W
bundle.worth += src.worth
bundle.update_icon()
var/obj/item/weapon/spacecash/SC = W
SC.worth += src.worth
SC.update_icon()
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/h_user = user
h_user.drop_from_inventory(src)
h_user.drop_from_inventory(bundle)
h_user.put_in_hands(bundle)
user << "<span class='notice'>You combine the Thalers to a bundle of [bundle.worth] Thalers.</span>"
h_user.drop_from_inventory(SC)
h_user.put_in_hands(SC)
user << "<span class='notice'>You combine the Thalers to a bundle of [SC.worth] Thalers.</span>"
qdel(src)
/obj/item/weapon/spacecash/update_icon()
@@ -73,10 +73,10 @@
var/obj/cash = new cashtype (usr.loc)
usr.put_in_hands(cash)
else
var/obj/item/weapon/spacecash/bundle/bundle = new (usr.loc)
bundle.worth = amount
bundle.update_icon()
usr.put_in_hands(bundle)
var/obj/item/weapon/spacecash/SC = new (usr.loc)
SC.worth = amount
SC.update_icon()
usr.put_in_hands(SC)
if(!worth)
qdel(src)

View File

@@ -1,5 +1,5 @@
/obj/machinery/cash_register
name = "retail scanner"
name = "cash register"
desc = "Swipe your ID card to make purchases electronically."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "register_idle"
@@ -49,7 +49,7 @@
// Reset if necessary
else if(transaction_amount)
reset_memory()
user << "<span class='notice'>You reset the memory.</span>"
user << "<span class='notice'>You reset the machine's memory.</span>"
else
custom_interface(user)
@@ -174,6 +174,11 @@
usr.visible_message("\icon[src]<span class='warning'>Unable to connect to linked account.</span>")
return
if (cash_open)
playsound(src, 'sound/machines/buzz-sigh.ogg', 25)
usr << "\icon[src]<span class='warning'>The cash box is open.</span>"
return
// Access account for transaction
if(check_account())
var/datum/money_account/D = get_account(I.associated_account_number)
@@ -230,6 +235,11 @@
if(!confirm(E))
return
if (cash_open)
playsound(src, 'sound/machines/buzz-sigh.ogg', 25)
usr << "\icon[src]<span class='warning'>The cash box is open.</span>"
return
// Access account for transaction
if(check_account())
if(transaction_amount > E.worth)
@@ -263,6 +273,11 @@
if(!confirm(SC))
return
if (cash_open)
playsound(src, 'sound/machines/buzz-sigh.ogg', 25)
usr << "\icon[src]<span class='warning'>The cash box is open.</span>"
return
// Access account for transaction
if(check_account())
if(transaction_amount > SC.worth)
@@ -287,6 +302,11 @@
/obj/machinery/cash_register/proc/scan_item_price(obj/O)
if(!istype(O)) return
if (cash_open)
playsound(src, 'sound/machines/buzz-sigh.ogg', 25)
usr << "\icon[src]<span class='warning'>The cash box is open.</span>"
return
// First check if item has a valid price
var/price = O.get_item_cost()
if(isnull(price))
@@ -370,10 +390,12 @@
usr << "<span class='warning'>The cash box is locked.</span>"
else if(cash_open)
cash_open = 0
overlays -= "register_approve"
overlays -= "register_open"
overlays -= "register_cash"
else
cash_open = 1
overlays += "register_approve"
overlays += "register_open"
if(cash_stored)
overlays += "register_cash"

View File

@@ -22,6 +22,8 @@
// Claim machine ID
/obj/item/device/retail_scanner/New()
machine_id = "[station_name()] RETAIL #[num_financial_terminals++]"
if(locate(/obj/structure/table) in loc)
pixel_y = 3
// Always face the user when put on a table