From 08ccbd5f69619f0ab08714a28129dce2f61ef6e7 Mon Sep 17 00:00:00 2001 From: Geeves Date: Sun, 1 Oct 2023 12:46:22 +0200 Subject: [PATCH] Ground Ore Fix (#17486) --- code/modules/mining/drilling/drill.dm | 22 +++---- code/modules/mining/drilling/scanner.dm | 10 ++-- code/modules/mining/mine_turfs.dm | 20 +++---- .../overmap/exoplanets/decor/_turfs.dm | 4 +- .../overmap/exoplanets/decor/turfs/grass.dm | 4 +- code/modules/random_map/noise/ore.dm | 60 +++++++++---------- html/changelogs/geeves-ground_ore_fixes.yml | 6 ++ 7 files changed, 66 insertions(+), 60 deletions(-) create mode 100644 html/changelogs/geeves-ground_ore_fixes.yml diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index 3c0a4612075..76fa6a1bb5d 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -23,17 +23,17 @@ var/list/resource_field = list() var/ore_types = list( - MATERIAL_IRON = /obj/item/ore/iron, - MATERIAL_URANIUM = /obj/item/ore/uranium, - MATERIAL_GOLD = /obj/item/ore/gold, - MATERIAL_SILVER = /obj/item/ore/silver, - MATERIAL_DIAMOND = /obj/item/ore/diamond, - MATERIAL_PHORON = /obj/item/ore/phoron, - MATERIAL_OSMIUM = /obj/item/ore/osmium, - "hydrogen" = /obj/item/ore/hydrogen, - "silicates" = /obj/item/ore/glass, - "carbonaceous rock" = /obj/item/ore/coal - ) + ORE_URANIUM = /obj/item/ore/uranium, + ORE_IRON = /obj/item/ore/iron, + ORE_COAL = /obj/item/ore/coal, + ORE_SAND = /obj/item/ore/glass, + ORE_PHORON = /obj/item/ore/phoron, + ORE_SILVER = /obj/item/ore/silver, + ORE_GOLD = /obj/item/ore/gold, + ORE_DIAMOND = /obj/item/ore/diamond, + ORE_PLATINUM = /obj/item/ore/osmium, + ORE_HYDROGEN = /obj/item/ore/hydrogen + ) //Upgrades var/harvest_speed diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm index d38a21b04ca..590c7252fb1 100644 --- a/code/modules/mining/drilling/scanner.dm +++ b/code/modules/mining/drilling/scanner.dm @@ -28,13 +28,13 @@ var/ore_type switch(metal) - if("silicates", "carbonaceous rock", "iron") + if(ORE_SAND, ORE_COAL, ORE_IRON) ore_type = "surface minerals" - if("gold", "silver", "diamond") + if(ORE_GOLD, ORE_SILVER, ORE_DIAMOND) ore_type = "precious metals" - if("uranium") + if(ORE_URANIUM) ore_type = "nuclear fuel" - if("phoron", "osmium", "hydrogen") + if(ORE_PHORON, ORE_PLATINUM, ORE_HYDROGEN) ore_type = "exotic matter" if(ore_type) @@ -53,4 +53,4 @@ if(76 to INFINITY) result = "huge quantities" - to_chat(user, SPAN_NOTICE("- [result] of [ore_type].")) \ No newline at end of file + to_chat(user, SPAN_NOTICE("- [result] of [ore_type].")) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index afbe9528a42..e2a83f9bd51 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -844,25 +844,25 @@ var/list/asteroid_floor_smooth = list( var/list/ore = list() for(var/metal in resources) switch(metal) - if("silicates") + if(ORE_SAND) ore += /obj/item/ore/glass - if("carbonaceous rock") + if(ORE_COAL) ore += /obj/item/ore/coal - if("iron") + if(ORE_IRON) ore += /obj/item/ore/iron - if("gold") + if(ORE_GOLD) ore += /obj/item/ore/gold - if("silver") + if(ORE_SILVER) ore += /obj/item/ore/silver - if("diamond") + if(ORE_DIAMOND) ore += /obj/item/ore/diamond - if("uranium") + if(ORE_URANIUM) ore += /obj/item/ore/uranium - if("phoron") + if(ORE_PHORON) ore += /obj/item/ore/phoron - if("osmium") + if(ORE_PLATINUM) ore += /obj/item/ore/osmium - if("hydrogen") + if(ORE_HYDROGEN) ore += /obj/item/ore/hydrogen else if(prob(25)) diff --git a/code/modules/overmap/exoplanets/decor/_turfs.dm b/code/modules/overmap/exoplanets/decor/_turfs.dm index 6eac8cf2bc4..bb840425744 100644 --- a/code/modules/overmap/exoplanets/decor/_turfs.dm +++ b/code/modules/overmap/exoplanets/decor/_turfs.dm @@ -174,9 +174,9 @@ if(!resources) resources = list() if(prob(5)) - resources[MATERIAL_URANIUM] = rand(1,3) + resources[ORE_URANIUM] = rand(1,3) if(prob(2)) - resources[MATERIAL_DIAMOND] = 1 + resources[ORE_DIAMOND] = 1 /turf/simulated/floor/exoplanet/grass/grove icon_state = "grove_grass1" diff --git a/code/modules/overmap/exoplanets/decor/turfs/grass.dm b/code/modules/overmap/exoplanets/decor/turfs/grass.dm index 499c1a69498..faf50fb06e5 100644 --- a/code/modules/overmap/exoplanets/decor/turfs/grass.dm +++ b/code/modules/overmap/exoplanets/decor/turfs/grass.dm @@ -15,9 +15,9 @@ if(!resources) resources = list() if(prob(5)) - resources[MATERIAL_URANIUM] = rand(1,3) + resources[ORE_URANIUM] = rand(1,3) if(prob(2)) - resources[MATERIAL_DIAMOND] = 1 + resources[ORE_DIAMOND] = 1 /turf/simulated/floor/exoplanet/grass/grove icon_state = "grove_grass1" diff --git a/code/modules/random_map/noise/ore.dm b/code/modules/random_map/noise/ore.dm index 5ea2ee5d386..a8142a1e788 100644 --- a/code/modules/random_map/noise/ore.dm +++ b/code/modules/random_map/noise/ore.dm @@ -50,47 +50,47 @@ if(!priority_process) CHECK_TICK T.resources = list() - T.resources["silicates"] = rand(3,5) - T.resources["carbonaceous rock"] = rand(3,5) + T.resources[ORE_SAND] = rand(3,5) + T.resources[ORE_COAL] = rand(3,5) var/tmp_cell TRANSLATE_AND_VERIFY_COORD(x, y) if(tmp_cell < rare_val) // Surface metals. - T.resources["iron"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX) - T.resources["gold"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) - T.resources["silver"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) - T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) - T.resources["diamond"] = 0 + T.resources[ORE_IRON] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX) + T.resources[ORE_GOLD] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_SILVER] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_URANIUM] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_DIAMOND] = 0 if(has_phoron) - T.resources[MATERIAL_PHORON] = 0 - T.resources["osmium"] = 0 - T.resources["hydrogen"] = 0 + T.resources[ORE_PHORON] = 0 + T.resources[ORE_PLATINUM] = 0 + T.resources[ORE_HYDROGEN] = 0 else if(tmp_cell < deep_val) // Rare metals. - T.resources["gold"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) - T.resources["silver"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) - T.resources["uranium"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) + T.resources[ORE_GOLD] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) + T.resources[ORE_SILVER] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) + T.resources[ORE_URANIUM] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) if(has_phoron) - T.resources[MATERIAL_PHORON] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) - T.resources["osmium"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) - T.resources["hydrogen"] = 0 - T.resources["diamond"] = 0 - T.resources["iron"] = 0 + T.resources[ORE_PHORON] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_PLATINUM] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) + T.resources[ORE_HYDROGEN] = 0 + T.resources[ORE_DIAMOND] = 0 + T.resources[ORE_IRON] = 0 else // Deep metals. - T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) - T.resources["diamond"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_URANIUM] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_DIAMOND] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) if(has_phoron) - T.resources[MATERIAL_PHORON] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) - T.resources["osmium"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX) - T.resources["hydrogen"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) + T.resources[ORE_PHORON] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_PLATINUM] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX) + T.resources[ORE_HYDROGEN] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) if(prob(40)) // A medium chance for these useful mats to appear in very small quantities - T.resources["iron"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) - T.resources["gold"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) - T.resources["silver"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_IRON] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_GOLD] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_SILVER] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) else - T.resources["iron"] = 0 - T.resources["gold"] = 0 - T.resources["silver"] = 0 + T.resources[ORE_IRON] = 0 + T.resources[ORE_GOLD] = 0 + T.resources[ORE_SILVER] = 0 return /datum/random_map/noise/ore/get_map_char(var/value) @@ -109,4 +109,4 @@ has_phoron = TRUE /datum/random_map/noise/ore/rich/phoron - has_phoron = TRUE \ No newline at end of file + has_phoron = TRUE diff --git a/html/changelogs/geeves-ground_ore_fixes.yml b/html/changelogs/geeves-ground_ore_fixes.yml new file mode 100644 index 00000000000..96cd079bfc0 --- /dev/null +++ b/html/changelogs/geeves-ground_ore_fixes.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - bugfix: "Fixed industrial drills not picking up sand, coal, or platinum."