mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 18:46:24 +01:00
Merge branch 'master' into upstream-merge-8298
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
|
||||
var/current_cell = map[get_map_cell(x,y)]
|
||||
if(current_cell < rare_val) // Surface metals.
|
||||
T.resources["hematite"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX)
|
||||
T.resources["hematite"] = rand(RESOURCE_MID_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)
|
||||
@@ -81,7 +81,7 @@
|
||||
T.resources["lead"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["hydrogen"] = 0
|
||||
T.resources["diamond"] = 0
|
||||
T.resources["hematite"] = 0
|
||||
T.resources["hematite"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX)
|
||||
T.resources["marble"] = 0
|
||||
//T.resources["copper"] = 0
|
||||
//T.resources["tin"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
|
||||
@@ -91,7 +91,7 @@
|
||||
//T.resources["quartz"] = 0
|
||||
//T.resources["painite"] = 0
|
||||
else // Deep metals.
|
||||
T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["uranium"] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX)
|
||||
T.resources["diamond"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["verdantium"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["phoron"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX)
|
||||
@@ -99,9 +99,9 @@
|
||||
T.resources["hydrogen"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["marble"] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX)
|
||||
T.resources["lead"] = rand(RESOURCE_LOW_MIN, RESOURCE_HIGH_MAX)
|
||||
T.resources["hematite"] = 0
|
||||
T.resources["gold"] = 0
|
||||
T.resources["silver"] = 0
|
||||
T.resources["hematite"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX)
|
||||
T.resources["gold"] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX)
|
||||
T.resources["silver"] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX)
|
||||
//T.resources["copper"] = 0
|
||||
//T.resources["tin"] = 0
|
||||
//T.resources["bauxite"] = 0
|
||||
|
||||
@@ -24,6 +24,9 @@ var/global/list/map_count = list()
|
||||
var/floor_type = /turf/simulated/floor
|
||||
var/target_turf_type
|
||||
|
||||
var/skip_dense = FALSE
|
||||
var/keep_outside = FALSE
|
||||
|
||||
// Storage for the final iteration of the map.
|
||||
var/list/map = list() // Actual map.
|
||||
|
||||
@@ -61,11 +64,16 @@ var/global/list/map_count = list()
|
||||
rand_seed(seed)
|
||||
priority_process = 1
|
||||
|
||||
var/failed = FALSE
|
||||
for(var/i = 0;i<max_attempts;i++)
|
||||
if(generate())
|
||||
if(!do_not_announce) admin_notice("<span class='danger'>[capitalize(name)] generation completed in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</span>", R_DEBUG)
|
||||
return
|
||||
if(!do_not_announce) admin_notice("<span class='danger'>[capitalize(name)] failed to generate ([round(0.1*(world.timeofday-start_time),0.1)] seconds): could not produce sane map.</span>", R_DEBUG)
|
||||
if(!generate())
|
||||
failed = TRUE
|
||||
|
||||
if(!do_not_announce)
|
||||
if(!failed)
|
||||
admin_notice("<span class='danger'>[capitalize(name)] generation completed in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</span>", R_DEBUG)
|
||||
else
|
||||
admin_notice("<span class='danger'>[capitalize(name)] failed to generate ([round(0.1*(world.timeofday-start_time),0.1)] seconds): could not produce sane map.</span>", R_DEBUG)
|
||||
|
||||
/datum/random_map/proc/get_map_cell(var/x,var/y)
|
||||
if(!map)
|
||||
@@ -162,11 +170,11 @@ var/global/list/map_count = list()
|
||||
if(!current_cell)
|
||||
return 0
|
||||
var/turf/T = locate((origin_x-1)+x,(origin_y-1)+y,origin_z)
|
||||
if(!T || (target_turf_type && !istype(T,target_turf_type)))
|
||||
if(!T || (skip_dense && T.density) || (target_turf_type && !istype(T,target_turf_type)))
|
||||
return 0
|
||||
var/newpath = get_appropriate_path(map[current_cell])
|
||||
if(newpath)
|
||||
T.ChangeTurf(newpath)
|
||||
T.ChangeTurf(newpath, preserve_outdoors = keep_outside)
|
||||
get_additional_spawns(map[current_cell],T,get_spawn_dir(x, y))
|
||||
return T
|
||||
|
||||
|
||||
Reference in New Issue
Block a user