mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
[MIRROR] fake coins and coin/mint refactors (#10324)
Co-authored-by: Killian <49700375+KillianKirilenko@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ab171de574
commit
c6483dba4f
@@ -1,7 +1,7 @@
|
||||
/*****************************Coin********************************/
|
||||
|
||||
/obj/item/coin
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon = 'icons/obj/coins.dmi'
|
||||
name = "Coin"
|
||||
desc = "A simple coin you can flip."
|
||||
icon_state = "coin"
|
||||
@@ -15,56 +15,109 @@
|
||||
drop_sound = 'sound/items/drop/ring.ogg'
|
||||
pickup_sound = 'sound/items/pickup/ring.ogg'
|
||||
|
||||
/obj/item/coin/New()
|
||||
/obj/item/coin/Initialize(mapload)
|
||||
. = ..()
|
||||
randpixel_xy()
|
||||
|
||||
/obj/item/coin/gold
|
||||
name = "gold coin"
|
||||
name = MAT_GOLD + " coin"
|
||||
desc = "A shiny " + MAT_GOLD + " coin. Just like in the old movies with pirates!"
|
||||
icon_state = "coin_gold"
|
||||
matter = list(MAT_GOLD = 250)
|
||||
|
||||
/obj/item/coin/silver
|
||||
name = "silver coin"
|
||||
name = MAT_SILVER + " coin"
|
||||
desc = "A shiny " + MAT_SILVER + " coin. You can almost see your reflection in it. Unless you're a vampire."
|
||||
icon_state = "coin_silver"
|
||||
matter = list(MAT_SILVER = 250)
|
||||
|
||||
/obj/item/coin/copper
|
||||
name = MAT_COPPER + " coin"
|
||||
desc = "A sturdy " + MAT_COPPER + " coin. The preferred tender of people who like to make other people count a lot."
|
||||
icon_state = "coin_copper"
|
||||
matter = list(MAT_COPPER = 250)
|
||||
|
||||
/obj/item/coin/diamond
|
||||
name = "diamond coin"
|
||||
name = MAT_DIAMOND + " coin"
|
||||
desc = "A coin made of solid " + MAT_DIAMOND + ". Carbon, really, but who's counting?" // me, I'm counting
|
||||
icon_state = "coin_diamond"
|
||||
matter = list(MAT_DIAMOND = 250)
|
||||
|
||||
/obj/item/coin/graphite
|
||||
name = MAT_GRAPHITE + " coin"
|
||||
desc = "A small pressed plaque of " + MAT_GRAPHITE + ". This seems... impractical. Maybe you could use it as a pencil in a pinch?"
|
||||
icon_state = "coin_graphite"
|
||||
matter = list(MAT_GRAPHITE = 250)
|
||||
|
||||
/obj/item/coin/iron
|
||||
name = "iron coin"
|
||||
name = MAT_IRON + " coin"
|
||||
desc = "A dull " + MAT_IRON + " coin. Not that it's boring, it's just a bit plain."
|
||||
icon_state = "coin_iron"
|
||||
matter = list(MAT_IRON = 250)
|
||||
|
||||
/obj/item/coin/steel
|
||||
name = MAT_STEEL + " coin"
|
||||
desc = "A plain " + MAT_STEEL + " coin. You'd think they'd make more coins out of this, considering how plentiful it is."
|
||||
icon_state = "coin_steel"
|
||||
matter = list(MAT_STEEL = 250)
|
||||
|
||||
/obj/item/coin/durasteel
|
||||
name = MAT_DURASTEEL + " coin"
|
||||
desc = "A shiny " + MAT_DURASTEEL + " coin. Keep it in your breast pocket, maybe it'll stop a bullet someday."
|
||||
icon_state = "coin_durasteel"
|
||||
matter = list(MAT_DURASTEEL = 250)
|
||||
|
||||
/obj/item/coin/plasteel
|
||||
name = MAT_PLASTEEL + " coin"
|
||||
desc = "Someone made a coin out of " + MAT_PLASTEEL + ". Now why would they do that?"
|
||||
icon_state = "coin_plasteel"
|
||||
matter = list(MAT_PLASTEEL = 250)
|
||||
|
||||
/obj/item/coin/titanium
|
||||
name = MAT_TITANIUM + " coin"
|
||||
desc = "A shiny " + MAT_TITANIUM + " coin with some commemorative markings."
|
||||
icon_state = "coin_titanium"
|
||||
matter = list(MAT_TITANIUM = 250)
|
||||
|
||||
/obj/item/coin/lead
|
||||
name = MAT_LEAD + " coin"
|
||||
desc = "A heavy coin indeed. Shame it's worthless as anything other than a paperweight."
|
||||
icon_state = "coin_lead"
|
||||
matter = list(MAT_LEAD = 250)
|
||||
|
||||
/obj/item/coin/phoron
|
||||
name = "solid phoron coin"
|
||||
name = "solid " + MAT_PHORON + " coin"
|
||||
desc = "Solid " + MAT_PHORON + ", pressed into a coin and laminated for safety. Go ahead, lick it."
|
||||
icon_state = "coin_phoron"
|
||||
matter = list(MAT_PHORON = 250)
|
||||
|
||||
/obj/item/coin/uranium
|
||||
name = "uranium coin"
|
||||
name = MAT_URANIUM + " coin"
|
||||
desc = "A " + MAT_URANIUM + " coin. You probably don't want to store this in your pants pocket..."
|
||||
icon_state = "coin_uranium"
|
||||
matter = list(MAT_URANIUM = 250)
|
||||
|
||||
/obj/item/coin/platinum
|
||||
name = "platinum coin"
|
||||
icon_state = "coin_adamantine"
|
||||
name = MAT_PLATINUM + " coin"
|
||||
desc = "A shiny " + MAT_PLATINUM + " coin. Truth is, the game was rigged from the start."
|
||||
icon_state = "coin_platinum"
|
||||
matter = list(MAT_GOLD = 250)
|
||||
|
||||
/obj/item/coin/morphium
|
||||
name = "morphium coin"
|
||||
name = MAT_MORPHIUM + " coin"
|
||||
desc = "Solid " + MAT_MORPHIUM + ", made into a coin. Extravagant is putting it lightly."
|
||||
icon_state = "coin_morphium"
|
||||
matter = list(MAT_MORPHIUM = 250)
|
||||
|
||||
/obj/item/coin/aluminium
|
||||
name = "aluminium coin"
|
||||
name = MAT_ALUMINIUM + " coin"
|
||||
desc = "Someone decided to make a coin out of" + MAT_ALUMINIUM + ". Now your wallet can be lighter than ever."
|
||||
icon_state = "coin_aluminium"
|
||||
matter = list(MAT_ALUMINIUM = 250)
|
||||
|
||||
/obj/item/coin/verdantium
|
||||
name = "verdantium coin"
|
||||
name = MAT_VERDANTIUM + " coin"
|
||||
desc = "Shiny green " + MAT_VERDANTIUM + ", pressed into a coin. It almost seems to glimmer under starlight."
|
||||
icon_state = "coin_verdantium"
|
||||
matter = list(MAT_VERDANTIUM = 250)
|
||||
|
||||
|
||||
@@ -1,39 +1,28 @@
|
||||
/**********************Mint**************************/
|
||||
/obj/machinery/mineral/mint
|
||||
name = "Coin press"
|
||||
desc = "A relatively crude hand-operated coin press that turns sheets (or ingots, as the case may be) of materials into fresh coins. They're <i>probably</i> not going to be considered legal tender in most polities, but you might fool a vending machine with one..?<br><br><i>It looks like it'll accept silver, gold, diamond, iron, solid phoron, and uranium.</i>"
|
||||
name = "coin press"
|
||||
desc = "A relatively crude hand-operated coin press that turns sheets (or ingots, as the case may be) of materials into fresh coins. They're <i>probably</i> not going to be considered legal tender in most polities, but you might fool a vending machine with one..?"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "coinpress0"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
var/coinsToProduce = 6 //how many coins do we make per sheet? a sheet is 2000 units whilst a coin is 250, and some material should be lost in the process
|
||||
var/list/validMats = list(MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_IRON, MAT_PHORON, MAT_URANIUM) //what's valid stuff to make coins out of?
|
||||
|
||||
/obj/machinery/mineral/mint/attackby(obj/item/stack/material/M, mob/user)
|
||||
if(M.default_type in validMats)
|
||||
if(!anchored)
|
||||
user.visible_message(span_warning("\The [src] must be properly secured to operate!"))
|
||||
return
|
||||
if(!M.coin_type)
|
||||
user.visible_message(span_notice("You can't make coins out of that."))
|
||||
return
|
||||
else if(M.coin_type)
|
||||
user.visible_message("[user] starts to feed a sheet of [M.default_type] into \the [src].")
|
||||
while(M.amount > 0)
|
||||
icon_state = "coinpress1"
|
||||
if(do_after(user, 2 SECONDS, src))
|
||||
M.amount--
|
||||
if(M.default_type == MAT_SILVER)
|
||||
while(coinsToProduce-- > 0)
|
||||
new /obj/item/coin/silver(user.loc)
|
||||
else if(M.default_type == MAT_GOLD)
|
||||
while(coinsToProduce-- > 0)
|
||||
new /obj/item/coin/gold(user.loc)
|
||||
else if(M.default_type == MAT_DIAMOND)
|
||||
while(coinsToProduce-- > 0)
|
||||
new /obj/item/coin/diamond(user.loc)
|
||||
else if(M.default_type == MAT_IRON)
|
||||
while(coinsToProduce-- > 0)
|
||||
new /obj/item/coin/iron(user.loc)
|
||||
else if(M.default_type == MAT_PHORON)
|
||||
while(coinsToProduce-- > 0)
|
||||
new /obj/item/coin/phoron(user.loc)
|
||||
else if(M.default_type == MAT_URANIUM)
|
||||
while(coinsToProduce-- > 0)
|
||||
new /obj/item/coin/uranium(user.loc)
|
||||
while(coinsToProduce-- > 0)
|
||||
new M.coin_type(user.loc)
|
||||
src.visible_message(span_notice("\The [src] rattles and dispenses several [M.default_type] coins!"))
|
||||
coinsToProduce = initial(coinsToProduce)
|
||||
if(M.amount == 0)
|
||||
@@ -45,5 +34,3 @@
|
||||
to_chat(user,span_warning("\The [src] is hand-operated and requires your full attention!"))
|
||||
icon_state = "coinpress0"
|
||||
break
|
||||
else
|
||||
src.visible_message(span_notice("\The [src] doesn't look like it'll accept that material."))
|
||||
|
||||
@@ -231,6 +231,9 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
if(panel_open)
|
||||
attack_hand(user)
|
||||
return
|
||||
else if(istype(W, /obj/item/fake_coin) && has_premium)
|
||||
to_chat(user, span_notice("\The [W] doesn't fit into the coin slot on \the [src]."))
|
||||
return
|
||||
else if(istype(W, /obj/item/coin) && has_premium)
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
|
||||
Reference in New Issue
Block a user