diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 4cee7909c04..dcfa1165f2d 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -43,6 +43,7 @@ //Mining resources (for the large drills). var/has_resources var/list/resources + var/image/resource_indicator // Plating data. var/base_name = "plating" @@ -118,6 +119,8 @@ if (z_flags & ZM_MIMIC_BELOW) cleanup_zmimic() + resource_indicator = null + ..() return QDEL_HINT_IWILLGC diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index 059ea95f13c..276470aa078 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -107,6 +107,10 @@ attached_satchel.insert_into_storage(ore) else if(istype(get_turf(src), /turf/simulated/floor)) var/turf/simulated/floor/T = get_turf(src) + var/turf/below_turf = GetBelow(T) + if(below_turf && !istype(below_turf.loc, /area/mine) && !istype(below_turf.loc, /area/exoplanet) && !istype(below_turf.loc, /area/template_noop)) + system_error("Potential station breach below.") + return T.ex_act(2.0) //Dig out the tasty ores. @@ -116,6 +120,8 @@ while(length(resource_field) && !harvesting.resources) harvesting.has_resources = FALSE harvesting.resources = null + harvesting.cut_overlay(harvesting.resource_indicator) + QDEL_NULL(harvesting.resource_indicator) resource_field -= harvesting if(length(resource_field)) harvesting = pick(resource_field) @@ -161,6 +167,8 @@ if(!found_resource) harvesting.has_resources = FALSE harvesting.resources = null + harvesting.cut_overlay(harvesting.resource_indicator) + QDEL_NULL(harvesting.resource_indicator) resource_field -= harvesting else active = FALSE diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index e2ef4cce45b..405be2adf19 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -407,6 +407,21 @@ var/list/mineral_can_smooth_with = list( visible_message(SPAN_NOTICE("An old dusty crate was buried within!")) new /obj/structure/closet/crate/secure/loot(src) +/turf/simulated/mineral/ChangeTurf(N, tell_universe, force_lighting_update, ignore_override, mapload) + var/old_has_resources = has_resources + var/list/old_resources = resources + var/image/old_resource_indicator = resource_indicator + + var/turf/new_turf = ..() + + new_turf.has_resources = old_has_resources + new_turf.resources = old_resources + new_turf.resource_indicator = old_resource_indicator + if(new_turf.resource_indicator) + new_turf.add_overlay(new_turf.resource_indicator) + + return new_turf + /turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F) //with skill and luck, players can cleanly extract finds //otherwise, they come out inside a chunk of rock diff --git a/code/modules/overmap/exoplanets/decor/_turfs.dm b/code/modules/overmap/exoplanets/decor/_turfs.dm index fc26df31f32..cc3b68fc503 100644 --- a/code/modules/overmap/exoplanets/decor/_turfs.dm +++ b/code/modules/overmap/exoplanets/decor/_turfs.dm @@ -60,6 +60,8 @@ /turf/simulated/floor/exoplanet/update_icon(var/update_neighbors) if(has_edge_icon) cut_overlays() + if(resource_indicator) + add_overlay(resource_indicator) if(LAZYLEN(decals)) add_overlay(decals) for(var/direction in cardinal) diff --git a/code/modules/overmap/exoplanets/themes/_theme.dm b/code/modules/overmap/exoplanets/themes/_theme.dm index 8864d1a42e7..3b8fb8a1964 100644 --- a/code/modules/overmap/exoplanets/themes/_theme.dm +++ b/code/modules/overmap/exoplanets/themes/_theme.dm @@ -87,7 +87,7 @@ ) /// relatively speaking, the % (0-1) of turfs that will have resources generated in them - var/gnd_ore_coverage = 0.5 + var/gnd_ore_coverage = 0.3 /// List of random seeds used for ore noise generation. Automatically generated on New() using wall_ore_levels. var/list/ore_seeds var/list/gnd_ore_seeds @@ -258,6 +258,11 @@ gen_turf.resources[ORE_SAND] = rand(3, 5) gen_turf.resources[ORE_COAL] = rand(3, 5) if(ground_resources_roll) + var/image/resource_indicator = image('icons/obj/mining.dmi', null, "indicator_" + ground_resources_roll, gen_turf.layer, pick(cardinal)) + resource_indicator.alpha = rand(30, 60) + gen_turf.resource_indicator = resource_indicator + if(!gen_turf.density) + gen_turf.add_overlay(resource_indicator) for(var/OT in ground_ore_levels[ground_resources_roll]) var/rand_vals = ground_ore_levels[ground_resources_roll][OT] gen_turf.resources[OT] = rand(rand_vals[1], rand_vals[2]) diff --git a/html/changelogs/geeves-ore_patches.yml b/html/changelogs/geeves-ore_patches.yml new file mode 100644 index 00000000000..ac2959707af --- /dev/null +++ b/html/changelogs/geeves-ore_patches.yml @@ -0,0 +1,8 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Added visible ore patches to exoplanets. You can set up industrial drills on top of them to retrieve the deep ore." + - rscadd: "Destroying a wall on an exoplanet that has deep ore beneath it will now longer delete the deep ore." + - tweak: "Reduced the amount of deep ore that spawns, now that it's easier to detect." diff --git a/icons/obj/mining.dmi b/icons/obj/mining.dmi index 5a39b4ce7bd..e34ac6d3c62 100644 Binary files a/icons/obj/mining.dmi and b/icons/obj/mining.dmi differ