Exoplanet Ore Patches (#16271)

* the end of the beginning

* SPEED

* SPEED

* we real speed

* fix ore gen

* re-organize exoplanet stuff

* reorg and rename defines, fix ores

* Everything Else

* 1.2.0+a3 rust_g

* fix merge

* get rid of noise maps

* fix adhomai, delete random maps

* make adhomai poggers or something idk

* debug

* crystal planet, misc bugfixes

* fixes

* log

* change mineral gen to make adhomai work

* try this

* huh

* huhw

* rust_g 1.2.0+a4

* Ore Patches

* finishing touches hopefully

---------

Co-authored-by: John Wildkins <john.wildkins@gmail.com>
This commit is contained in:
Geeves
2023-06-22 22:29:48 +02:00
committed by GitHub
parent 2395a9c2ba
commit 2b70d859f0
7 changed files with 42 additions and 1 deletions

View File

@@ -43,6 +43,7 @@
//Mining resources (for the large drills). //Mining resources (for the large drills).
var/has_resources var/has_resources
var/list/resources var/list/resources
var/image/resource_indicator
// Plating data. // Plating data.
var/base_name = "plating" var/base_name = "plating"
@@ -118,6 +119,8 @@
if (z_flags & ZM_MIMIC_BELOW) if (z_flags & ZM_MIMIC_BELOW)
cleanup_zmimic() cleanup_zmimic()
resource_indicator = null
..() ..()
return QDEL_HINT_IWILLGC return QDEL_HINT_IWILLGC

View File

@@ -107,6 +107,10 @@
attached_satchel.insert_into_storage(ore) attached_satchel.insert_into_storage(ore)
else if(istype(get_turf(src), /turf/simulated/floor)) else if(istype(get_turf(src), /turf/simulated/floor))
var/turf/simulated/floor/T = get_turf(src) 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) T.ex_act(2.0)
//Dig out the tasty ores. //Dig out the tasty ores.
@@ -116,6 +120,8 @@
while(length(resource_field) && !harvesting.resources) while(length(resource_field) && !harvesting.resources)
harvesting.has_resources = FALSE harvesting.has_resources = FALSE
harvesting.resources = null harvesting.resources = null
harvesting.cut_overlay(harvesting.resource_indicator)
QDEL_NULL(harvesting.resource_indicator)
resource_field -= harvesting resource_field -= harvesting
if(length(resource_field)) if(length(resource_field))
harvesting = pick(resource_field) harvesting = pick(resource_field)
@@ -161,6 +167,8 @@
if(!found_resource) if(!found_resource)
harvesting.has_resources = FALSE harvesting.has_resources = FALSE
harvesting.resources = null harvesting.resources = null
harvesting.cut_overlay(harvesting.resource_indicator)
QDEL_NULL(harvesting.resource_indicator)
resource_field -= harvesting resource_field -= harvesting
else else
active = FALSE active = FALSE

View File

@@ -407,6 +407,21 @@ var/list/mineral_can_smooth_with = list(
visible_message(SPAN_NOTICE("An old dusty crate was buried within!")) visible_message(SPAN_NOTICE("An old dusty crate was buried within!"))
new /obj/structure/closet/crate/secure/loot(src) 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) /turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F)
//with skill and luck, players can cleanly extract finds //with skill and luck, players can cleanly extract finds
//otherwise, they come out inside a chunk of rock //otherwise, they come out inside a chunk of rock

View File

@@ -60,6 +60,8 @@
/turf/simulated/floor/exoplanet/update_icon(var/update_neighbors) /turf/simulated/floor/exoplanet/update_icon(var/update_neighbors)
if(has_edge_icon) if(has_edge_icon)
cut_overlays() cut_overlays()
if(resource_indicator)
add_overlay(resource_indicator)
if(LAZYLEN(decals)) if(LAZYLEN(decals))
add_overlay(decals) add_overlay(decals)
for(var/direction in cardinal) for(var/direction in cardinal)

View File

@@ -87,7 +87,7 @@
) )
/// relatively speaking, the % (0-1) of turfs that will have resources generated in them /// 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. /// List of random seeds used for ore noise generation. Automatically generated on New() using wall_ore_levels.
var/list/ore_seeds var/list/ore_seeds
var/list/gnd_ore_seeds var/list/gnd_ore_seeds
@@ -258,6 +258,11 @@
gen_turf.resources[ORE_SAND] = rand(3, 5) gen_turf.resources[ORE_SAND] = rand(3, 5)
gen_turf.resources[ORE_COAL] = rand(3, 5) gen_turf.resources[ORE_COAL] = rand(3, 5)
if(ground_resources_roll) 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]) for(var/OT in ground_ore_levels[ground_resources_roll])
var/rand_vals = ground_ore_levels[ground_resources_roll][OT] var/rand_vals = ground_ore_levels[ground_resources_roll][OT]
gen_turf.resources[OT] = rand(rand_vals[1], rand_vals[2]) gen_turf.resources[OT] = rand(rand_vals[1], rand_vals[2])

View File

@@ -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."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 40 KiB