mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-12 07:35:31 +01:00
/obj/item/weapon/spacecash change to /obj/item/weapon/money
Can now split and stack money properly. Fixes genetics/research access door and also money path changes.
This commit is contained in:
@@ -21,7 +21,7 @@ log transactions
|
||||
/obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(ishuman(user))
|
||||
var/obj/item/weapon/card/id/user_id = src.scan_user(user)
|
||||
if(istype(I,/obj/item/weapon/spacecash))
|
||||
if(istype(I,/obj/item/weapon/money))
|
||||
user_id.money += I:worth
|
||||
del I
|
||||
|
||||
@@ -29,7 +29,7 @@ log transactions
|
||||
if(istype(user, /mob/living/silicon))
|
||||
user << "\red Artificial unit recognized. Artificial units do not currently receive monetary compensation, as per NanoTrasen regulation #1005."
|
||||
return
|
||||
|
||||
|
||||
var/obj/item/weapon/card/id/user_id = src.scan_user(user)
|
||||
if(..())
|
||||
return
|
||||
@@ -51,21 +51,21 @@ log transactions
|
||||
//hueg switch for giving moneh out
|
||||
switch(amount)
|
||||
if(1)
|
||||
new /obj/item/weapon/spacecash(loc)
|
||||
new /obj/item/weapon/money(loc)
|
||||
if(10)
|
||||
new /obj/item/weapon/spacecash/c10(loc)
|
||||
new /obj/item/weapon/money/c10(loc)
|
||||
if(20)
|
||||
new /obj/item/weapon/spacecash/c20(loc)
|
||||
new /obj/item/weapon/money/c20(loc)
|
||||
if(50)
|
||||
new /obj/item/weapon/spacecash/c50(loc)
|
||||
new /obj/item/weapon/money/c50(loc)
|
||||
if(100)
|
||||
new /obj/item/weapon/spacecash/c100(loc)
|
||||
new /obj/item/weapon/money/c100(loc)
|
||||
if(200)
|
||||
new /obj/item/weapon/spacecash/c200(loc)
|
||||
new /obj/item/weapon/money/c200(loc)
|
||||
if(500)
|
||||
new /obj/item/weapon/spacecash/c500(loc)
|
||||
new /obj/item/weapon/money/c500(loc)
|
||||
if(1000)
|
||||
new /obj/item/weapon/spacecash/c1000(loc)
|
||||
new /obj/item/weapon/money/c1000(loc)
|
||||
else
|
||||
usr << browse("You don't have that much money!<br/><a href=\"?src=\ref[src]\">Back</a>","window=atm")
|
||||
return
|
||||
|
||||
@@ -17,13 +17,13 @@ log transactions
|
||||
idle_power_usage = 10
|
||||
var
|
||||
obj/item/weapon/card/id/card
|
||||
obj/item/weapon/spacecash/cashes = list()
|
||||
obj/item/weapon/money/cashes = list()
|
||||
inserted = 0
|
||||
accepted = 0
|
||||
pincode = 0
|
||||
|
||||
attackby(var/obj/A, var/mob/user)
|
||||
if(istype(A,/obj/item/weapon/spacecash))
|
||||
if(istype(A,/obj/item/weapon/money))
|
||||
cashes += A
|
||||
user.drop_item()
|
||||
A.loc = src
|
||||
@@ -100,21 +100,21 @@ log transactions
|
||||
card.money -= amount
|
||||
switch(amount)
|
||||
if(1)
|
||||
new /obj/item/weapon/spacecash(loc)
|
||||
new /obj/item/weapon/money(loc)
|
||||
if(10)
|
||||
new /obj/item/weapon/spacecash/c10(loc)
|
||||
new /obj/item/weapon/money/c10(loc)
|
||||
if(20)
|
||||
new /obj/item/weapon/spacecash/c20(loc)
|
||||
new /obj/item/weapon/money/c20(loc)
|
||||
if(50)
|
||||
new /obj/item/weapon/spacecash/c50(loc)
|
||||
new /obj/item/weapon/money/c50(loc)
|
||||
if(100)
|
||||
new /obj/item/weapon/spacecash/c100(loc)
|
||||
new /obj/item/weapon/money/c100(loc)
|
||||
if(200)
|
||||
new /obj/item/weapon/spacecash/c200(loc)
|
||||
new /obj/item/weapon/money/c200(loc)
|
||||
if(500)
|
||||
new /obj/item/weapon/spacecash/c500(loc)
|
||||
new /obj/item/weapon/money/c500(loc)
|
||||
if(1000)
|
||||
new /obj/item/weapon/spacecash/c1000(loc)
|
||||
new /obj/item/weapon/money/c1000(loc)
|
||||
else
|
||||
user << "\red Error: Insufficient funds."
|
||||
return
|
||||
@@ -143,7 +143,7 @@ log transactions
|
||||
if (usr.machine==src && get_dist(src, usr) <= 1 || istype(usr, /mob/living/silicon/ai))
|
||||
if(href_list["eca"])
|
||||
if(accepted)
|
||||
for(var/obj/item/weapon/spacecash/M in cashes)
|
||||
for(var/obj/item/weapon/money/M in cashes)
|
||||
M.loc = loc
|
||||
inserted = 0
|
||||
if(!cashes)
|
||||
@@ -154,6 +154,8 @@ log transactions
|
||||
if(accepted)
|
||||
card.money += inserted
|
||||
inserted = 0
|
||||
if(cashes)
|
||||
cashes = null
|
||||
if(href_list["lock"])
|
||||
card = null
|
||||
accepted = 0
|
||||
|
||||
Reference in New Issue
Block a user