mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
[READY FOR REVIEW] Lava land generation overhaul / variety (#21838)
* she lavas on my land till I chasm? * need this * whoops * qwerty you are a dumbass * now with 12 more maps per map * repaths mesons, advanced mesons / meson implants show chasms * more stuff * range not radius dipshit * sprites yipee * define it * undo mesons * removes things I missed * Apply suggestions from code review Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * I'm lavaing it --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
co-authored by
Henri215
parent
100a9d18b6
commit
8803f536b7
@@ -12,6 +12,10 @@ SUBSYSTEM_DEF(mapping)
|
||||
var/list/ghostteleportlocs
|
||||
///List of areas that exist on the station this shift
|
||||
var/list/existing_station_areas
|
||||
///What do we have as the lavaland theme today?
|
||||
var/turf/simulated/floor/lavaland_theme
|
||||
///What primary cave theme we have picked for cave generation today.
|
||||
var/cave_theme
|
||||
|
||||
// This has to be here because world/New() uses [station_name()], which looks this datum up
|
||||
/datum/controller/subsystem/mapping/PreInit()
|
||||
@@ -36,6 +40,10 @@ SUBSYSTEM_DEF(mapping)
|
||||
F << next_map.type
|
||||
|
||||
/datum/controller/subsystem/mapping/Initialize()
|
||||
lavaland_theme = pick(/turf/simulated/floor/plating/lava/smooth/lava_land_surface, /turf/simulated/floor/plating/lava/smooth/lava_land_surface/plasma, /turf/simulated/floor/chasm/straight_down/lava_land_surface)
|
||||
log_startup_progress("We feel like [lavaland_theme] today...") //We load this first. In the event some nerd ever makes a surface map, and we don't have it in lavaland in the event lavaland is disabled.
|
||||
cave_theme = pick(BLOCKED_BURROWS, CLASSIC_CAVES, DEADLY_DEEPROCK)
|
||||
log_startup_progress("We feel like [cave_theme] today...")
|
||||
// Load all Z level templates
|
||||
preloadTemplates()
|
||||
|
||||
@@ -63,8 +71,22 @@ SUBSYSTEM_DEF(mapping)
|
||||
log_startup_progress("Populating lavaland...")
|
||||
var/lavaland_setup_timer = start_watch()
|
||||
seedRuins(list(level_name_to_num(MINING)), GLOB.configuration.ruins.lavaland_ruin_budget, /area/lavaland/surface/outdoors/unexplored, GLOB.lava_ruins_templates)
|
||||
spawn_rivers(level_name_to_num(MINING))
|
||||
log_startup_progress("Successfully populated lavaland in [stop_watch(lavaland_setup_timer)]s.")
|
||||
switch(lavaland_theme)
|
||||
if(/turf/simulated/floor/plating/lava/smooth/lava_land_surface)
|
||||
spawn_rivers(level_name_to_num(MINING)) //Default spawn, no tweaks needed
|
||||
if(/turf/simulated/floor/plating/lava/smooth/lava_land_surface/plasma) //More rivers, smaller
|
||||
spawn_rivers(level_name_to_num(MINING), nodes = 2)
|
||||
spawn_rivers(level_name_to_num(MINING), nodes = 2)
|
||||
if(/turf/simulated/floor/chasm/straight_down/lava_land_surface) //Thiner chasms, bridges, reaches to edge of map.
|
||||
spawn_rivers(level_name_to_num(MINING), nodes = 6, turf_type = /turf/simulated/floor/plating/lava/smooth/mapping_lava, whitelist_area = /area/lavaland/surface/outdoors, min_x = 50, min_y = 7, max_x = 250, max_y = 225, prob = 10, prob_loss = 5)
|
||||
var/time_spent = stop_watch(lavaland_setup_timer)
|
||||
log_startup_progress("Successfully populated lavaland in [time_spent]s.")
|
||||
if(time_spent >= 10)
|
||||
log_startup_progress("!!!ERROR!!! Lavaland took FAR too long to generate at [time_spent] seconds. Notify maintainers immediately! !!!ERROR!!!") //In 3 testing cases so far, I have had it take far too long to generate. I am 99% sure I have fixed this issue, but never hurts to be sure
|
||||
WARNING("!!!ERROR!!! Lavaland took FAR too long to generate at [time_spent] seconds. Notify maintainers immediately! !!!ERROR!!!")
|
||||
var/loud_annoying_alarm = sound('sound/machines/engine_alert1.ogg')
|
||||
for(var/get_player_attention in GLOB.player_list)
|
||||
SEND_SOUND(get_player_attention, loud_annoying_alarm)
|
||||
else
|
||||
log_startup_progress("Skipping lavaland ruins...")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user