mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Added map generation lava protection to the syndicate lava base (#34764)
* Added mapping helper for preventing lava river generation * Added lava protection to the syndicate base bridge * Re-added decals to the syndicate lava base bridge
This commit is contained in:
@@ -2597,6 +2597,7 @@
|
|||||||
/obj/effect/turf_decal/stripes/line{
|
/obj/effect/turf_decal/stripes/line{
|
||||||
dir = 9
|
dir = 9
|
||||||
},
|
},
|
||||||
|
/obj/effect/mapping_helpers/no_lava,
|
||||||
/turf/open/floor/plating{
|
/turf/open/floor/plating{
|
||||||
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
||||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||||
@@ -2606,6 +2607,7 @@
|
|||||||
/obj/effect/turf_decal/stripes/line{
|
/obj/effect/turf_decal/stripes/line{
|
||||||
dir = 1
|
dir = 1
|
||||||
},
|
},
|
||||||
|
/obj/effect/mapping_helpers/no_lava,
|
||||||
/turf/open/floor/plating{
|
/turf/open/floor/plating{
|
||||||
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
||||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||||
@@ -2711,6 +2713,7 @@
|
|||||||
/obj/effect/turf_decal/stripes/line{
|
/obj/effect/turf_decal/stripes/line{
|
||||||
dir = 8
|
dir = 8
|
||||||
},
|
},
|
||||||
|
/obj/effect/mapping_helpers/no_lava,
|
||||||
/turf/open/floor/plating{
|
/turf/open/floor/plating{
|
||||||
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
||||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||||
@@ -2718,6 +2721,7 @@
|
|||||||
/area/lavaland/surface/outdoors)
|
/area/lavaland/surface/outdoors)
|
||||||
"iv" = (
|
"iv" = (
|
||||||
/obj/effect/decal/cleanable/dirt,
|
/obj/effect/decal/cleanable/dirt,
|
||||||
|
/obj/effect/mapping_helpers/no_lava,
|
||||||
/turf/open/floor/plating{
|
/turf/open/floor/plating{
|
||||||
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
||||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||||
@@ -3097,6 +3101,7 @@
|
|||||||
/obj/effect/turf_decal/stripes/corner{
|
/obj/effect/turf_decal/stripes/corner{
|
||||||
dir = 4
|
dir = 4
|
||||||
},
|
},
|
||||||
|
/obj/effect/mapping_helpers/no_lava,
|
||||||
/turf/open/floor/plating{
|
/turf/open/floor/plating{
|
||||||
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
||||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||||
@@ -3161,6 +3166,7 @@
|
|||||||
/turf/open/floor/plasteel,
|
/turf/open/floor/plasteel,
|
||||||
/area/ruin/unpowered/syndicate_lava_base/main)
|
/area/ruin/unpowered/syndicate_lava_base/main)
|
||||||
"jk" = (
|
"jk" = (
|
||||||
|
/obj/effect/mapping_helpers/no_lava,
|
||||||
/turf/open/floor/plating{
|
/turf/open/floor/plating{
|
||||||
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
||||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||||
@@ -4331,6 +4337,7 @@
|
|||||||
/obj/effect/turf_decal/stripes/line{
|
/obj/effect/turf_decal/stripes/line{
|
||||||
dir = 10
|
dir = 10
|
||||||
},
|
},
|
||||||
|
/obj/effect/mapping_helpers/no_lava,
|
||||||
/turf/open/floor/plating{
|
/turf/open/floor/plating{
|
||||||
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
||||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||||
@@ -4338,6 +4345,7 @@
|
|||||||
/area/lavaland/surface/outdoors)
|
/area/lavaland/surface/outdoors)
|
||||||
"lw" = (
|
"lw" = (
|
||||||
/obj/effect/turf_decal/stripes/line,
|
/obj/effect/turf_decal/stripes/line,
|
||||||
|
/obj/effect/mapping_helpers/no_lava,
|
||||||
/turf/open/floor/plating{
|
/turf/open/floor/plating{
|
||||||
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
baseturfs = /turf/open/lava/smooth/lava_land_surface;
|
||||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
|||||||
#define UNUSED_TRANSIT_TURF_1 2
|
#define UNUSED_TRANSIT_TURF_1 2
|
||||||
#define CAN_BE_DIRTY_1 4 // If a turf can be made dirty at roundstart. This is also used in areas.
|
#define CAN_BE_DIRTY_1 4 // If a turf can be made dirty at roundstart. This is also used in areas.
|
||||||
#define NO_DEATHRATTLE_1 16 // Do not notify deadchat about any deaths that occur on this turf.
|
#define NO_DEATHRATTLE_1 16 // Do not notify deadchat about any deaths that occur on this turf.
|
||||||
#define NO_RUINS_1 32 //Blocks ruins spawning in the area
|
#define NO_RUINS_1 32 //Blocks ruins spawning on the turf
|
||||||
|
#define NO_LAVA_GEN_1 64 //Blocks lava rivers being generated on the turf
|
||||||
//#define CHECK_RICOCHET_1 32 //Same thing as atom flag.
|
//#define CHECK_RICOCHET_1 32 //Same thing as atom flag.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -7,11 +7,15 @@
|
|||||||
/proc/spawn_rivers(target_z, nodes = 4, turf_type = /turf/open/lava/smooth/lava_land_surface, whitelist_area = /area/lavaland/surface/outdoors, min_x = RANDOM_LOWER_X, min_y = RANDOM_LOWER_Y, max_x = RANDOM_UPPER_X, max_y = RANDOM_UPPER_Y)
|
/proc/spawn_rivers(target_z, nodes = 4, turf_type = /turf/open/lava/smooth/lava_land_surface, whitelist_area = /area/lavaland/surface/outdoors, min_x = RANDOM_LOWER_X, min_y = RANDOM_LOWER_Y, max_x = RANDOM_UPPER_X, max_y = RANDOM_UPPER_Y)
|
||||||
var/list/river_nodes = list()
|
var/list/river_nodes = list()
|
||||||
var/num_spawned = 0
|
var/num_spawned = 0
|
||||||
while(num_spawned < nodes)
|
var/list/possible_locs = block(locate(min_x, min_y, target_z), locate(max_x, max_y, target_z))
|
||||||
var/turf/F = locate(rand(min_x, max_x), rand(min_y, max_y), target_z)
|
while(num_spawned < nodes && possible_locs.len)
|
||||||
|
var/turf/T = pick(possible_locs)
|
||||||
river_nodes += new /obj/effect/landmark/river_waypoint(F)
|
var/area/A = get_area(T)
|
||||||
num_spawned++
|
if(!istype(A, whitelist_area) || (T.flags_1 & NO_LAVA_GEN_1))
|
||||||
|
possible_locs -= T
|
||||||
|
else
|
||||||
|
river_nodes += new /obj/effect/landmark/river_waypoint(T)
|
||||||
|
num_spawned++
|
||||||
|
|
||||||
//make some randomly pathing rivers
|
//make some randomly pathing rivers
|
||||||
for(var/A in river_nodes)
|
for(var/A in river_nodes)
|
||||||
@@ -43,7 +47,7 @@
|
|||||||
|
|
||||||
cur_turf = get_step(cur_turf, cur_dir)
|
cur_turf = get_step(cur_turf, cur_dir)
|
||||||
var/area/new_area = get_area(cur_turf)
|
var/area/new_area = get_area(cur_turf)
|
||||||
if(!istype(new_area, whitelist_area)) //Rivers will skip ruins
|
if(!istype(new_area, whitelist_area) || (cur_turf.flags_1 & NO_LAVA_GEN_1)) //Rivers will skip ruins
|
||||||
detouring = 0
|
detouring = 0
|
||||||
cur_dir = get_dir(cur_turf, target_turf)
|
cur_dir = get_dir(cur_turf, target_turf)
|
||||||
cur_turf = get_step(cur_turf, cur_dir)
|
cur_turf = get_step(cur_turf, cur_dir)
|
||||||
@@ -71,7 +75,7 @@
|
|||||||
for(var/F in RANGE_TURFS(1, src) - src)
|
for(var/F in RANGE_TURFS(1, src) - src)
|
||||||
var/turf/T = F
|
var/turf/T = F
|
||||||
var/area/new_area = get_area(T)
|
var/area/new_area = get_area(T)
|
||||||
if(!T || (T.density && !ismineralturf(T)) || istype(T, /turf/open/indestructible) || (whitelisted_area && !istype(new_area, whitelisted_area)))
|
if(!T || (T.density && !ismineralturf(T)) || istype(T, /turf/open/indestructible) || (whitelisted_area && !istype(new_area, whitelisted_area)) || (T.flags_1 & NO_LAVA_GEN_1) )
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if(!logged_turf_type && ismineralturf(T))
|
if(!logged_turf_type && ismineralturf(T))
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
/obj/effect/baseturf_helper //Set the baseturfs of every turf in the /area/ it is placed.
|
/obj/effect/baseturf_helper //Set the baseturfs of every turf in the /area/ it is placed.
|
||||||
name = "baseturf editor"
|
name = "baseturf editor"
|
||||||
icon = 'icons/obj/items_and_weapons.dmi'
|
icon = 'icons/effects/mapping_helpers.dmi'
|
||||||
icon_state = "syndballoon"
|
icon_state = ""
|
||||||
var/baseturf = null
|
var/baseturf = null
|
||||||
layer = POINT_LAYER
|
layer = POINT_LAYER
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
return ..()
|
return ..()
|
||||||
whitelist = typecacheof(whitelist)
|
whitelist = typecacheof(whitelist)
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/effect/baseturf_helper/picky/replace_baseturf(turf/thing)
|
/obj/effect/baseturf_helper/picky/replace_baseturf(turf/thing)
|
||||||
if(!whitelist[thing.type])
|
if(!whitelist[thing.type])
|
||||||
return
|
return
|
||||||
@@ -86,18 +86,35 @@
|
|||||||
name = "picky lavaland basalt baseturf helper"
|
name = "picky lavaland basalt baseturf helper"
|
||||||
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||||
|
|
||||||
|
|
||||||
|
/obj/effect/mapping_helpers
|
||||||
|
icon = 'icons/effects/mapping_helpers.dmi'
|
||||||
|
icon_state = ""
|
||||||
|
|
||||||
|
/obj/effect/mapping_helpers/Initialize()
|
||||||
|
..()
|
||||||
|
return INITIALIZE_HINT_QDEL
|
||||||
|
|
||||||
|
//needs to do its thing before spawn_rivers() is called
|
||||||
|
INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
|
||||||
|
|
||||||
|
/obj/effect/mapping_helpers/no_lava
|
||||||
|
icon_state = "no_lava"
|
||||||
|
|
||||||
|
/obj/effect/mapping_helpers/no_lava/Initialize()
|
||||||
|
. = ..()
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
T.flags_1 |= NO_LAVA_GEN_1
|
||||||
|
|
||||||
//Contains the list of planetary z-levels defined by the planet_z helper.
|
//Contains the list of planetary z-levels defined by the planet_z helper.
|
||||||
GLOBAL_LIST_EMPTY(z_is_planet)
|
GLOBAL_LIST_EMPTY(z_is_planet)
|
||||||
|
|
||||||
/obj/effect/mapping_helpers/planet_z //adds the map it is on to the z_is_planet list
|
/obj/effect/mapping_helpers/planet_z //adds the map it is on to the z_is_planet list
|
||||||
name = "planet z helper"
|
name = "planet z helper"
|
||||||
icon = 'icons/obj/items_and_weapons.dmi'
|
|
||||||
icon_state = "syndballoon"
|
|
||||||
layer = POINT_LAYER
|
layer = POINT_LAYER
|
||||||
|
|
||||||
/obj/effect/mapping_helpers/planet_z/Initialize()
|
/obj/effect/mapping_helpers/planet_z/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
GLOB.z_is_planet["[T.z]"] = TRUE
|
GLOB.z_is_planet["[T.z]"] = TRUE
|
||||||
return INITIALIZE_HINT_QDEL
|
|
||||||
|
|
||||||
|
|||||||
BIN
icons/effects/mapping_helpers.dmi
Normal file
BIN
icons/effects/mapping_helpers.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 600 B |
Reference in New Issue
Block a user