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:
Cruix
2018-01-29 02:02:33 -08:00
committed by AnturK
parent 758763e776
commit f76b3e3b29
5 changed files with 44 additions and 14 deletions

View File

@@ -2597,6 +2597,7 @@
/obj/effect/turf_decal/stripes/line{
dir = 9
},
/obj/effect/mapping_helpers/no_lava,
/turf/open/floor/plating{
baseturfs = /turf/open/lava/smooth/lava_land_surface;
initial_gas_mix = "o2=14;n2=23;TEMP=300"
@@ -2606,6 +2607,7 @@
/obj/effect/turf_decal/stripes/line{
dir = 1
},
/obj/effect/mapping_helpers/no_lava,
/turf/open/floor/plating{
baseturfs = /turf/open/lava/smooth/lava_land_surface;
initial_gas_mix = "o2=14;n2=23;TEMP=300"
@@ -2711,6 +2713,7 @@
/obj/effect/turf_decal/stripes/line{
dir = 8
},
/obj/effect/mapping_helpers/no_lava,
/turf/open/floor/plating{
baseturfs = /turf/open/lava/smooth/lava_land_surface;
initial_gas_mix = "o2=14;n2=23;TEMP=300"
@@ -2718,6 +2721,7 @@
/area/lavaland/surface/outdoors)
"iv" = (
/obj/effect/decal/cleanable/dirt,
/obj/effect/mapping_helpers/no_lava,
/turf/open/floor/plating{
baseturfs = /turf/open/lava/smooth/lava_land_surface;
initial_gas_mix = "o2=14;n2=23;TEMP=300"
@@ -3097,6 +3101,7 @@
/obj/effect/turf_decal/stripes/corner{
dir = 4
},
/obj/effect/mapping_helpers/no_lava,
/turf/open/floor/plating{
baseturfs = /turf/open/lava/smooth/lava_land_surface;
initial_gas_mix = "o2=14;n2=23;TEMP=300"
@@ -3161,6 +3166,7 @@
/turf/open/floor/plasteel,
/area/ruin/unpowered/syndicate_lava_base/main)
"jk" = (
/obj/effect/mapping_helpers/no_lava,
/turf/open/floor/plating{
baseturfs = /turf/open/lava/smooth/lava_land_surface;
initial_gas_mix = "o2=14;n2=23;TEMP=300"
@@ -4331,6 +4337,7 @@
/obj/effect/turf_decal/stripes/line{
dir = 10
},
/obj/effect/mapping_helpers/no_lava,
/turf/open/floor/plating{
baseturfs = /turf/open/lava/smooth/lava_land_surface;
initial_gas_mix = "o2=14;n2=23;TEMP=300"
@@ -4338,6 +4345,7 @@
/area/lavaland/surface/outdoors)
"lw" = (
/obj/effect/turf_decal/stripes/line,
/obj/effect/mapping_helpers/no_lava,
/turf/open/floor/plating{
baseturfs = /turf/open/lava/smooth/lava_land_surface;
initial_gas_mix = "o2=14;n2=23;TEMP=300"

View File

@@ -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 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_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.
/*

View File

@@ -7,10 +7,14 @@
/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/num_spawned = 0
while(num_spawned < nodes)
var/turf/F = locate(rand(min_x, max_x), rand(min_y, max_y), target_z)
river_nodes += new /obj/effect/landmark/river_waypoint(F)
var/list/possible_locs = block(locate(min_x, min_y, target_z), locate(max_x, max_y, target_z))
while(num_spawned < nodes && possible_locs.len)
var/turf/T = pick(possible_locs)
var/area/A = get_area(T)
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
@@ -43,7 +47,7 @@
cur_turf = get_step(cur_turf, cur_dir)
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
cur_dir = get_dir(cur_turf, target_turf)
cur_turf = get_step(cur_turf, cur_dir)
@@ -71,7 +75,7 @@
for(var/F in RANGE_TURFS(1, src) - src)
var/turf/T = F
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
if(!logged_turf_type && ismineralturf(T))

View File

@@ -4,8 +4,8 @@
/obj/effect/baseturf_helper //Set the baseturfs of every turf in the /area/ it is placed.
name = "baseturf editor"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "syndballoon"
icon = 'icons/effects/mapping_helpers.dmi'
icon_state = ""
var/baseturf = null
layer = POINT_LAYER
@@ -86,18 +86,35 @@
name = "picky lavaland basalt baseturf helper"
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.
GLOBAL_LIST_EMPTY(z_is_planet)
/obj/effect/mapping_helpers/planet_z //adds the map it is on to the z_is_planet list
name = "planet z helper"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "syndballoon"
layer = POINT_LAYER
/obj/effect/mapping_helpers/planet_z/Initialize()
. = ..()
var/turf/T = get_turf(src)
GLOB.z_is_planet["[T.z]"] = TRUE
return INITIALIZE_HINT_QDEL

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B