Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into tggenetics
This commit is contained in:
@@ -53,7 +53,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
Unit | Condition | Status | Direction | Distance<br>"
|
||||
for(var/PDT in turrets)
|
||||
var/obj/machinery/porta_turret/aux_base/T = PDT
|
||||
var/integrity = max((T.obj_integrity-T.integrity_failure)/(T.max_integrity-T.integrity_failure)*100, 0)
|
||||
var/integrity = max((T.obj_integrity-T.integrity_failure * T.max_integrity)/(T.max_integrity-T.integrity_failure * max_integrity)*100, 0)
|
||||
var/status
|
||||
if(T.stat & BROKEN)
|
||||
status = "<span class='bad'>ERROR</span>"
|
||||
@@ -151,7 +151,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
if(!is_mining_level(T.z))
|
||||
return BAD_ZLEVEL
|
||||
|
||||
|
||||
|
||||
var/list/colony_turfs = base_dock.return_ordered_turfs(T.x,T.y,T.z,base_dock.dir)
|
||||
for(var/i in 1 to colony_turfs.len)
|
||||
CHECK_TICK
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
throwforce = 5
|
||||
throw_speed = 4
|
||||
armour_penetration = 10
|
||||
materials = list(MAT_METAL=1150, MAT_GLASS=2075)
|
||||
custom_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?
|
||||
custom_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')
|
||||
@@ -46,7 +46,7 @@
|
||||
throwforce = 7
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=1000)
|
||||
custom_materials = list(/datum/material/iron=1000)
|
||||
|
||||
/obj/item/pickaxe/silver
|
||||
name = "silver-plated pickaxe"
|
||||
@@ -55,7 +55,7 @@
|
||||
toolspeed = 0.5 //mines faster than a normal pickaxe, bought from mining vendor
|
||||
desc = "A silver-plated pickaxe that mines slightly faster than standard-issue."
|
||||
force = 17
|
||||
materials = list(MAT_SILVER=4000)
|
||||
custom_materials = list(/datum/material/silver=4000)
|
||||
|
||||
/obj/item/pickaxe/diamond
|
||||
name = "diamond-tipped pickaxe"
|
||||
@@ -64,7 +64,7 @@
|
||||
toolspeed = 0.3
|
||||
desc = "A pickaxe with a diamond pick head. Extremely robust at cracking rock walls and digging up dirt."
|
||||
force = 19
|
||||
materials = list(MAT_DIAMOND=4000)
|
||||
custom_materials = list(/datum/material/diamond=4000)
|
||||
|
||||
/obj/item/pickaxe/plasteel
|
||||
name = "plasteel-tipped pickaxe"
|
||||
@@ -72,7 +72,7 @@
|
||||
toolspeed = 0.5
|
||||
desc = "A pickaxe with a plasteel pick head. Less robust at cracking rock walls and digging up dirt than the titanium pickaxe, but better at cracking open skulls."
|
||||
force = 19
|
||||
materials = list(MAT_METAL=2000, MAT_PLASMA=2000)
|
||||
custom_materials = list(/datum/material/iron=2000, /datum/material/plasma=2000)
|
||||
|
||||
/obj/item/pickaxe/titanium
|
||||
name = "titanium-tipped pickaxe"
|
||||
@@ -80,7 +80,7 @@
|
||||
toolspeed = 0.3
|
||||
desc = "A pickaxe with a titanium pick head. Extremely robust at cracking rock walls and digging up dirt, but less than the plasteel pickaxe at cracking open skulls."
|
||||
force = 17
|
||||
materials = list(MAT_TITANIUM=4000)
|
||||
custom_materials = list(/datum/material/titanium=4000)
|
||||
|
||||
/obj/item/pickaxe/drill
|
||||
name = "mining drill"
|
||||
@@ -141,7 +141,7 @@
|
||||
throwforce = 4
|
||||
item_state = "shovel"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL=350)
|
||||
custom_materials = list(/datum/material/iron=350)
|
||||
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
|
||||
sharpness = IS_SHARP
|
||||
|
||||
@@ -166,5 +166,5 @@
|
||||
toolspeed = 0.5
|
||||
force = 5
|
||||
throwforce = 7
|
||||
materials = list(MAT_METAL=50)
|
||||
custom_materials = list(/datum/material/iron=50)
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
@@ -114,28 +114,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("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
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
layer = BELOW_OBJ_LAYER
|
||||
var/points = 0
|
||||
var/ore_pickup_rate = 15
|
||||
var/sheet_per_ore = 1
|
||||
var/ore_multiplier = 1
|
||||
var/point_upgrade = 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/glass = 1, /datum/material/iron = 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
|
||||
@@ -31,26 +31,27 @@
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/Destroy()
|
||||
QDEL_NULL(stored_research)
|
||||
materials = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/RefreshParts()
|
||||
var/ore_pickup_rate_temp = 15
|
||||
var/point_upgrade_temp = 1
|
||||
var/sheet_per_ore_temp = 1
|
||||
var/ore_multiplier_temp = 1
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
sheet_per_ore_temp = 0.65 + (0.35 * B.rating)
|
||||
ore_multiplier_temp = 0.65 + (0.35 * B.rating)
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
ore_pickup_rate_temp = 15 * M.rating
|
||||
for(var/obj/item/stock_parts/micro_laser/L in component_parts)
|
||||
point_upgrade_temp = 0.65 + (0.35 * L.rating)
|
||||
ore_pickup_rate = ore_pickup_rate_temp
|
||||
point_upgrade = point_upgrade_temp
|
||||
sheet_per_ore = sheet_per_ore_temp
|
||||
ore_multiplier = round(ore_multiplier_temp, 0.01)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/examine(mob/user)
|
||||
. = ..()
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
. += "<span class='notice'>The status display reads: Smelting <b>[sheet_per_ore]</b> sheet(s) per piece of ore.<br>Reward point generation at <b>[point_upgrade*100]%</b>.<br>Ore pickup speed at <b>[ore_pickup_rate]</b>.</span>"
|
||||
. += "<span class='notice'>The status display reads: Smelting <b>[ore_multiplier]</b> sheet(s) per piece of ore.<br>Reward point generation at <b>[point_upgrade*100]%</b>.<br>Ore pickup speed at <b>[ore_pickup_rate]</b>.</span>"
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/stack/ore/O)
|
||||
var/datum/component/material_container/mat_container = materials.mat_container
|
||||
@@ -70,13 +71,13 @@
|
||||
if(!material_amount)
|
||||
qdel(O) //no materials, incinerate it
|
||||
|
||||
else if(!mat_container.has_space(material_amount * sheet_per_ore * O.amount)) //if there is no space, eject it
|
||||
else if(!mat_container.has_space(material_amount * O.amount)) //if there is no space, eject it
|
||||
unload_mineral(O)
|
||||
|
||||
else
|
||||
var/mats = O.materials & mat_container.materials
|
||||
var/mats = O.custom_materials & mat_container.materials
|
||||
var/amount = O.amount
|
||||
mat_container.insert_item(O, sheet_per_ore) //insert it
|
||||
mat_container.insert_item(O, ore_multiplier) //insert it
|
||||
materials.silo_log(src, "smelted", amount, "ores", mats)
|
||||
qdel(O)
|
||||
|
||||
@@ -87,14 +88,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
|
||||
@@ -124,9 +125,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>"
|
||||
@@ -202,10 +203,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] * point_upgrade))
|
||||
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)
|
||||
@@ -251,16 +254,18 @@
|
||||
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(!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
|
||||
@@ -272,9 +277,10 @@
|
||||
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
|
||||
@@ -315,7 +321,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,
|
||||
@@ -34,6 +34,8 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
|
||||
var/datum/component/remote_materials/mats = C
|
||||
mats.disconnect_from(src)
|
||||
|
||||
connected = null
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.retrieve_all()
|
||||
|
||||
@@ -49,7 +51,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
|
||||
if(!istype(I) || (I.flags_1 & HOLOGRAM_1) || (I.item_flags & NO_MAT_REDEMPTION))
|
||||
to_chat(user, "<span class='warning'>[M] won't accept [I]!</span>")
|
||||
return
|
||||
var/item_mats = I.materials & materials.materials
|
||||
var/item_mats = I.custom_materials & materials.materials
|
||||
if(!length(item_mats))
|
||||
to_chat(user, "<span class='warning'>[I] does not contain sufficient materials to be accepted by [M].</span>")
|
||||
return
|
||||
@@ -75,15 +77,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>"
|
||||
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 +152,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()
|
||||
@@ -227,8 +231,9 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
|
||||
var/list/msg = list("([timestamp]) <b>[machine_name]</b> in [area_name]<br>[action] [abs(amount)]x [noun]<br>")
|
||||
var/sep = ""
|
||||
for(var/key in materials)
|
||||
var/datum/material/M = key
|
||||
var/val = round(materials[key]) / MINERAL_MATERIAL_AMOUNT
|
||||
msg += sep
|
||||
sep = ", "
|
||||
msg += "[amount < 0 ? "-" : "+"][val] [copytext(key, length(key[1]) + 1)]"
|
||||
msg += "[amount < 0 ? "-" : "+"][val] [M.name]"
|
||||
formatted = msg.Join()
|
||||
|
||||
@@ -86,6 +86,11 @@
|
||||
proximity_monitor = new(src, 1)
|
||||
materials = AddComponent(/datum/component/remote_materials, "stacking", mapload, FALSE, mapload && force_connect)
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/Destroy()
|
||||
CONSOLE = null
|
||||
materials = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/HasProximity(atom/movable/AM)
|
||||
if(istype(AM, /obj/item/stack/sheet) && AM.loc == get_step(src, input_dir))
|
||||
process_sheet(AM)
|
||||
@@ -107,9 +112,9 @@
|
||||
qdel(inp)
|
||||
|
||||
if(materials.silo && !materials.on_hold()) //Dump the sheets to the silo
|
||||
var/matlist = storage.materials & materials.mat_container.materials
|
||||
var/matlist = storage.custom_materials & materials.mat_container.materials
|
||||
if (length(matlist))
|
||||
var/inserted = materials.mat_container.insert_stack(storage)
|
||||
var/inserted = materials.mat_container.insert_item(storage)
|
||||
materials.silo_log(src, "collected", inserted, "sheets", matlist)
|
||||
if (QDELETED(storage))
|
||||
stack_list -= key
|
||||
|
||||
@@ -122,13 +122,10 @@
|
||||
to_chat(usr, "<span class='warning'>Error: Insufficient credits for [prize.equipment_name] on [I]!</span>")
|
||||
flick(icon_deny, src)
|
||||
else
|
||||
if (I.mining_points -= prize.cost)
|
||||
to_chat(usr, "<span class='notice'>[src] clanks to life briefly before vending [prize.equipment_name]!</span>")
|
||||
new prize.equipment_path(src.loc)
|
||||
SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]"))
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Error: Transaction failure, please try again later!</span>")
|
||||
flick(icon_deny, src)
|
||||
I.mining_points -= prize.cost
|
||||
to_chat(usr, "<span class='notice'>[src] clanks to life briefly before vending [prize.equipment_name]!</span>")
|
||||
new prize.equipment_path(src.loc)
|
||||
SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]"))
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Error: An ID with a registered account is required!</span>")
|
||||
flick(icon_deny, src)
|
||||
|
||||
+44
-23
@@ -8,14 +8,28 @@
|
||||
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/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()
|
||||
var/turf/T = get_step(src, input_dir)
|
||||
@@ -24,7 +38,9 @@
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
for(var/obj/item/stack/sheet/O in T)
|
||||
materials.insert_stack(O, O.amount)
|
||||
var/inserted = materials.insert_item(O)
|
||||
if(inserted)
|
||||
qdel(O)
|
||||
|
||||
/obj/machinery/mineral/mint/attack_hand(mob/user)
|
||||
. = ..()
|
||||
@@ -33,17 +49,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,22 +83,24 @@
|
||||
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)
|
||||
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 = materials.materials[chosen]
|
||||
if(!M || !M.coin_type)
|
||||
var/datum/material/M = chosen
|
||||
if(!M)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
while(coinsToProduce > 0 && materials.use_amount_type(coin_mat, chosen))
|
||||
create_coins(M.coin_type)
|
||||
while(coinsToProduce > 0 && materials.use_amount_mat(coin_mat, chosen))
|
||||
create_coins()
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
@@ -94,12 +112,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)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
var/points = 0 //How many points this ore gets you from the ore redemption machine
|
||||
var/refined_type = null //What this ore defaults to being refined into
|
||||
novariants = TRUE // Ore stacks handle their icon updates themselves to keep the illusion that there's more going
|
||||
mats_per_stack = MINERAL_MATERIAL_AMOUNT
|
||||
var/list/stack_overlays
|
||||
|
||||
/obj/item/stack/ore/update_icon()
|
||||
@@ -69,7 +70,8 @@
|
||||
item_state = "Uranium ore"
|
||||
singular_name = "uranium ore chunk"
|
||||
points = 30
|
||||
materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
custom_materials = list(/datum/material/uranium=MINERAL_MATERIAL_AMOUNT)
|
||||
material_flags = MATERIAL_NO_EFFECTS
|
||||
refined_type = /obj/item/stack/sheet/mineral/uranium
|
||||
|
||||
/obj/item/stack/ore/iron
|
||||
@@ -78,7 +80,7 @@
|
||||
item_state = "Iron ore"
|
||||
singular_name = "iron ore chunk"
|
||||
points = 1
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
|
||||
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/item/stack/ore/glass
|
||||
@@ -87,7 +89,7 @@
|
||||
item_state = "Glass ore"
|
||||
singular_name = "sand pile"
|
||||
points = 1
|
||||
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
custom_materials = list(/datum/material/glass=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/glass
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
@@ -135,7 +137,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)
|
||||
custom_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)
|
||||
@@ -149,7 +151,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)
|
||||
custom_materials = list(/datum/material/silver=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/silver
|
||||
|
||||
/obj/item/stack/ore/gold
|
||||
@@ -158,7 +160,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)
|
||||
custom_materials = list(/datum/material/gold=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/gold
|
||||
|
||||
/obj/item/stack/ore/diamond
|
||||
@@ -167,7 +169,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)
|
||||
custom_materials = list(/datum/material/diamond=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/diamond
|
||||
|
||||
/obj/item/stack/ore/bananium
|
||||
@@ -176,7 +178,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)
|
||||
custom_materials = list(/datum/material/bananium=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/bananium
|
||||
|
||||
/obj/item/stack/ore/titanium
|
||||
@@ -185,7 +187,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)
|
||||
custom_materials = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/titanium
|
||||
|
||||
/obj/item/stack/ore/slag
|
||||
@@ -313,18 +315,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 | MATERIAL_COLOR
|
||||
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(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/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] contemplates suicide with \the [src]!</span>")
|
||||
if (!attack_self(user))
|
||||
@@ -342,101 +359,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 = 50
|
||||
materials = list(MAT_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 = 20
|
||||
materials = list(MAT_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 = 500
|
||||
materials = list(MAT_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(MAT_METAL = 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 = 100
|
||||
materials = list(MAT_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 = 80
|
||||
materials = list(MAT_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 = 1000 //makes the clown cry
|
||||
materials = list(MAT_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 = 1500
|
||||
|
||||
/obj/item/coin/mythril
|
||||
name = "mythril coin"
|
||||
cmineral = "mythril"
|
||||
icon_state = "coin_mythril_heads"
|
||||
value = 3000
|
||||
|
||||
/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(MAT_METAL = 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))
|
||||
@@ -470,10 +395,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, 1)
|
||||
var/oldloc = loc
|
||||
sleep(15)
|
||||
@@ -483,5 +408,51 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
"<span class='italics'>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."
|
||||
icon_state = "coin_valid"
|
||||
custom_materials = list(/datum/material/plastic = 400)
|
||||
sideslist = list("valid", "salad")
|
||||
material_flags = NONE
|
||||
|
||||
/obj/item/coin/iron
|
||||
|
||||
#undef ORESTACK_OVERLAYS_MAX
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/ore_box/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/rad_insulation, 0.01) //please datum mats no more cancer
|
||||
|
||||
/obj/structure/ore_box/crowbar_act(mob/living/user, obj/item/I)
|
||||
if(I.use_tool(src, user, 50, volume=50))
|
||||
user.visible_message("[user] pries \the [src] apart.",
|
||||
|
||||
Reference in New Issue
Block a user