mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Reagent Refinery (#11282)
Co-authored-by: Will <7099514+Willburd@users.noreply.github.com> Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
44f8a5dcd2
commit
747ed116c6
@@ -44,7 +44,7 @@
|
||||
ORE_SAND = 2
|
||||
)
|
||||
product = /obj/item/stack/material/glass/phoronglass
|
||||
/*
|
||||
|
||||
/datum/alloy/bronze
|
||||
metaltag = MAT_BRONZE
|
||||
requires = list(
|
||||
@@ -52,4 +52,3 @@
|
||||
ORE_TIN = 1
|
||||
)
|
||||
product = /obj/item/stack/material/bronze
|
||||
*/
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
var/supported = 0
|
||||
var/active = 0
|
||||
var/list/resource_field = list()
|
||||
var/list/gas_field = list()
|
||||
var/obj/item/radio/intercom/faultreporter
|
||||
var/drill_range = 5
|
||||
var/offset = 2
|
||||
var/current_capacity = 0
|
||||
var/drill_moles_per_tick = 0
|
||||
|
||||
var/list/stored_ore = list(
|
||||
ORE_SAND = 0,
|
||||
@@ -54,9 +56,9 @@
|
||||
ORE_MHYDROGEN = /obj/item/ore/hydrogen,
|
||||
ORE_SAND = /obj/item/ore/glass,
|
||||
ORE_CARBON = /obj/item/ore/coal,
|
||||
// ORE_COPPER = /obj/item/ore/copper,
|
||||
// ORE_TIN = /obj/item/ore/tin,
|
||||
// ORE_BAUXITE = /obj/item/ore/bauxite,
|
||||
ORE_COPPER = /obj/item/ore/copper,
|
||||
ORE_TIN = /obj/item/ore/tin,
|
||||
ORE_BAUXITE = /obj/item/ore/bauxite,
|
||||
ORE_RUTILE = /obj/item/ore/rutile
|
||||
)
|
||||
|
||||
@@ -70,14 +72,14 @@
|
||||
// Found with an advanced laser. exotic_drilling >= 1
|
||||
var/list/ore_types_uncommon = list(
|
||||
ORE_MARBLE = /obj/item/ore/marble,
|
||||
//ORE_PAINITE = /obj/item/ore/painite,
|
||||
//ORE_QUARTZ = /obj/item/ore/quartz,
|
||||
ORE_PAINITE = /obj/item/ore/painite,
|
||||
ORE_QUARTZ = /obj/item/ore/quartz,
|
||||
ORE_LEAD = /obj/item/ore/lead
|
||||
)
|
||||
|
||||
// Found with an ultra laser. exotic_drilling >= 2
|
||||
var/list/ore_types_rare = list(
|
||||
//ORE_VOPAL = /obj/item/ore/void_opal,
|
||||
ORE_VOPAL = /obj/item/ore/void_opal,
|
||||
ORE_VERDANTIUM = /obj/item/ore/verdantium
|
||||
)
|
||||
|
||||
@@ -155,7 +157,16 @@
|
||||
if(ismineralturf(get_turf(src)))
|
||||
var/turf/simulated/mineral/M = get_turf(src)
|
||||
M.GetDrilled()
|
||||
|
||||
// Extract gasses!
|
||||
else if(istype(get_turf(src), /turf/simulated/floor/gas_crack))
|
||||
if(gas_field.len)
|
||||
//Create gas mixture to hold data for passing
|
||||
var/datum/gas_mixture/GM = new
|
||||
for(var/gas in gas_field)
|
||||
GM.adjust_multi(gas, drill_moles_per_tick)
|
||||
GM.temperature = 423 // ~150C
|
||||
var/atom/location = src.loc
|
||||
location.assume_air(GM)
|
||||
else if(istype(get_turf(src), /turf/simulated))
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
T.ex_act(2.0)
|
||||
@@ -213,7 +224,8 @@
|
||||
harvesting.turf_resource_types &= ~(TURF_HAS_MINERALS)
|
||||
harvesting.resources = null
|
||||
resource_field -= harvesting
|
||||
else
|
||||
|
||||
else if(!gas_field.len) // Won't stop digging if gas pressure is detected
|
||||
active = 0
|
||||
need_player_check = 1
|
||||
update_icon()
|
||||
@@ -366,7 +378,9 @@
|
||||
/obj/machinery/mining/drill/proc/get_resource_field()
|
||||
|
||||
resource_field = list()
|
||||
gas_field = list()
|
||||
need_update_field = 0
|
||||
drill_moles_per_tick = 0
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(!istype(T)) return
|
||||
@@ -380,8 +394,15 @@
|
||||
if(!istype(mine_turf, /turf/space/))
|
||||
if(mine_turf && mine_turf.turf_resource_types & TURF_HAS_MINERALS)
|
||||
resource_field += mine_turf
|
||||
|
||||
if(!resource_field.len)
|
||||
// gas mining
|
||||
if(istype(mine_turf,/turf/simulated/floor/gas_crack))
|
||||
// Get gasses the cracks around us could give!
|
||||
var/turf/simulated/floor/gas_crack/G = mine_turf
|
||||
if(!G.gas_type)
|
||||
continue
|
||||
drill_moles_per_tick += 2
|
||||
gas_field.Add(G.gas_type)
|
||||
if(!resource_field.len && !gas_field.len)
|
||||
system_error("Resources depleted.")
|
||||
|
||||
/obj/machinery/mining/drill/proc/use_cell_power()
|
||||
@@ -408,7 +429,7 @@
|
||||
current_capacity = 0 // Set the amount of ore in the drill to 0.
|
||||
balloon_alert(usr, "onloaded cache into the ore box.")
|
||||
else
|
||||
balloon_alert(usr, "move an ore box to the droll before unloading it.")
|
||||
balloon_alert(usr, "move an ore box to the drill before unloading it.")
|
||||
|
||||
|
||||
/obj/machinery/mining/brace
|
||||
|
||||
@@ -41,13 +41,13 @@
|
||||
var/ore_type
|
||||
|
||||
switch(metal)
|
||||
if(ORE_SAND, ORE_CARBON, ORE_MARBLE, /*ORE_QUARTZ*/) ore_type = "surface minerals"
|
||||
if(ORE_HEMATITE, /*ORE_TIN, ORE_COPPER, ORE_BAUXITE,*/ ORE_LEAD) ore_type = "industrial metals"
|
||||
if(ORE_GOLD, ORE_SILVER, ORE_RUTILE) ore_type = "precious metals"
|
||||
if(ORE_DIAMOND, /*ORE_PAINITE*/) ore_type = "precious gems"
|
||||
if(ORE_URANIUM) ore_type = "nuclear fuel"
|
||||
if(ORE_PHORON, ORE_PLATINUM, ORE_MHYDROGEN) ore_type = "exotic matter"
|
||||
if(ORE_VERDANTIUM, /*ORE_VOPAL*/) ore_type = "anomalous matter"
|
||||
if(ORE_SAND, ORE_CARBON, ORE_MARBLE, ORE_QUARTZ) ore_type = "surface minerals"
|
||||
if(ORE_HEMATITE, ORE_TIN, ORE_COPPER, ORE_BAUXITE, ORE_LEAD) ore_type = "industrial metals"
|
||||
if(ORE_GOLD, ORE_SILVER, ORE_RUTILE) ore_type = "precious metals"
|
||||
if(ORE_DIAMOND, ORE_PAINITE) ore_type = "precious gems"
|
||||
if(ORE_URANIUM) ore_type = "nuclear fuel"
|
||||
if(ORE_PHORON, ORE_PLATINUM, ORE_MHYDROGEN) ore_type = "exotic matter"
|
||||
if(ORE_VERDANTIUM, ORE_VOPAL) ore_type = "anomalous matter"
|
||||
|
||||
if(ore_type) metals[ore_type] += T.resources[metal]
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
var/active = FALSE
|
||||
|
||||
var/points = 0
|
||||
var/points_mult = 1 //VOREStation Add - multiplier for points generated when ore hits the processors
|
||||
var/points_mult = 1 //- multiplier for points generated when ore hits the processors
|
||||
var/static/list/ore_values = list(
|
||||
ORE_SAND = 1,
|
||||
ORE_HEMATITE = 1,
|
||||
@@ -185,7 +185,7 @@
|
||||
ORE_LEAD = 40,
|
||||
ORE_MHYDROGEN = 40,
|
||||
ORE_VERDANTIUM = 60,
|
||||
ORE_RUTILE = 40) //VOREStation Add
|
||||
ORE_RUTILE = 40)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -67,12 +67,12 @@ var/list/mining_overlay_cache = list()
|
||||
ORE_VERDANTIUM = /obj/item/ore/verdantium,
|
||||
ORE_MARBLE = /obj/item/ore/marble,
|
||||
ORE_LEAD = /obj/item/ore/lead,
|
||||
// ORE_COPPER = /obj/item/ore/copper,
|
||||
// ORE_TIN = /obj/item/ore/tin,
|
||||
// ORE_BAUXITE = /obj/item/ore/bauxite,
|
||||
// ORE_VOPAL = /obj/item/ore/void_opal,
|
||||
// ORE_PAINITE = /obj/item/ore/painite,
|
||||
// ORE_QUARTZ = /obj/item/ore/quartz,
|
||||
ORE_COPPER = /obj/item/ore/copper,
|
||||
ORE_TIN = /obj/item/ore/tin,
|
||||
ORE_BAUXITE = /obj/item/ore/bauxite,
|
||||
ORE_VOPAL = /obj/item/ore/void_opal,
|
||||
ORE_PAINITE = /obj/item/ore/painite,
|
||||
ORE_QUARTZ = /obj/item/ore/quartz,
|
||||
ORE_RUTILE = /obj/item/ore/rutile
|
||||
)
|
||||
|
||||
@@ -729,15 +729,15 @@ var/list/mining_overlay_cache = list()
|
||||
new /obj/item/stack/material/uranium(src, rand(5,25))
|
||||
|
||||
/turf/simulated/mineral/proc/make_ore(var/rare_ore)
|
||||
if(mineral || ignore_mapgen || ignore_oregen) //VOREStation Edit - Makes sense, doesn't it?
|
||||
if(mineral || ignore_mapgen || ignore_oregen)
|
||||
return
|
||||
|
||||
var/mineral_name
|
||||
if(rare_ore)
|
||||
mineral_name = pickweight(list(ORE_MARBLE = 5,/* ORE_QUARTZ = 15, ORE_COPPER = 10, ORE_TIN = 5, ORE_BAUXITE = 5*/, ORE_URANIUM = 15, ORE_PLATINUM = 20, ORE_HEMATITE = 15, ORE_RUTILE = 20, ORE_CARBON = 15, ORE_DIAMOND = 3, ORE_GOLD = 15, ORE_SILVER = 15, ORE_PHORON = 25, ORE_LEAD = 5,/* ORE_VOPAL = 1,*/ ORE_VERDANTIUM = 2/*, ORE_PAINITE = 1*/))
|
||||
mineral_name = pickweight(list(ORE_MARBLE = 5, ORE_QUARTZ = 15, ORE_COPPER = 10, ORE_TIN = 5, ORE_BAUXITE = 5, ORE_URANIUM = 15, ORE_PLATINUM = 20, ORE_HEMATITE = 15, ORE_RUTILE = 20, ORE_CARBON = 15, ORE_DIAMOND = 3, ORE_GOLD = 15, ORE_SILVER = 15, ORE_PHORON = 25, ORE_LEAD = 5, ORE_VOPAL = 1, ORE_VERDANTIUM = 2, ORE_PAINITE = 1))
|
||||
|
||||
else
|
||||
mineral_name = pickweight(list(ORE_MARBLE = 3,/* ORE_QUARTZ = 10, ORE_COPPER = 20, ORE_TIN = 15, ORE_BAUXITE = 15*/, ORE_URANIUM = 10, ORE_PLATINUM = 10, ORE_HEMATITE = 70, ORE_RUTILE = 15, ORE_CARBON = 70, ORE_DIAMOND = 2, ORE_GOLD = 10, ORE_SILVER = 10, ORE_PHORON = 20, ORE_LEAD = 3,/* ORE_VOPAL = 1,*/ ORE_VERDANTIUM = 1/*, ORE_PAINITE = 1*/))
|
||||
mineral_name = pickweight(list(ORE_MARBLE = 3, ORE_QUARTZ = 10, ORE_COPPER = 20, ORE_TIN = 15, ORE_BAUXITE = 15, ORE_URANIUM = 10, ORE_PLATINUM = 10, ORE_HEMATITE = 70, ORE_RUTILE = 15, ORE_CARBON = 70, ORE_DIAMOND = 2, ORE_GOLD = 10, ORE_SILVER = 10, ORE_PHORON = 20, ORE_LEAD = 3, ORE_VOPAL = 1, ORE_VERDANTIUM = 1, ORE_PAINITE = 1))
|
||||
|
||||
if(mineral_name && (mineral_name in GLOB.ore_data))
|
||||
mineral = GLOB.ore_data[mineral_name]
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
icon_state = "ore_lead"
|
||||
material = ORE_LEAD
|
||||
origin_tech = list(TECH_MATERIAL = 3)
|
||||
/*
|
||||
|
||||
/obj/item/ore/copper
|
||||
name = "raw copper"
|
||||
icon_state = "ore_copper"
|
||||
@@ -121,12 +121,12 @@
|
||||
name = "raw bauxite"
|
||||
icon_state = "ore_bauxite"
|
||||
material = ORE_BAUXITE
|
||||
*/
|
||||
|
||||
/obj/item/ore/rutile
|
||||
name = "raw rutile"
|
||||
icon_state = "ore_rutile"
|
||||
material = ORE_RUTILE
|
||||
/*
|
||||
|
||||
/obj/item/ore/void_opal
|
||||
name = "raw void opal"
|
||||
icon_state = "ore_void_opal"
|
||||
@@ -141,7 +141,7 @@
|
||||
name = "raw quartz"
|
||||
icon_state = "ore_quartz"
|
||||
material = ORE_QUARTZ
|
||||
*/
|
||||
|
||||
/obj/item/ore/slag
|
||||
name = "Slag"
|
||||
desc = "Someone screwed up..."
|
||||
@@ -159,7 +159,6 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
//VOREStation Add
|
||||
/obj/item/ore/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if(M.handle_eat_minerals(src, user))
|
||||
return
|
||||
@@ -169,7 +168,6 @@
|
||||
if(user.handle_eat_minerals(src))
|
||||
return
|
||||
..()
|
||||
//VOREStation Add End
|
||||
|
||||
/obj/item/ore_chunk
|
||||
name = "ore chunk"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"million" = 704
|
||||
)
|
||||
xarch_source_mineral = REAGENT_ID_POTASSIUM
|
||||
reagent = REAGENT_ID_URANIUM
|
||||
reagent = REAGENT_ID_RADIUM // Otherwise it emp pulses constantly with iron
|
||||
|
||||
/ore/hematite
|
||||
name = ORE_HEMATITE
|
||||
@@ -158,6 +158,7 @@
|
||||
"billion" = 13,
|
||||
"billion_lower" = 10
|
||||
)
|
||||
reagent = REAGENT_ID_PHOSPHORUS
|
||||
|
||||
/ore/marble
|
||||
name = ORE_MARBLE
|
||||
@@ -178,7 +179,7 @@
|
||||
ore = /obj/item/ore/lead
|
||||
scan_icon = "mineral_rare"
|
||||
reagent = REAGENT_ID_LEAD
|
||||
/*
|
||||
|
||||
/ore/copper
|
||||
name = ORE_COPPER
|
||||
display_name = ORE_COPPER
|
||||
@@ -199,6 +200,7 @@
|
||||
spread_chance = 10
|
||||
ore = /obj/item/ore/tin
|
||||
scan_icon = "mineral_common"
|
||||
reagent = REAGENT_ID_TIN
|
||||
|
||||
/ore/quartz
|
||||
name = ORE_QUARTZ
|
||||
@@ -208,6 +210,7 @@
|
||||
spread_chance = 5
|
||||
ore = /obj/item/ore/quartz
|
||||
scan_icon = "mineral_common"
|
||||
reagent = REAGENT_ID_SILICON
|
||||
|
||||
/ore/bauxite
|
||||
name = ORE_BAUXITE
|
||||
@@ -218,7 +221,7 @@
|
||||
ore = /obj/item/ore/bauxite
|
||||
scan_icon = "mineral_common"
|
||||
reagent = REAGENT_ID_ALUMINIUM
|
||||
*/
|
||||
|
||||
/ore/rutile
|
||||
name = ORE_RUTILE
|
||||
display_name = ORE_RUTILE
|
||||
@@ -228,7 +231,8 @@
|
||||
alloy = 1
|
||||
ore = /obj/item/ore/rutile
|
||||
scan_icon = "mineral_uncommon"
|
||||
/*
|
||||
reagent = REAGENT_ID_TITANIUMDIOX
|
||||
|
||||
/ore/painite
|
||||
name = ORE_PAINITE
|
||||
display_name = "rough painite"
|
||||
@@ -237,6 +241,7 @@
|
||||
spread_chance = 3
|
||||
ore = /obj/item/ore/painite
|
||||
scan_icon = "mineral_rare"
|
||||
reagent = REAGENT_ID_CALCIUM
|
||||
|
||||
/ore/void_opal
|
||||
name = ORE_VOPAL
|
||||
@@ -246,4 +251,4 @@
|
||||
spread_chance = 1
|
||||
ore = /obj/item/ore/void_opal
|
||||
scan_icon = "mineral_rare"
|
||||
*/
|
||||
reagent = REAGENT_ID_SULFUR
|
||||
|
||||
Reference in New Issue
Block a user