mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
bunch of datum mats stuff mostly related to coins (#46289)
adamantine and mythril are now datum mats (mythril still admin only), adamantine has 1.5 strength buff to whatever is made out of it, mythril adds rpg loot elements to whatever is made out of it you can now put plastic, adamantine and mythril in the autolathe and coin mint you can now put titanium in coin mint switches a bunch of stuff in cargo exports, including mythril and plastic being worth cash money coin code has been changed to datum mats, the custom sprites have been lost except for antag token
This commit is contained in:
+28
-11
@@ -15,8 +15,21 @@
|
||||
|
||||
/obj/machinery/mineral/mint/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/material_container, list(/datum/material/iron, /datum/material/plasma, /datum/material/silver, /datum/material/gold, /datum/material/uranium, /datum/material/diamond, /datum/material/bananium), MINERAL_MATERIAL_AMOUNT * 50, FALSE, /obj/item/stack)
|
||||
chosen = getmaterialref(chosen)
|
||||
AddComponent(/datum/component/material_container, list(
|
||||
/datum/material/iron,
|
||||
/datum/material/plasma,
|
||||
/datum/material/silver,
|
||||
/datum/material/gold,
|
||||
/datum/material/uranium,
|
||||
/datum/material/titanium,
|
||||
/datum/material/diamond,
|
||||
/datum/material/bananium,
|
||||
/datum/material/adamantine,
|
||||
/datum/material/mythril,
|
||||
/datum/material/plastic,
|
||||
/datum/material/runite
|
||||
), MINERAL_MATERIAL_AMOUNT * 50, FALSE, /obj/item/stack)
|
||||
chosen = getmaterialref(chosen)
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint/process()
|
||||
@@ -74,18 +87,19 @@
|
||||
chosen = new_material
|
||||
if(href_list["chooseAmt"])
|
||||
coinsToProduce = CLAMP(coinsToProduce + text2num(href_list["chooseAmt"]), 0, 1000)
|
||||
updateUsrDialog()
|
||||
if(href_list["makeCoins"])
|
||||
var/temp_coins = coinsToProduce
|
||||
processing = TRUE
|
||||
icon_state = "coinpress1"
|
||||
var/coin_mat = MINERAL_MATERIAL_AMOUNT * 0.2
|
||||
var/datum/material/M = chosen
|
||||
if(!M || !M.coin_type)
|
||||
if(!M)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
while(coinsToProduce > 0 && materials.use_amount_mat(coin_mat, chosen))
|
||||
create_coins(M.coin_type)
|
||||
create_coins()
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
@@ -97,12 +111,15 @@
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/mint/proc/create_coins(P)
|
||||
/obj/machinery/mineral/mint/proc/create_coins()
|
||||
var/turf/T = get_step(src,output_dir)
|
||||
var/temp_list = list()
|
||||
temp_list[chosen] = 400
|
||||
if(T)
|
||||
var/obj/item/O = new P(src)
|
||||
var/obj/item/storage/bag/money/M = locate(/obj/item/storage/bag/money, T)
|
||||
if(!M)
|
||||
M = new /obj/item/storage/bag/money(src)
|
||||
unload_mineral(M)
|
||||
O.forceMove(M)
|
||||
var/obj/item/O = new /obj/item/coin(src)
|
||||
var/obj/item/storage/bag/money/B = locate(/obj/item/storage/bag/money, T)
|
||||
O.set_custom_materials(temp_list)
|
||||
if(!B)
|
||||
B = new /obj/item/storage/bag/money(src)
|
||||
unload_mineral(B)
|
||||
O.forceMove(B)
|
||||
|
||||
@@ -304,18 +304,33 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
/obj/item/coin
|
||||
icon = 'icons/obj/economy.dmi'
|
||||
name = "coin"
|
||||
icon_state = "coin__heads"
|
||||
icon_state = "coin"
|
||||
flags_1 = CONDUCT_1
|
||||
force = 1
|
||||
throwforce = 2
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
custom_materials = list(/datum/material/iron = 400)
|
||||
material_flags = MATERIAL_ADD_PREFIX
|
||||
var/string_attached
|
||||
var/list/sideslist = list("heads","tails")
|
||||
var/cmineral = null
|
||||
var/cooldown = 0
|
||||
var/value = 1
|
||||
var/value
|
||||
var/coinflip
|
||||
|
||||
/obj/item/coin/Initialize()
|
||||
. = ..()
|
||||
coinflip = pick(sideslist)
|
||||
icon_state = "coin_[coinflip]"
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
/obj/item/coin/set_custom_materials(var/list/materials, multiplier = 1)
|
||||
. = ..()
|
||||
value = 0
|
||||
for(var/i in custom_materials)
|
||||
var/datum/material/M = i
|
||||
value += M.value_per_unit * custom_materials[M]
|
||||
|
||||
/obj/item/coin/get_item_credit_value()
|
||||
return value
|
||||
|
||||
@@ -338,101 +353,9 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
else
|
||||
user.visible_message("<span class='suicide'>\the [src] lands on [coinflip]! [user] keeps on living!</span>")
|
||||
|
||||
/obj/item/coin/Initialize()
|
||||
. = ..()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
/obj/item/coin/examine(mob/user)
|
||||
. = ..()
|
||||
if(value)
|
||||
. += "<span class='info'>It's worth [value] credit\s.</span>"
|
||||
|
||||
/obj/item/coin/gold
|
||||
name = "gold coin"
|
||||
cmineral = "gold"
|
||||
icon_state = "coin_gold_heads"
|
||||
value = 25
|
||||
materials = list(/datum/material/gold = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/gold = 4)
|
||||
|
||||
/obj/item/coin/silver
|
||||
name = "silver coin"
|
||||
cmineral = "silver"
|
||||
icon_state = "coin_silver_heads"
|
||||
value = 10
|
||||
materials = list(/datum/material/silver = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/silver = 4)
|
||||
|
||||
/obj/item/coin/diamond
|
||||
name = "diamond coin"
|
||||
cmineral = "diamond"
|
||||
icon_state = "coin_diamond_heads"
|
||||
value = 100
|
||||
materials = list(/datum/material/diamond = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/carbon = 4)
|
||||
|
||||
/obj/item/coin/iron
|
||||
name = "iron coin"
|
||||
cmineral = "iron"
|
||||
icon_state = "coin_iron_heads"
|
||||
value = 1
|
||||
materials = list(/datum/material/iron = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/iron = 4)
|
||||
|
||||
/obj/item/coin/plasma
|
||||
name = "plasma coin"
|
||||
cmineral = "plasma"
|
||||
icon_state = "coin_plasma_heads"
|
||||
value = 40
|
||||
materials = list(/datum/material/plasma = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/toxin/plasma = 4)
|
||||
|
||||
/obj/item/coin/uranium
|
||||
name = "uranium coin"
|
||||
cmineral = "uranium"
|
||||
icon_state = "coin_uranium_heads"
|
||||
value = 25
|
||||
materials = list(/datum/material/uranium = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/uranium = 4)
|
||||
|
||||
/obj/item/coin/bananium
|
||||
name = "bananium coin"
|
||||
cmineral = "bananium"
|
||||
icon_state = "coin_bananium_heads"
|
||||
value = 200 //makes the clown cry
|
||||
materials = list(/datum/material/bananium = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/consumable/banana = 4)
|
||||
|
||||
/obj/item/coin/adamantine
|
||||
name = "adamantine coin"
|
||||
cmineral = "adamantine"
|
||||
icon_state = "coin_adamantine_heads"
|
||||
value = 100
|
||||
|
||||
/obj/item/coin/mythril
|
||||
name = "mythril coin"
|
||||
cmineral = "mythril"
|
||||
icon_state = "coin_mythril_heads"
|
||||
value = 300
|
||||
|
||||
/obj/item/coin/twoheaded
|
||||
cmineral = "iron"
|
||||
icon_state = "coin_iron_heads"
|
||||
desc = "Hey, this coin's the same on both sides!"
|
||||
sideslist = list("heads")
|
||||
materials = list(/datum/material/iron = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
value = 1
|
||||
grind_results = list(/datum/reagent/iron = 4)
|
||||
|
||||
/obj/item/coin/antagtoken
|
||||
name = "antag token"
|
||||
icon_state = "coin_valid_valid"
|
||||
cmineral = "valid"
|
||||
desc = "A novelty coin that helps the heart know what hard evidence cannot prove."
|
||||
sideslist = list("valid", "salad")
|
||||
value = 0
|
||||
grind_results = list(/datum/reagent/consumable/sodiumchloride = 4)
|
||||
. += "<span class='info'>It's worth [value] credit\s.</span>"
|
||||
|
||||
/obj/item/coin/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
@@ -467,10 +390,10 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
if(string_attached) //does the coin have a wire attached
|
||||
to_chat(user, "<span class='warning'>The coin won't flip very well with something attached!</span>" )
|
||||
return FALSE//do not flip the coin
|
||||
coinflip = pick(sideslist)
|
||||
cooldown = world.time + 15
|
||||
flick("coin_[cmineral]_flip", src)
|
||||
icon_state = "coin_[cmineral]_[coinflip]"
|
||||
flick("coin_[coinflip]_flip", src)
|
||||
coinflip = pick(sideslist)
|
||||
icon_state = "coin_[coinflip]"
|
||||
playsound(user.loc, 'sound/items/coinflip.ogg', 50, TRUE)
|
||||
var/oldloc = loc
|
||||
sleep(15)
|
||||
@@ -480,5 +403,50 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
"<span class='hear'>You hear the clattering of loose change.</span>")
|
||||
return TRUE//did the coin flip? useful for suicide_act
|
||||
|
||||
/obj/item/coin/gold
|
||||
custom_materials = list(/datum/material/gold = 400)
|
||||
|
||||
/obj/item/coin/silver
|
||||
custom_materials = list(/datum/material/silver = 400)
|
||||
|
||||
/obj/item/coin/diamond
|
||||
custom_materials = list(/datum/material/diamond = 400)
|
||||
|
||||
/obj/item/coin/plasma
|
||||
custom_materials = list(/datum/material/plasma = 400)
|
||||
|
||||
/obj/item/coin/uranium
|
||||
custom_materials = list(/datum/material/uranium = 400)
|
||||
|
||||
/obj/item/coin/titanium
|
||||
custom_materials = list(/datum/material/titanium = 400)
|
||||
|
||||
/obj/item/coin/bananium
|
||||
custom_materials = list(/datum/material/bananium = 400)
|
||||
|
||||
/obj/item/coin/adamantine
|
||||
custom_materials = list(/datum/material/adamantine = 400)
|
||||
|
||||
/obj/item/coin/mythril
|
||||
custom_materials = list(/datum/material/mythril = 400)
|
||||
|
||||
/obj/item/coin/plastic
|
||||
custom_materials = list(/datum/material/plastic = 400)
|
||||
|
||||
/obj/item/coin/runite
|
||||
custom_materials = list(/datum/material/runite = 400)
|
||||
|
||||
/obj/item/coin/twoheaded
|
||||
desc = "Hey, this coin's the same on both sides!"
|
||||
sideslist = list("heads")
|
||||
|
||||
/obj/item/coin/antagtoken
|
||||
name = "antag token"
|
||||
desc = "A novelty coin that helps the heart know what hard evidence cannot prove."
|
||||
custom_materials = list(/datum/material/plastic = 400)
|
||||
sideslist = list("valid", "salad")
|
||||
material_flags = MATERIAL_NO_COLOR
|
||||
|
||||
/obj/item/coin/iron
|
||||
|
||||
#undef ORESTACK_OVERLAYS_MAX
|
||||
|
||||
Reference in New Issue
Block a user