mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-05 15:02:56 +00:00
New money sprites (#7576)
This commit is contained in:
@@ -79,7 +79,7 @@ They sell generic supplies and ask for generic supplies.
|
||||
/obj/item/storage/bag/ore/drone = TRADER_BLACKLIST, // don't want drone bags
|
||||
/obj/item/storage/bag/sheetsnatcher/borg = TRADER_BLACKLIST, // don't want borg bags
|
||||
/obj/item/storage/bag/circuits = TRADER_BLACKLIST_ALL, //can spawn glitchy circuit boxes, circuitry should belong to science
|
||||
/obj/item/storage/bag/cash = TRADER_BLACKLIST, // spawns with money
|
||||
/obj/item/storage/bag/money = TRADER_BLACKLIST, // spawns with money
|
||||
/obj/item/storage/backpack = TRADER_ALL,
|
||||
/obj/item/storage/backpack/cultpack = TRADER_BLACKLIST, // cult stuff
|
||||
/obj/item/storage/backpack/holding = TRADER_BLACKLIST_ALL, // research stuff
|
||||
|
||||
@@ -507,7 +507,7 @@ datum/objective/steal
|
||||
return found_amount>=target_amount
|
||||
|
||||
if("50 coins (in bag)")
|
||||
var/obj/item/moneybag/B = locate() in all_items
|
||||
var/obj/item/storage/bag/money/B = locate() in all_items
|
||||
|
||||
if(B)
|
||||
var/target = text2num(target_name)
|
||||
|
||||
@@ -159,9 +159,9 @@
|
||||
emag = 0
|
||||
),
|
||||
"cash" = list(
|
||||
name = "Cash Bag",
|
||||
name = "Money Bag",
|
||||
class = "Items",
|
||||
object = /obj/item/storage/bag/cash,
|
||||
object = /obj/item/storage/bag/money,
|
||||
cost = 400,
|
||||
amount = list(1,2,3,4,5),
|
||||
emag = 0
|
||||
|
||||
@@ -302,16 +302,27 @@
|
||||
// Cash Bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/storage/bag/cash
|
||||
name = "cash bag"
|
||||
/obj/item/storage/bag/money
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "cashbag"
|
||||
desc = "A bag for carrying lots of cash. It's got a big dollar sign printed on the front."
|
||||
name = "money bag"
|
||||
desc = "A bag for carrying lots of money. It's got a big dollar sign printed on the front."
|
||||
icon_state = "moneybag"
|
||||
flags = CONDUCT
|
||||
max_storage_space = 100
|
||||
max_w_class = 3
|
||||
w_class = 2
|
||||
w_class = 4
|
||||
can_hold = list(/obj/item/coin,/obj/item/spacecash)
|
||||
|
||||
/obj/item/storage/bag/money/vault
|
||||
|
||||
/obj/item/storage/bag/money/vault/New()
|
||||
..()
|
||||
new /obj/item/coin/silver(src)
|
||||
new /obj/item/coin/silver(src)
|
||||
new /obj/item/coin/silver(src)
|
||||
new /obj/item/coin/silver(src)
|
||||
new /obj/item/coin/gold(src)
|
||||
new /obj/item/coin/gold(src)
|
||||
|
||||
// -----------------------------
|
||||
// Book bag
|
||||
// -----------------------------
|
||||
|
||||
@@ -411,7 +411,7 @@ STOCK_ITEM_COMMON(bag, 3.5)
|
||||
/obj/item/storage/bag/ore, \
|
||||
/obj/item/storage/bag/plants, \
|
||||
/obj/item/storage/bag/sheetsnatcher, \
|
||||
/obj/item/storage/bag/cash, \
|
||||
/obj/item/storage/bag/money, \
|
||||
/obj/item/storage/bag/books \
|
||||
)
|
||||
new type(L)
|
||||
|
||||
@@ -180,6 +180,7 @@ proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
|
||||
|
||||
/obj/item/spacecash/ewallet/lotto
|
||||
name = "space lottery card"
|
||||
icon_state = "lottocard_3"
|
||||
desc = "A virtual scratch-action charge card that contains a variable amount of money."
|
||||
worth = 0
|
||||
var/scratches_remaining = 3
|
||||
@@ -198,7 +199,7 @@ proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
|
||||
next_scratch = world.time + 6 SECONDS
|
||||
|
||||
to_chat(user, "<span class='notice'>You initiate the simulated scratch action process on the [src]...</span>")
|
||||
playsound(src.loc, 'sound/items/drumroll.ogg', 50, 0, -4)
|
||||
playsound(src.loc, 'sound/items/drumroll.ogg', 20, 0, -4)
|
||||
if(do_after(user,4.5 SECONDS))
|
||||
var/won = 0
|
||||
var/result = rand(1,10000)
|
||||
@@ -234,6 +235,7 @@ proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
|
||||
speak("You've won: [won] CREDITS. JACKPOT WINNER! You're JACKPOT lucky!")
|
||||
|
||||
scratches_remaining -= 1
|
||||
update_icon()
|
||||
worth += won
|
||||
sleep(1 SECONDS)
|
||||
if(scratches_remaining > 0)
|
||||
@@ -246,4 +248,8 @@ proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
|
||||
/obj/item/spacecash/ewallet/lotto/proc/speak(var/message = "Hello!")
|
||||
for(var/mob/O in hearers(src.loc, null))
|
||||
O.show_message("<span class='game say'><span class='name'>\The [src]</span> pings, \"[message]\"</span>",2)
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0, -4)
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 20, 0, -4)
|
||||
|
||||
|
||||
/obj/item/spacecash/ewallet/lotto/update_icon()
|
||||
icon_state = "lottocard_[scratches_remaining]"
|
||||
|
||||
@@ -126,14 +126,14 @@
|
||||
if (src.output)
|
||||
processing = 1;
|
||||
icon_state = "coinpress1"
|
||||
var/obj/item/moneybag/M
|
||||
var/obj/item/storage/bag/money/M
|
||||
switch(chosen)
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
while(amt_iron > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/moneybag,output.loc))
|
||||
M = locate(/obj/item/moneybag,output.loc)
|
||||
if (locate(/obj/item/storage/bag/money,output.loc))
|
||||
M = locate(/obj/item/storage/bag/money,output.loc)
|
||||
else
|
||||
M = new/obj/item/moneybag(output.loc)
|
||||
M = new/obj/item/storage/bag/money(output.loc)
|
||||
new/obj/item/coin/iron(M)
|
||||
amt_iron -= 20
|
||||
coinsToProduce--
|
||||
@@ -142,10 +142,10 @@
|
||||
sleep(5);
|
||||
if("gold")
|
||||
while(amt_gold > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/moneybag,output.loc))
|
||||
M = locate(/obj/item/moneybag,output.loc)
|
||||
if (locate(/obj/item/storage/bag/money,output.loc))
|
||||
M = locate(/obj/item/storage/bag/money,output.loc)
|
||||
else
|
||||
M = new/obj/item/moneybag(output.loc)
|
||||
M = new/obj/item/storage/bag/money(output.loc)
|
||||
new /obj/item/coin/gold(M)
|
||||
amt_gold -= 20
|
||||
coinsToProduce--
|
||||
@@ -154,10 +154,10 @@
|
||||
sleep(5);
|
||||
if("silver")
|
||||
while(amt_silver > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/moneybag,output.loc))
|
||||
M = locate(/obj/item/moneybag,output.loc)
|
||||
if (locate(/obj/item/storage/bag/money,output.loc))
|
||||
M = locate(/obj/item/storage/bag/money,output.loc)
|
||||
else
|
||||
M = new/obj/item/moneybag(output.loc)
|
||||
M = new/obj/item/storage/bag/money(output.loc)
|
||||
new /obj/item/coin/silver(M)
|
||||
amt_silver -= 20
|
||||
coinsToProduce--
|
||||
@@ -166,10 +166,10 @@
|
||||
sleep(5);
|
||||
if("diamond")
|
||||
while(amt_diamond > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/moneybag,output.loc))
|
||||
M = locate(/obj/item/moneybag,output.loc)
|
||||
if (locate(/obj/item/storage/bag/money,output.loc))
|
||||
M = locate(/obj/item/storage/bag/money,output.loc)
|
||||
else
|
||||
M = new/obj/item/moneybag(output.loc)
|
||||
M = new/obj/item/storage/bag/money(output.loc)
|
||||
new /obj/item/coin/diamond(M)
|
||||
amt_diamond -= 20
|
||||
coinsToProduce--
|
||||
@@ -178,10 +178,10 @@
|
||||
sleep(5);
|
||||
if("phoron")
|
||||
while(amt_phoron > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/moneybag,output.loc))
|
||||
M = locate(/obj/item/moneybag,output.loc)
|
||||
if (locate(/obj/item/storage/bag/money,output.loc))
|
||||
M = locate(/obj/item/storage/bag/money,output.loc)
|
||||
else
|
||||
M = new/obj/item/moneybag(output.loc)
|
||||
M = new/obj/item/storage/bag/money(output.loc)
|
||||
new /obj/item/coin/phoron(M)
|
||||
amt_phoron -= 20
|
||||
coinsToProduce--
|
||||
@@ -190,10 +190,10 @@
|
||||
sleep(5);
|
||||
if("uranium")
|
||||
while(amt_uranium > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/moneybag,output.loc))
|
||||
M = locate(/obj/item/moneybag,output.loc)
|
||||
if (locate(/obj/item/storage/bag/money,output.loc))
|
||||
M = locate(/obj/item/storage/bag/money,output.loc)
|
||||
else
|
||||
M = new/obj/item/moneybag(output.loc)
|
||||
M = new/obj/item/storage/bag/money (output.loc)
|
||||
new /obj/item/coin/uranium(M)
|
||||
amt_uranium -= 20
|
||||
coinsToProduce--
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
/*****************************Money bag********************************/
|
||||
|
||||
/obj/item/moneybag
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
name = "Money bag"
|
||||
icon_state = "moneybag"
|
||||
flags = CONDUCT
|
||||
force = 10.0
|
||||
throwforce = 2.0
|
||||
w_class = 4.0
|
||||
|
||||
/obj/item/moneybag/attack_hand(user as mob)
|
||||
var/amt_gold = 0
|
||||
var/amt_silver = 0
|
||||
var/amt_diamond = 0
|
||||
var/amt_iron = 0
|
||||
var/amt_phoron = 0
|
||||
var/amt_uranium = 0
|
||||
|
||||
for (var/obj/item/coin/C in contents)
|
||||
if (istype(C,/obj/item/coin/diamond))
|
||||
amt_diamond++;
|
||||
if (istype(C,/obj/item/coin/phoron))
|
||||
amt_phoron++;
|
||||
if (istype(C,/obj/item/coin/iron))
|
||||
amt_iron++;
|
||||
if (istype(C,/obj/item/coin/silver))
|
||||
amt_silver++;
|
||||
if (istype(C,/obj/item/coin/gold))
|
||||
amt_gold++;
|
||||
if (istype(C,/obj/item/coin/uranium))
|
||||
amt_uranium++;
|
||||
|
||||
var/dat = text("<b>The contents of the moneybag reveal...</b><br>")
|
||||
if (amt_gold)
|
||||
dat += text("Gold coins: [amt_gold] <A href='?src=\ref[src];remove=gold'>Remove one</A><br>")
|
||||
if (amt_silver)
|
||||
dat += text("Silver coins: [amt_silver] <A href='?src=\ref[src];remove=silver'>Remove one</A><br>")
|
||||
if (amt_iron)
|
||||
dat += text("Metal coins: [amt_iron] <A href='?src=\ref[src];remove=iron'>Remove one</A><br>")
|
||||
if (amt_diamond)
|
||||
dat += text("Diamond coins: [amt_diamond] <A href='?src=\ref[src];remove=diamond'>Remove one</A><br>")
|
||||
if (amt_phoron)
|
||||
dat += text("Phoron coins: [amt_phoron] <A href='?src=\ref[src];remove=phoron'>Remove one</A><br>")
|
||||
if (amt_uranium)
|
||||
dat += text("Uranium coins: [amt_uranium] <A href='?src=\ref[src];remove=uranium'>Remove one</A><br>")
|
||||
user << browse("[dat]", "window=moneybag")
|
||||
|
||||
/obj/item/moneybag/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
//TODO: Check this code
|
||||
if (istype(W, /obj/item/coin))
|
||||
var/obj/item/coin/C = W
|
||||
to_chat(user, "<span class='notice'>You add the [C.name] into the bag.</span>")
|
||||
usr.drop_item()
|
||||
contents += C
|
||||
if (istype(W, /obj/item/moneybag))
|
||||
var/obj/item/moneybag/C = W
|
||||
for (var/obj/O in C.contents)
|
||||
contents += O;
|
||||
to_chat(user, "<span class='notice'>You empty the [C.name] into the bag.</span>")
|
||||
return
|
||||
|
||||
/obj/item/moneybag/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["remove"])
|
||||
var/obj/item/coin/COIN
|
||||
switch(href_list["remove"])
|
||||
if("gold")
|
||||
COIN = locate(/obj/item/coin/gold,src.contents)
|
||||
if("silver")
|
||||
COIN = locate(/obj/item/coin/silver,src.contents)
|
||||
if("iron")
|
||||
COIN = locate(/obj/item/coin/iron,src.contents)
|
||||
if("diamond")
|
||||
COIN = locate(/obj/item/coin/diamond,src.contents)
|
||||
if("phoron")
|
||||
COIN = locate(/obj/item/coin/phoron,src.contents)
|
||||
if("uranium")
|
||||
COIN = locate(/obj/item/coin/uranium,src.contents)
|
||||
if(!COIN)
|
||||
return
|
||||
COIN.forceMove(src.loc)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/item/moneybag/vault
|
||||
|
||||
/obj/item/moneybag/vault/New()
|
||||
..()
|
||||
new /obj/item/coin/silver(src)
|
||||
new /obj/item/coin/silver(src)
|
||||
new /obj/item/coin/silver(src)
|
||||
new /obj/item/coin/silver(src)
|
||||
new /obj/item/coin/gold(src)
|
||||
new /obj/item/coin/gold(src)
|
||||
Reference in New Issue
Block a user