mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-20 19:49:39 +01:00
[READY] Floydmats (Datum materials) & custom toolboxes (#45118)
* Initial work * more * ass * wsedfwedff * asss * test * stuff * fuck * sss a * kms * asdadwedwdfwefwef * start * test * dwwdew * ewefwfef * Redemption machine (#8) * Redemption machine * Removes debug messages * changes * fuckmyshitup * coin mint works with new material shenanigans (#10) * Auto stash before merge of "materials" and "origin/materials" * woops * furnace (#11) * autolathe manufacturing of toolboxes * eggs in a basket * some small changes * matcolors * documentation * more documentation and effects * done * Color man bad (#12) * fixes designs * ass * more fixes * fuck me * firestacks adder * epic fixes * fixes designs * DONE DIDDILY DOO * removes category macro * ch-ch-ch-changes * fixes some stuff * Fixes display of ore values (#9) * Redemption machine * Removes debug messages * Re-adds value display * Replaces the fire stacking component with an element instead (#13) * fixes examine * fixes ligma bugs * double ligma boofus * fix * misses some defines * fixes ORM * Update code/datums/components/material_container.dm Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com> * fixes * Makes glass objects weaker (#14) * Makes glass objects weaker * uses correct proc * fixes shit * honk honk * better * oh shit oh fuck * fixes * fuck ORMs * fixes the biogen * documentation * ass (#15) * component * changes * ass * ass * doc * Auto stash before merge of "materials-plasmacomponent" and "origin/materials-plasmacomponent" * fixes rounding * fixed
This commit is contained in:
committed by
Emmett Gaines
co-authored by
Emmett Gaines
parent
1ffc9f032b
commit
b33d1c49a3
@@ -16,7 +16,7 @@
|
||||
throwforce = 5
|
||||
throw_speed = 4
|
||||
armour_penetration = 10
|
||||
materials = list(MAT_METAL=1150, MAT_GLASS=2075)
|
||||
materials = list(/datum/material/iron=1150, /datum/material/glass=2075)
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("smashed", "crushed", "cleaved", "chopped", "pulped")
|
||||
sharpness = IS_SHARP
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
lefthand_file = 'icons/mob/inhands/equipment/mining_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/mining_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
materials = list(MAT_METAL=2000) //one sheet, but where can you make them?
|
||||
materials = list(/datum/material/iron=2000) //one sheet, but where can you make them?
|
||||
tool_behaviour = TOOL_MINING
|
||||
toolspeed = 1
|
||||
usesound = list('sound/effects/picaxe1.ogg', 'sound/effects/picaxe2.ogg', 'sound/effects/picaxe3.ogg')
|
||||
@@ -32,7 +32,7 @@
|
||||
throwforce = 7
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL=1000)
|
||||
materials = list(/datum/material/iron=1000)
|
||||
|
||||
/obj/item/pickaxe/silver
|
||||
name = "silver-plated pickaxe"
|
||||
@@ -106,7 +106,7 @@
|
||||
throwforce = 4
|
||||
item_state = "shovel"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL=50)
|
||||
materials = list(/datum/material/iron=50)
|
||||
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
|
||||
sharpness = IS_SHARP
|
||||
|
||||
|
||||
@@ -116,28 +116,28 @@
|
||||
name = "Kinetic Accelerator Offensive Mining Explosion Mod"
|
||||
desc = "A device which causes kinetic accelerators to fire AoE blasts that destroy rock and damage creatures."
|
||||
id = "hyperaoemod"
|
||||
materials = list(MAT_METAL = 7000, MAT_GLASS = 3000, MAT_SILVER = 3000, MAT_GOLD = 3000, MAT_DIAMOND = 4000)
|
||||
materials = list(/datum/material/iron = 7000, /datum/material/glass = 3000, /datum/material/silver = 3000, /datum/material/gold = 3000, /datum/material/diamond = 4000)
|
||||
build_path = /obj/item/borg/upgrade/modkit/aoe/turfs/andmobs
|
||||
|
||||
/datum/design/unique_modkit/rapid_repeater
|
||||
name = "Kinetic Accelerator Rapid Repeater Mod"
|
||||
desc = "A device which greatly reduces a kinetic accelerator's cooldown on striking a living target or rock, but greatly increases its base cooldown."
|
||||
id = "repeatermod"
|
||||
materials = list(MAT_METAL = 5000, MAT_GLASS = 5000, MAT_URANIUM = 8000, MAT_BLUESPACE = 2000)
|
||||
materials = list(/datum/material/iron = 5000, /datum/material/glass = 5000, /datum/material/uranium = 8000, /datum/material/bluespace = 2000)
|
||||
build_path = /obj/item/borg/upgrade/modkit/cooldown/repeater
|
||||
|
||||
/datum/design/unique_modkit/resonator_blast
|
||||
name = "Kinetic Accelerator Resonator Blast Mod"
|
||||
desc = "A device which causes kinetic accelerators to fire shots that leave and detonate resonator blasts."
|
||||
id = "resonatormod"
|
||||
materials = list(MAT_METAL = 5000, MAT_GLASS = 5000, MAT_SILVER = 5000, MAT_URANIUM = 5000)
|
||||
materials = list(/datum/material/iron = 5000, /datum/material/glass = 5000, /datum/material/silver = 5000, /datum/material/uranium = 5000)
|
||||
build_path = /obj/item/borg/upgrade/modkit/resonator_blasts
|
||||
|
||||
/datum/design/unique_modkit/bounty
|
||||
name = "Kinetic Accelerator Death Syphon Mod"
|
||||
desc = "A device which causes kinetic accelerators to permanently gain damage against creature types killed with it."
|
||||
id = "bountymod"
|
||||
materials = list(MAT_METAL = 4000, MAT_SILVER = 4000, MAT_GOLD = 4000, MAT_BLUESPACE = 4000)
|
||||
materials = list(/datum/material/iron = 4000, /datum/material/silver = 4000, /datum/material/gold = 4000, /datum/material/bluespace = 4000)
|
||||
reagents_list = list(/datum/reagent/blood = 40)
|
||||
build_path = /obj/item/borg/upgrade/modkit/bounty
|
||||
|
||||
|
||||
@@ -47,8 +47,10 @@
|
||||
add_fingerprint(usr)
|
||||
|
||||
if(href_list["material"])
|
||||
machine.selected_material = href_list["material"]
|
||||
machine.selected_alloy = null
|
||||
var/datum/material/new_material = locate(href_list["material"])
|
||||
if(istype(new_material))
|
||||
machine.selected_material = new_material
|
||||
machine.selected_alloy = null
|
||||
|
||||
if(href_list["alloy"])
|
||||
machine.selected_material = null
|
||||
@@ -75,15 +77,16 @@
|
||||
density = TRUE
|
||||
var/obj/machinery/mineral/CONSOLE = null
|
||||
var/on = FALSE
|
||||
var/selected_material = MAT_METAL
|
||||
var/datum/material/selected_material = null
|
||||
var/selected_alloy = null
|
||||
var/datum/techweb/stored_research
|
||||
|
||||
/obj/machinery/mineral/processing_unit/Initialize()
|
||||
. = ..()
|
||||
proximity_monitor = new(src, 1)
|
||||
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), INFINITY, TRUE, /obj/item/stack)
|
||||
AddComponent(/datum/component/material_container, list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/gold, /datum/material/diamond, /datum/material/plasma, /datum/material/uranium, /datum/material/bananium, /datum/material/titanium, /datum/material/bluespace), INFINITY, TRUE, /obj/item/stack)
|
||||
stored_research = new /datum/techweb/specialized/autounlocking/smelter
|
||||
selected_material = getmaterialref(/datum/material/iron)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/Destroy()
|
||||
CONSOLE = null
|
||||
@@ -108,13 +111,13 @@
|
||||
/obj/machinery/mineral/processing_unit/proc/get_machine_data()
|
||||
var/dat = "<b>Smelter control console</b><br><br>"
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = materials.materials[mat_id]
|
||||
dat += "<span class=\"res_name\">[M.name]: </span>[M.amount] cm³"
|
||||
if (selected_material == mat_id)
|
||||
for(var/datum/material/M in materials.materials)
|
||||
var/amount = materials.materials[M]
|
||||
dat += "<span class=\"res_name\">[M.name]: </span>[amount] cm³"
|
||||
if (selected_material == M)
|
||||
dat += " <i>Smelting</i>"
|
||||
else
|
||||
dat += " <A href='?src=[REF(CONSOLE)];material=[mat_id]'><b>Not Smelting</b></A> "
|
||||
dat += " <A href='?src=[REF(CONSOLE)];material=[REF(M)]'><b>Not Smelting</b></A> "
|
||||
dat += "<br>"
|
||||
|
||||
dat += "<br><br>"
|
||||
@@ -153,14 +156,14 @@
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_ore()
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/datum/material/mat = materials.materials[selected_material]
|
||||
var/datum/material/mat = selected_material
|
||||
if(mat)
|
||||
var/sheets_to_remove = (mat.amount >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT) ) ? SMELT_AMOUNT : round(mat.amount / MINERAL_MATERIAL_AMOUNT)
|
||||
var/sheets_to_remove = (materials.materials[mat] >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT) ) ? SMELT_AMOUNT : round(materials.materials[mat] / MINERAL_MATERIAL_AMOUNT)
|
||||
if(!sheets_to_remove)
|
||||
on = FALSE
|
||||
else
|
||||
var/out = get_step(src, output_dir)
|
||||
materials.retrieve_sheets(sheets_to_remove, selected_material, out)
|
||||
materials.retrieve_sheets(sheets_to_remove, mat, out)
|
||||
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_alloy()
|
||||
@@ -176,7 +179,7 @@
|
||||
return
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.use_amount(alloy.materials, amount)
|
||||
materials.use_materials(alloy.materials, amount)
|
||||
|
||||
generate_mineral(alloy.build_path)
|
||||
|
||||
@@ -188,14 +191,11 @@
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
|
||||
for(var/mat_id in D.materials)
|
||||
var/M = D.materials[mat_id]
|
||||
var/datum/material/smelter_mat = materials.materials[mat_id]
|
||||
for(var/mat_cat in D.materials)
|
||||
var/required_amount = D.materials[mat_cat]
|
||||
var/amount = materials.materials[mat_cat]
|
||||
|
||||
if(!M || !smelter_mat)
|
||||
return FALSE
|
||||
|
||||
build_amount = min(build_amount, round(smelter_mat.amount / M))
|
||||
build_amount = min(build_amount, round(amount / required_amount))
|
||||
|
||||
return build_amount
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/points = 0
|
||||
var/ore_pickup_rate = 15
|
||||
var/sheet_per_ore = 1
|
||||
var/list/ore_values = list(MAT_GLASS = 1, MAT_METAL = 1, MAT_PLASMA = 15, MAT_SILVER = 16, MAT_GOLD = 18, MAT_TITANIUM = 30, MAT_URANIUM = 30, MAT_DIAMOND = 50, MAT_BLUESPACE = 50, MAT_BANANIUM = 60)
|
||||
var/list/ore_values = list(/datum/material/iron = 1, /datum/material/glass = 1, /datum/material/plasma = 15, /datum/material/silver = 16, /datum/material/gold = 18, /datum/material/titanium = 30, /datum/material/uranium = 30, /datum/material/diamond = 50, /datum/material/bluespace = 50, /datum/material/bananium = 60)
|
||||
var/message_sent = FALSE
|
||||
var/list/ore_buffer = list()
|
||||
var/datum/techweb/stored_research
|
||||
@@ -44,7 +44,7 @@
|
||||
ore_pickup_rate_temp = 15 * M.rating
|
||||
|
||||
ore_pickup_rate = ore_pickup_rate_temp
|
||||
sheet_per_ore = sheet_per_ore_temp
|
||||
sheet_per_ore = round(sheet_per_ore_temp, 0.01)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -89,14 +89,14 @@
|
||||
|
||||
var/build_amount = 0
|
||||
|
||||
for(var/mat_id in D.materials)
|
||||
var/M = D.materials[mat_id]
|
||||
var/datum/material/redemption_mat = mat_container.materials[mat_id]
|
||||
for(var/mat in D.materials)
|
||||
var/amount = D.materials[mat]
|
||||
var/datum/material/redemption_mat_amount = mat_container.materials[mat]
|
||||
|
||||
if(!M || !redemption_mat)
|
||||
if(!amount || !redemption_mat_amount)
|
||||
return FALSE
|
||||
|
||||
var/smeltable_sheets = FLOOR(redemption_mat.amount / M, 1)
|
||||
var/smeltable_sheets = FLOOR(redemption_mat_amount / amount, 1)
|
||||
|
||||
if(!smeltable_sheets)
|
||||
return FALSE
|
||||
@@ -126,9 +126,9 @@
|
||||
|
||||
var/has_minerals = FALSE
|
||||
|
||||
for(var/mat_id in mat_container.materials)
|
||||
var/datum/material/M = mat_container.materials[mat_id]
|
||||
var/mineral_amount = M.amount / MINERAL_MATERIAL_AMOUNT
|
||||
for(var/mat in mat_container.materials)
|
||||
var/datum/material/M = mat
|
||||
var/mineral_amount = mat_container.materials[mat] / MINERAL_MATERIAL_AMOUNT
|
||||
if(mineral_amount)
|
||||
has_minerals = TRUE
|
||||
msg += "[capitalize(M.name)]: [mineral_amount] sheets<br>"
|
||||
@@ -223,10 +223,12 @@
|
||||
data["materials"] = list()
|
||||
var/datum/component/material_container/mat_container = materials.mat_container
|
||||
if (mat_container)
|
||||
for(var/mat_id in mat_container.materials)
|
||||
var/datum/material/M = mat_container.materials[mat_id]
|
||||
var/sheet_amount = M.amount ? M.amount / MINERAL_MATERIAL_AMOUNT : "0"
|
||||
data["materials"] += list(list("name" = M.name, "id" = M.id, "amount" = sheet_amount, "value" = ore_values[M.id]))
|
||||
for(var/mat in mat_container.materials)
|
||||
var/datum/material/M = mat
|
||||
var/amount = mat_container.materials[M]
|
||||
var/sheet_amount = amount / MINERAL_MATERIAL_AMOUNT
|
||||
var/ref = REF(M)
|
||||
data["materials"] += list(list("name" = M.name, "id" = ref, "amount" = sheet_amount, "value" = ore_values[M.type]))
|
||||
|
||||
data["alloys"] = list()
|
||||
for(var/v in stored_research.researched_designs)
|
||||
@@ -278,16 +280,19 @@
|
||||
if("Release")
|
||||
if(!mat_container)
|
||||
return
|
||||
|
||||
if(materials.on_hold())
|
||||
to_chat(usr, "<span class='warning'>Mineral access is on hold, please contact the quartermaster.</span>")
|
||||
else if(!check_access(inserted_id) && !allowed(usr)) //Check the ID inside, otherwise check the user
|
||||
to_chat(usr, "<span class='warning'>Required access not found.</span>")
|
||||
else
|
||||
var/mat_id = params["id"]
|
||||
if(!mat_container.materials[mat_id])
|
||||
var/datum/material/mat = locate(params["id"])
|
||||
|
||||
var/amount = mat_container.materials[mat]
|
||||
if(!amount)
|
||||
return
|
||||
var/datum/material/mat = mat_container.materials[mat_id]
|
||||
var/stored_amount = mat.amount / MINERAL_MATERIAL_AMOUNT
|
||||
|
||||
var/stored_amount = CEILING(amount / MINERAL_MATERIAL_AMOUNT, 0.1)
|
||||
|
||||
if(!stored_amount)
|
||||
return
|
||||
@@ -299,10 +304,12 @@
|
||||
desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num
|
||||
|
||||
var/sheets_to_remove = round(min(desired,50,stored_amount))
|
||||
var/count = mat_container.retrieve_sheets(sheets_to_remove, mat_id, get_step(src, output_dir))
|
||||
|
||||
var/count = mat_container.retrieve_sheets(sheets_to_remove, mat, get_step(src, output_dir))
|
||||
var/list/mats = list()
|
||||
mats[mat_id] = MINERAL_MATERIAL_AMOUNT
|
||||
mats[mat] = MINERAL_MATERIAL_AMOUNT
|
||||
materials.silo_log(src, "released", -count, "sheets", mats)
|
||||
//Logging deleted for quick coding
|
||||
return TRUE
|
||||
if("diskInsert")
|
||||
var/obj/item/disk/design_disk/disk = usr.get_active_held_item()
|
||||
@@ -339,7 +346,7 @@
|
||||
else
|
||||
desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num
|
||||
var/amount = round(min(desired,50,smelt_amount))
|
||||
mat_container.use_amount(alloy.materials, amount)
|
||||
mat_container.use_materials(alloy.materials, amount)
|
||||
materials.silo_log(src, "released", -amount, "sheets", alloy.materials)
|
||||
var/output
|
||||
if(ispath(alloy.build_path, /obj/item/stack/sheet))
|
||||
|
||||
@@ -16,7 +16,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
|
||||
/obj/machinery/ore_silo/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/material_container,
|
||||
list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE, MAT_PLASTIC),
|
||||
list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/gold, /datum/material/diamond, /datum/material/plasma, /datum/material/uranium, /datum/material/bananium, /datum/material/titanium, /datum/material/bluespace, /datum/material/plastic),
|
||||
INFINITY,
|
||||
FALSE,
|
||||
/obj/item/stack,
|
||||
@@ -75,15 +75,17 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
|
||||
var/list/ui = list("<head><title>Ore Silo</title></head><body><div class='statusDisplay'><h2>Stored Material:</h2>")
|
||||
var/any = FALSE
|
||||
for(var/M in materials.materials)
|
||||
var/datum/material/mat = materials.materials[M]
|
||||
var/sheets = round(mat.amount) / MINERAL_MATERIAL_AMOUNT
|
||||
var/datum/material/mat = M
|
||||
var/amount = materials.materials[M]
|
||||
var/sheets = round(amount) / MINERAL_MATERIAL_AMOUNT
|
||||
var/ref = REF(M)
|
||||
if (sheets)
|
||||
if (sheets >= 1)
|
||||
ui += "<a href='?src=[REF(src)];ejectsheet=[mat.id];eject_amt=1'>Eject</a>"
|
||||
if (sheets >= 1)
|
||||
ui += "<a href='?src=[REF(src)];ejectsheet=[ref];eject_amt=1'>Eject</a>"
|
||||
else
|
||||
ui += "<span class='linkOff'>Eject</span>"
|
||||
if (sheets >= 20)
|
||||
ui += "<a href='?src=[REF(src)];ejectsheet=[mat.id];eject_amt=20'>20x</a>"
|
||||
ui += "<a href='?src=[REF(src)];ejectsheet=[ref];eject_amt=20'>20x</a>"
|
||||
else
|
||||
ui += "<span class='linkOff'>20x</span>"
|
||||
ui += "<b>[mat.name]</b>: [sheets] sheets<br>"
|
||||
@@ -148,7 +150,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
else if(href_list["ejectsheet"])
|
||||
var/eject_sheet = href_list["ejectsheet"]
|
||||
var/datum/material/eject_sheet = locate(href_list["ejectsheet"])
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/count = materials.retrieve_sheets(text2num(href_list["eject_amt"]), eject_sheet, drop_location())
|
||||
var/list/matlist = list()
|
||||
|
||||
+16
-13
@@ -8,14 +8,16 @@
|
||||
density = TRUE
|
||||
var/newCoins = 0 //how many coins the machine made in it's last load
|
||||
var/processing = FALSE
|
||||
var/chosen = MAT_METAL //which material will be used to make coins
|
||||
var/chosen = /datum/material/iron //which material will be used to make coins
|
||||
var/coinsToProduce = 10
|
||||
speed_process = TRUE
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_URANIUM, MAT_DIAMOND, MAT_BANANIUM), MINERAL_MATERIAL_AMOUNT * 50, FALSE, /obj/item/stack)
|
||||
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)
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint/process()
|
||||
var/turf/T = get_step(src, input_dir)
|
||||
@@ -33,17 +35,17 @@
|
||||
var/dat = "<b>Coin Press</b><br>"
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = materials.materials[mat_id]
|
||||
if(!M.amount && chosen != mat_id)
|
||||
for(var/datum/material/M in materials.materials)
|
||||
var/amount = materials.get_material_amount(M)
|
||||
if(!amount && chosen != M)
|
||||
continue
|
||||
dat += "<br><b>[M.name] amount:</b> [M.amount] cm<sup>3</sup> "
|
||||
if (chosen == mat_id)
|
||||
dat += "<br><b>[M.name] amount:</b> [amount] cm<sup>3</sup> "
|
||||
if (chosen == M)
|
||||
dat += "<b>Chosen</b>"
|
||||
else
|
||||
dat += "<A href='?src=[REF(src)];choose=[mat_id]'>Choose</A>"
|
||||
dat += "<A href='?src=[REF(src)];choose=[REF(M)]'>Choose</A>"
|
||||
|
||||
var/datum/material/M = materials.materials[chosen]
|
||||
var/datum/material/M = chosen
|
||||
|
||||
dat += "<br><br>Will produce [coinsToProduce] [lowertext(M.name)] coins if enough materials are available.<br>"
|
||||
dat += "<A href='?src=[REF(src)];chooseAmt=-10'>-10</A> "
|
||||
@@ -67,8 +69,9 @@
|
||||
return
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
if(href_list["choose"])
|
||||
if(materials.materials[href_list["choose"]])
|
||||
chosen = href_list["choose"]
|
||||
var/datum/material/new_material = locate(href_list["choose"])
|
||||
if(istype(new_material))
|
||||
chosen = new_material
|
||||
if(href_list["chooseAmt"])
|
||||
coinsToProduce = CLAMP(coinsToProduce + text2num(href_list["chooseAmt"]), 0, 1000)
|
||||
if(href_list["makeCoins"])
|
||||
@@ -76,12 +79,12 @@
|
||||
processing = TRUE
|
||||
icon_state = "coinpress1"
|
||||
var/coin_mat = MINERAL_MATERIAL_AMOUNT * 0.2
|
||||
var/datum/material/M = materials.materials[chosen]
|
||||
var/datum/material/M = chosen
|
||||
if(!M || !M.coin_type)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
while(coinsToProduce > 0 && materials.use_amount_type(coin_mat, chosen))
|
||||
while(coinsToProduce > 0 && materials.use_amount_mat(coin_mat, chosen))
|
||||
create_coins(M.coin_type)
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
item_state = "Uranium ore"
|
||||
singular_name = "uranium ore chunk"
|
||||
points = 30
|
||||
materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
materials = list(/datum/material/uranium=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/uranium
|
||||
|
||||
/obj/item/stack/ore/iron
|
||||
@@ -78,7 +78,7 @@
|
||||
item_state = "Iron ore"
|
||||
singular_name = "iron ore chunk"
|
||||
points = 1
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
|
||||
materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/item/stack/ore/glass
|
||||
@@ -87,7 +87,7 @@
|
||||
item_state = "Glass ore"
|
||||
singular_name = "sand pile"
|
||||
points = 1
|
||||
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
materials = list(/datum/material/glass=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/glass
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
@@ -129,7 +129,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
item_state = "Plasma ore"
|
||||
singular_name = "plasma ore chunk"
|
||||
points = 15
|
||||
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
|
||||
materials = list(/datum/material/plasma=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/plasma
|
||||
|
||||
/obj/item/stack/ore/plasma/welder_act(mob/living/user, obj/item/I)
|
||||
@@ -143,7 +143,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
item_state = "Silver ore"
|
||||
singular_name = "silver ore chunk"
|
||||
points = 16
|
||||
materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT)
|
||||
materials = list(/datum/material/silver=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/silver
|
||||
|
||||
/obj/item/stack/ore/gold
|
||||
@@ -152,7 +152,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
icon_state = "Gold ore"
|
||||
singular_name = "gold ore chunk"
|
||||
points = 18
|
||||
materials = list(MAT_GOLD=MINERAL_MATERIAL_AMOUNT)
|
||||
materials = list(/datum/material/gold=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/gold
|
||||
|
||||
/obj/item/stack/ore/diamond
|
||||
@@ -161,7 +161,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
item_state = "Diamond ore"
|
||||
singular_name = "diamond ore chunk"
|
||||
points = 50
|
||||
materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT)
|
||||
materials = list(/datum/material/diamond=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/diamond
|
||||
|
||||
/obj/item/stack/ore/bananium
|
||||
@@ -170,7 +170,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
item_state = "Bananium ore"
|
||||
singular_name = "bananium ore chunk"
|
||||
points = 60
|
||||
materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
materials = list(/datum/material/bananium=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/bananium
|
||||
|
||||
/obj/item/stack/ore/titanium
|
||||
@@ -179,7 +179,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
item_state = "Titanium ore"
|
||||
singular_name = "titanium ore chunk"
|
||||
points = 50
|
||||
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
materials = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/titanium
|
||||
|
||||
/obj/item/stack/ore/slag
|
||||
@@ -351,7 +351,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
cmineral = "gold"
|
||||
icon_state = "coin_gold_heads"
|
||||
value = 25
|
||||
materials = list(MAT_GOLD = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
materials = list(/datum/material/gold = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/gold = 4)
|
||||
|
||||
/obj/item/coin/silver
|
||||
@@ -359,7 +359,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
cmineral = "silver"
|
||||
icon_state = "coin_silver_heads"
|
||||
value = 10
|
||||
materials = list(MAT_SILVER = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
materials = list(/datum/material/silver = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/silver = 4)
|
||||
|
||||
/obj/item/coin/diamond
|
||||
@@ -367,7 +367,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
cmineral = "diamond"
|
||||
icon_state = "coin_diamond_heads"
|
||||
value = 100
|
||||
materials = list(MAT_DIAMOND = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
materials = list(/datum/material/diamond = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/carbon = 4)
|
||||
|
||||
/obj/item/coin/iron
|
||||
@@ -375,7 +375,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
cmineral = "iron"
|
||||
icon_state = "coin_iron_heads"
|
||||
value = 1
|
||||
materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
materials = list(/datum/material/iron = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/iron = 4)
|
||||
|
||||
/obj/item/coin/plasma
|
||||
@@ -383,7 +383,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
cmineral = "plasma"
|
||||
icon_state = "coin_plasma_heads"
|
||||
value = 40
|
||||
materials = list(MAT_PLASMA = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
materials = list(/datum/material/plasma = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/toxin/plasma = 4)
|
||||
|
||||
/obj/item/coin/uranium
|
||||
@@ -391,7 +391,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
cmineral = "uranium"
|
||||
icon_state = "coin_uranium_heads"
|
||||
value = 25
|
||||
materials = list(MAT_URANIUM = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
materials = list(/datum/material/uranium = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/uranium = 4)
|
||||
|
||||
/obj/item/coin/bananium
|
||||
@@ -399,7 +399,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
cmineral = "bananium"
|
||||
icon_state = "coin_bananium_heads"
|
||||
value = 200 //makes the clown cry
|
||||
materials = list(MAT_BANANIUM = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
materials = list(/datum/material/bananium = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
grind_results = list(/datum/reagent/consumable/banana = 4)
|
||||
|
||||
/obj/item/coin/adamantine
|
||||
@@ -419,7 +419,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
icon_state = "coin_iron_heads"
|
||||
desc = "Hey, this coin's the same on both sides!"
|
||||
sideslist = list("heads")
|
||||
materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
materials = list(/datum/material/iron = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
value = 1
|
||||
grind_results = list(/datum/reagent/iron = 4)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user