mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Postmerge fixes
This commit is contained in:
@@ -258,14 +258,13 @@
|
|||||||
if(istype(cashmoney, /obj/item/weapon/spacecash))
|
if(istype(cashmoney, /obj/item/weapon/spacecash))
|
||||||
|
|
||||||
visible_message("<span class='info'>\The [usr] inserts some cash into \the [src].</span>")
|
visible_message("<span class='info'>\The [usr] inserts some cash into \the [src].</span>")
|
||||||
var/obj/item/weapon/spacecash/bundle/cashmoney_bundle = cashmoney
|
cashmoney.worth -= currently_vending.price
|
||||||
cashmoney_bundle.worth -= currently_vending.price
|
|
||||||
|
|
||||||
if(cashmoney_bundle.worth <= 0)
|
if(cashmoney.worth <= 0)
|
||||||
usr.drop_from_inventory(cashmoney_bundle)
|
usr.drop_from_inventory(cashmoney)
|
||||||
qdel(cashmoney_bundle)
|
qdel(cashmoney)
|
||||||
else
|
else
|
||||||
cashmoney_bundle.update_icon()
|
cashmoney.update_icon()
|
||||||
|
|
||||||
// Vending machines have no idea who paid with cash
|
// Vending machines have no idea who paid with cash
|
||||||
credit_purchase("(cash)")
|
credit_purchase("(cash)")
|
||||||
|
|||||||
@@ -20,15 +20,15 @@
|
|||||||
if(istype(W, /obj/item/weapon/spacecash))
|
if(istype(W, /obj/item/weapon/spacecash))
|
||||||
if(istype(W, /obj/item/weapon/spacecash/ewallet)) return 0
|
if(istype(W, /obj/item/weapon/spacecash/ewallet)) return 0
|
||||||
|
|
||||||
var/obj/item/weapon/spacecash/bundle = W
|
var/obj/item/weapon/spacecash/SC = W
|
||||||
bundle.worth += src.worth
|
SC.worth += src.worth
|
||||||
bundle.update_icon()
|
SC.update_icon()
|
||||||
if(istype(user, /mob/living/carbon/human))
|
if(istype(user, /mob/living/carbon/human))
|
||||||
var/mob/living/carbon/human/h_user = user
|
var/mob/living/carbon/human/h_user = user
|
||||||
h_user.drop_from_inventory(src)
|
h_user.drop_from_inventory(src)
|
||||||
h_user.drop_from_inventory(bundle)
|
h_user.drop_from_inventory(SC)
|
||||||
h_user.put_in_hands(bundle)
|
h_user.put_in_hands(SC)
|
||||||
user << "<span class='notice'>You combine the Thalers to a bundle of [bundle.worth] Thalers.</span>"
|
user << "<span class='notice'>You combine the Thalers to a bundle of [SC.worth] Thalers.</span>"
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
/obj/item/weapon/spacecash/update_icon()
|
/obj/item/weapon/spacecash/update_icon()
|
||||||
@@ -73,10 +73,10 @@
|
|||||||
var/obj/cash = new cashtype (usr.loc)
|
var/obj/cash = new cashtype (usr.loc)
|
||||||
usr.put_in_hands(cash)
|
usr.put_in_hands(cash)
|
||||||
else
|
else
|
||||||
var/obj/item/weapon/spacecash/bundle/bundle = new (usr.loc)
|
var/obj/item/weapon/spacecash/SC = new (usr.loc)
|
||||||
bundle.worth = amount
|
SC.worth = amount
|
||||||
bundle.update_icon()
|
SC.update_icon()
|
||||||
usr.put_in_hands(bundle)
|
usr.put_in_hands(SC)
|
||||||
if(!worth)
|
if(!worth)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/obj/machinery/cash_register
|
/obj/machinery/cash_register
|
||||||
name = "retail scanner"
|
name = "cash register"
|
||||||
desc = "Swipe your ID card to make purchases electronically."
|
desc = "Swipe your ID card to make purchases electronically."
|
||||||
icon = 'icons/obj/stationobjs.dmi'
|
icon = 'icons/obj/stationobjs.dmi'
|
||||||
icon_state = "register_idle"
|
icon_state = "register_idle"
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
// Reset if necessary
|
// Reset if necessary
|
||||||
else if(transaction_amount)
|
else if(transaction_amount)
|
||||||
reset_memory()
|
reset_memory()
|
||||||
user << "<span class='notice'>You reset the memory.</span>"
|
user << "<span class='notice'>You reset the machine's memory.</span>"
|
||||||
else
|
else
|
||||||
custom_interface(user)
|
custom_interface(user)
|
||||||
|
|
||||||
@@ -174,6 +174,11 @@
|
|||||||
usr.visible_message("\icon[src]<span class='warning'>Unable to connect to linked account.</span>")
|
usr.visible_message("\icon[src]<span class='warning'>Unable to connect to linked account.</span>")
|
||||||
return
|
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
|
// Access account for transaction
|
||||||
if(check_account())
|
if(check_account())
|
||||||
var/datum/money_account/D = get_account(I.associated_account_number)
|
var/datum/money_account/D = get_account(I.associated_account_number)
|
||||||
@@ -230,6 +235,11 @@
|
|||||||
if(!confirm(E))
|
if(!confirm(E))
|
||||||
return
|
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
|
// Access account for transaction
|
||||||
if(check_account())
|
if(check_account())
|
||||||
if(transaction_amount > E.worth)
|
if(transaction_amount > E.worth)
|
||||||
@@ -263,6 +273,11 @@
|
|||||||
if(!confirm(SC))
|
if(!confirm(SC))
|
||||||
return
|
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
|
// Access account for transaction
|
||||||
if(check_account())
|
if(check_account())
|
||||||
if(transaction_amount > SC.worth)
|
if(transaction_amount > SC.worth)
|
||||||
@@ -287,6 +302,11 @@
|
|||||||
|
|
||||||
/obj/machinery/cash_register/proc/scan_item_price(obj/O)
|
/obj/machinery/cash_register/proc/scan_item_price(obj/O)
|
||||||
if(!istype(O)) return
|
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
|
// First check if item has a valid price
|
||||||
var/price = O.get_item_cost()
|
var/price = O.get_item_cost()
|
||||||
if(isnull(price))
|
if(isnull(price))
|
||||||
@@ -370,10 +390,12 @@
|
|||||||
usr << "<span class='warning'>The cash box is locked.</span>"
|
usr << "<span class='warning'>The cash box is locked.</span>"
|
||||||
else if(cash_open)
|
else if(cash_open)
|
||||||
cash_open = 0
|
cash_open = 0
|
||||||
|
overlays -= "register_approve"
|
||||||
overlays -= "register_open"
|
overlays -= "register_open"
|
||||||
overlays -= "register_cash"
|
overlays -= "register_cash"
|
||||||
else
|
else
|
||||||
cash_open = 1
|
cash_open = 1
|
||||||
|
overlays += "register_approve"
|
||||||
overlays += "register_open"
|
overlays += "register_open"
|
||||||
if(cash_stored)
|
if(cash_stored)
|
||||||
overlays += "register_cash"
|
overlays += "register_cash"
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
// Claim machine ID
|
// Claim machine ID
|
||||||
/obj/item/device/retail_scanner/New()
|
/obj/item/device/retail_scanner/New()
|
||||||
machine_id = "[station_name()] RETAIL #[num_financial_terminals++]"
|
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
|
// Always face the user when put on a table
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
Reference in New Issue
Block a user