mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-01 13:02:32 +00:00
Added random map generation to Southern Cross.
This commit is contained in:
@@ -20,6 +20,10 @@ SUBSYSTEM_DEF(mapping)
|
||||
maploader = new()
|
||||
load_map_templates()
|
||||
|
||||
#if UNIT_TEST
|
||||
config.generate_map = TRUE
|
||||
#endif
|
||||
|
||||
if(config.generate_map)
|
||||
// Map-gen is still very specific to the map, however putting it here should ensure it loads in the correct order.
|
||||
using_map.perform_map_generation()
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
var/list/grass_types = list(
|
||||
|
||||
)
|
||||
|
||||
/turf/simulated/floor/outdoors/grass
|
||||
name = "grass"
|
||||
icon_state = "grass0"
|
||||
@@ -11,20 +7,22 @@ var/list/grass_types = list(
|
||||
turf_layers = list(
|
||||
/turf/simulated/floor/outdoors/rocks,
|
||||
/turf/simulated/floor/outdoors/dirt
|
||||
)
|
||||
var/grass_chance = 20
|
||||
/*
|
||||
var/animal_chance = 1
|
||||
|
||||
// Weighted spawn list.
|
||||
var/list/animal_types = list(
|
||||
/mob/living/simple_mob/animal/passive/tindalos = 1
|
||||
)
|
||||
*/
|
||||
)
|
||||
var/grass_chance = 0
|
||||
var/tree_chance = 0
|
||||
var/list/grass_types = list(
|
||||
/obj/structure/flora/ausbushes/sparsegrass,
|
||||
/obj/structure/flora/ausbushes/fullgrass
|
||||
)
|
||||
)
|
||||
|
||||
/turf/simulated/floor/outdoors/grass/Initialize()
|
||||
if(!check_density())
|
||||
if(tree_chance && prob(tree_chance))
|
||||
new /obj/structure/flora/tree/sif(src)
|
||||
else if(grass_chance && prob(grass_chance))
|
||||
var/grass_type = pickweight(grass_types)
|
||||
new grass_type(src)
|
||||
. = ..()
|
||||
|
||||
/datum/category_item/catalogue/flora/sif_grass
|
||||
name = "Sivian Flora - Moss"
|
||||
@@ -39,47 +37,12 @@ var/list/grass_types = list(
|
||||
icon_state = "grass_sif0"
|
||||
initial_flooring = /decl/flooring/grass/sif
|
||||
edge_blending_priority = 4
|
||||
grass_chance = 5
|
||||
var/tree_chance = 2
|
||||
/*
|
||||
animal_chance = 0.5
|
||||
animal_types = list(
|
||||
/mob/living/simple_mob/animal/sif/diyaab = 10,
|
||||
/mob/living/simple_mob/animal/sif/glitterfly = 2,
|
||||
/mob/living/simple_mob/animal/sif/duck = 2,
|
||||
/mob/living/simple_mob/animal/sif/shantak/retaliate = 2,
|
||||
/obj/random/mob/multiple/sifmobs = 1
|
||||
)
|
||||
*/
|
||||
grass_types = list(
|
||||
/obj/structure/flora/sif/eyes = 1,
|
||||
/obj/structure/flora/sif/tendrils = 10
|
||||
)
|
||||
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/sif_grass)
|
||||
catalogue_delay = 2 SECONDS
|
||||
|
||||
/turf/simulated/floor/outdoors/grass/sif/Initialize()
|
||||
if(tree_chance && prob(tree_chance) && !check_density())
|
||||
new /obj/structure/flora/tree/sif(src)
|
||||
. = ..()
|
||||
|
||||
/turf/simulated/floor/outdoors/grass/Initialize()
|
||||
if(grass_chance && prob(grass_chance) && !check_density())
|
||||
var/grass_type = pickweight(grass_types)
|
||||
new grass_type(src)
|
||||
/*
|
||||
if(animal_chance && prob(animal_chance) && !check_density())
|
||||
var/animal_type = pickweight(animal_types)
|
||||
new animal_type(src)
|
||||
*/
|
||||
. = ..()
|
||||
|
||||
/turf/simulated/floor/outdoors/grass/forest
|
||||
name = "thick grass"
|
||||
icon_state = "grass-dark0"
|
||||
grass_chance = 80
|
||||
//tree_chance = 20
|
||||
edge_blending_priority = 5
|
||||
|
||||
/turf/simulated/floor/outdoors/grass/sif/forest
|
||||
@@ -87,11 +50,3 @@ var/list/grass_types = list(
|
||||
icon_state = "grass_sif_dark0"
|
||||
initial_flooring = /decl/flooring/grass/sif/forest
|
||||
edge_blending_priority = 5
|
||||
tree_chance = 10
|
||||
grass_chance = 1
|
||||
|
||||
grass_types = list(
|
||||
/obj/structure/flora/sif/frostbelle = 1,
|
||||
/obj/structure/flora/sif/eyes = 5,
|
||||
/obj/structure/flora/sif/tendrils = 30
|
||||
)
|
||||
26
code/game/turfs/simulated/outdoors/grass_random.dm
Normal file
26
code/game/turfs/simulated/outdoors/grass_random.dm
Normal file
@@ -0,0 +1,26 @@
|
||||
/turf/simulated/floor/outdoors/grass/sif/random
|
||||
grass_chance = 5
|
||||
grass_types = list(
|
||||
/obj/structure/flora/sif/eyes = 1,
|
||||
/obj/structure/flora/sif/tendrils = 10
|
||||
)
|
||||
tree_chance = 2
|
||||
|
||||
/turf/simulated/floor/outdoors/grass/forest/random
|
||||
grass_chance = 80
|
||||
|
||||
/turf/simulated/floor/outdoors/grass/sif/forest/random
|
||||
tree_chance = 10
|
||||
grass_chance = 1
|
||||
grass_types = list(
|
||||
/obj/structure/flora/sif/frostbelle = 1,
|
||||
/obj/structure/flora/sif/eyes = 5,
|
||||
/obj/structure/flora/sif/tendrils = 30
|
||||
)
|
||||
|
||||
/turf/simulated/floor/outdoors/grass/random
|
||||
grass_chance = 5
|
||||
grass_types = list(
|
||||
/obj/structure/flora/sif/eyes = 1,
|
||||
/obj/structure/flora/sif/tendrils = 10
|
||||
)
|
||||
Reference in New Issue
Block a user