mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-18 19:53:00 +01:00
Merge pull request #6023 from Mechoid/Precursotech_Baseline
Base features for Precursotech and Anomalotech Expansion
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
var/list/resource_field = list()
|
||||
var/obj/item/device/radio/intercom/faultreporter = new /obj/item/device/radio/intercom{channels=list("Supply")}(null)
|
||||
|
||||
var/ore_types = list(
|
||||
var/list/ore_types = list(
|
||||
"hematite" = /obj/item/weapon/ore/iron,
|
||||
"uranium" = /obj/item/weapon/ore/uranium,
|
||||
"gold" = /obj/item/weapon/ore/gold,
|
||||
@@ -34,8 +34,20 @@
|
||||
var/harvest_speed
|
||||
var/capacity
|
||||
var/charge_use
|
||||
var/exotic_drilling
|
||||
var/obj/item/weapon/cell/cell = null
|
||||
|
||||
// Found with an advanced laser. exotic_drilling >= 1
|
||||
var/list/ore_types_uncommon = list(
|
||||
MAT_MARBLE = /obj/item/weapon/ore/marble,
|
||||
MAT_LEAD = /obj/item/weapon/ore/lead
|
||||
)
|
||||
|
||||
// Found with an ultra laser. exotic_drilling >= 2
|
||||
var/list/ore_types_rare = list(
|
||||
MAT_VERDANTIUM = /obj/item/weapon/ore/verdantium
|
||||
)
|
||||
|
||||
//Flags
|
||||
var/need_update_field = 0
|
||||
var/need_player_check = 0
|
||||
@@ -127,7 +139,7 @@
|
||||
var/oretype = ore_types[metal]
|
||||
new oretype(src)
|
||||
|
||||
if(!found_resource)
|
||||
if(!found_resource) // If a drill can't see an advanced material, it will destroy it while going through.
|
||||
harvesting.has_resources = 0
|
||||
harvesting.resources = null
|
||||
resource_field -= harvesting
|
||||
@@ -219,6 +231,14 @@
|
||||
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
||||
if(istype(P, /obj/item/weapon/stock_parts/micro_laser))
|
||||
harvest_speed = P.rating
|
||||
exotic_drilling = P.rating - 1
|
||||
if(exotic_drilling >= 1)
|
||||
ore_types |= ore_types_uncommon
|
||||
if(exotic_drilling >= 2)
|
||||
ore_types |= ore_types_rare
|
||||
else
|
||||
ore_types -= ore_types_uncommon
|
||||
ore_types -= ore_types_rare
|
||||
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
|
||||
capacity = 200 * P.rating
|
||||
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
"surface minerals" = 0,
|
||||
"precious metals" = 0,
|
||||
"nuclear fuel" = 0,
|
||||
"exotic matter" = 0
|
||||
"exotic matter" = 0,
|
||||
"anomalous matter" = 0
|
||||
)
|
||||
|
||||
for(var/turf/simulated/T in range(2, get_turf(user)))
|
||||
@@ -30,10 +31,11 @@
|
||||
var/ore_type
|
||||
|
||||
switch(metal)
|
||||
if("silicates", "carbon", "hematite") ore_type = "surface minerals"
|
||||
if("gold", "silver", "diamond") ore_type = "precious metals"
|
||||
if("silicates", "carbon", "hematite", "marble") ore_type = "surface minerals"
|
||||
if("gold", "silver", "diamond", "lead") ore_type = "precious metals"
|
||||
if("uranium") ore_type = "nuclear fuel"
|
||||
if("phoron", "osmium", "hydrogen") ore_type = "exotic matter"
|
||||
if("verdantium") ore_type = "anomalous matter"
|
||||
|
||||
if(ore_type) metals[ore_type] += T.resources[metal]
|
||||
|
||||
|
||||
@@ -174,7 +174,8 @@
|
||||
"uranium" = 30,
|
||||
"diamond" = 50,
|
||||
"platinum" = 40,
|
||||
"mhydrogen" = 40)
|
||||
"mhydrogen" = 40,
|
||||
"verdantium" = 60)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/New()
|
||||
..()
|
||||
|
||||
@@ -46,7 +46,9 @@ var/list/mining_overlay_cache = list()
|
||||
"osmium" = /obj/item/weapon/ore/osmium,
|
||||
"hydrogen" = /obj/item/weapon/ore/hydrogen,
|
||||
"silicates" = /obj/item/weapon/ore/glass,
|
||||
"carbon" = /obj/item/weapon/ore/coal
|
||||
"carbon" = /obj/item/weapon/ore/coal,
|
||||
"verdantium" = /obj/item/weapon/ore/verdantium,
|
||||
"marble" = /obj/item/weapon/ore/marble
|
||||
)
|
||||
|
||||
has_resources = 1
|
||||
@@ -608,10 +610,10 @@ var/list/mining_overlay_cache = list()
|
||||
|
||||
var/mineral_name
|
||||
if(rare_ore)
|
||||
mineral_name = pickweight(list("uranium" = 10, "platinum" = 10, "hematite" = 20, "carbon" = 20, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20))
|
||||
mineral_name = pickweight(list("marble" = 5, "uranium" = 10, "platinum" = 10, "hematite" = 20, "carbon" = 20, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20, "lead" = 5, "verdantium" = 1))
|
||||
|
||||
else
|
||||
mineral_name = pickweight(list("uranium" = 5, "platinum" = 5, "hematite" = 35, "carbon" = 35, "diamond" = 1, "gold" = 5, "silver" = 5, "phoron" = 10))
|
||||
mineral_name = pickweight(list("marble" = 3, "uranium" = 10, "platinum" = 10, "hematite" = 70, "carbon" = 70, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20, "lead" = 2, "verdantium" = 1))
|
||||
|
||||
if(mineral_name && (mineral_name in ore_data))
|
||||
mineral = ore_data[mineral_name]
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
material = "carbon"
|
||||
|
||||
/obj/item/weapon/ore/marble
|
||||
name = "recrystallized carbonate"
|
||||
icon_state = "ore_marble"
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
material = "carbon"
|
||||
|
||||
/obj/item/weapon/ore/glass
|
||||
name = "sand"
|
||||
icon_state = "ore_glass"
|
||||
@@ -77,6 +83,29 @@
|
||||
icon_state = "ore_hydrogen"
|
||||
material = "mhydrogen"
|
||||
|
||||
/obj/item/weapon/ore/verdantium
|
||||
name = "verdantite dust"
|
||||
icon_state = "ore_verdantium"
|
||||
material = MAT_VERDANTIUM
|
||||
origin_tech = list(TECH_MATERIAL = 7)
|
||||
|
||||
// POCKET ... Crystal dust.
|
||||
/obj/item/weapon/ore/verdantium/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
var/mob/living/carbon/human/H = hit_atom
|
||||
if(istype(H) && H.has_eyes() && prob(85))
|
||||
H << "<span class='danger'>Some of \the [src] gets in your eyes!</span>"
|
||||
H.Blind(10)
|
||||
H.eye_blurry += 15
|
||||
spawn(1)
|
||||
if(istype(loc, /turf/)) qdel(src)
|
||||
|
||||
/obj/item/weapon/ore/lead
|
||||
name = "lead glance"
|
||||
icon_state = "ore_lead"
|
||||
material = MAT_LEAD
|
||||
origin_tech = list(TECH_MATERIAL = 3)
|
||||
|
||||
/obj/item/weapon/ore/slag
|
||||
name = "Slag"
|
||||
desc = "Someone screwed up..."
|
||||
|
||||
@@ -132,4 +132,34 @@ var/global/list/ore_data = list()
|
||||
display_name = "metallic hydrogen"
|
||||
smelts_to = "tritium"
|
||||
compresses_to = "mhydrogen"
|
||||
scan_icon = "mineral_rare"
|
||||
|
||||
/ore/verdantium
|
||||
name = MAT_VERDANTIUM
|
||||
display_name = "crystalline verdantite"
|
||||
compresses_to = MAT_VERDANTIUM
|
||||
result_amount = 2
|
||||
spread_chance = 5
|
||||
scan_icon = "mineral_rare"
|
||||
xarch_ages = list(
|
||||
"billion" = 13,
|
||||
"billion_lower" = 10
|
||||
)
|
||||
|
||||
/ore/marble
|
||||
name = MAT_MARBLE
|
||||
display_name = "recrystallized carbonate"
|
||||
compresses_to = "marble"
|
||||
result_amount = 1
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/marble
|
||||
scan_icon = "mineral_common"
|
||||
|
||||
/ore/lead
|
||||
name = MAT_LEAD
|
||||
display_name = "lead glance"
|
||||
compresses_to = "marble"
|
||||
result_amount = 1
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/marble
|
||||
scan_icon = "mineral_rare"
|
||||
Reference in New Issue
Block a user