mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-24 00:51:26 +00:00
planets
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
var/deep_val = 0.8 // Threshold for deep metals, set in new as percentage of cell_range.
|
||||
var/rare_val = 0.7 // Threshold for rare metal, set in new as percentage of cell_range.
|
||||
var/chunk_size = 4 // Size each cell represents on map
|
||||
var/has_phoron = FALSE // For lore reasons: phoron is only found in certain places and we are running out of it
|
||||
|
||||
/datum/random_map/noise/ore/New()
|
||||
rare_val = cell_range * rare_val
|
||||
@@ -46,7 +47,7 @@
|
||||
var/turf/T = locate(tx+j, ty+i, origin_z)
|
||||
if(!istype(T) || !T.has_resources)
|
||||
continue
|
||||
if(!priority_process)
|
||||
if(!priority_process)
|
||||
CHECK_TICK
|
||||
T.resources = list()
|
||||
T.resources["silicates"] = rand(3,5)
|
||||
@@ -54,7 +55,7 @@
|
||||
|
||||
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)
|
||||
@@ -68,7 +69,8 @@
|
||||
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[MATERIAL_PHORON] = 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_MID_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["hydrogen"] = 0
|
||||
T.resources["diamond"] = 0
|
||||
@@ -76,7 +78,8 @@
|
||||
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[MATERIAL_PHORON] = 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)
|
||||
if(prob(40)) // A medium chance for these useful mats to appear in very small quantities
|
||||
@@ -100,4 +103,9 @@
|
||||
/datum/random_map/noise/ore/rich
|
||||
deep_val = 0.7
|
||||
rare_val = 0.5
|
||||
|
||||
|
||||
/datum/random_map/noise/ore/phoron
|
||||
has_phoron = TRUE
|
||||
|
||||
/datum/random_map/noise/ore/rich/phoron
|
||||
has_phoron = TRUE
|
||||
Reference in New Issue
Block a user