/tg/ Station 13 - Modules - TypesVar Details - Proc Details

biome

This datum handles the transitioning from a turf to a specific biome, and handles spawning decorative structures and mobs.

Vars

fauna_densityChance of having a mob from the fauna types list spawn
fauna_typesWeighted list of type paths of fauna that can be spawned when the turf spawns fauna.
feature_densityChance of spawning special features, such as geysers.
feature_typesWeighted list of extra features that can spawn in the biome, such as geysers. Gets expanded automatically.
flora_densityChance of having a structure from the flora types list spawn
flora_typesWeighted list of type paths of flora that can be spawned when the turf spawns flora.
turf_typeType of turf this biome creates

Procs

generate_turfThis proc handles the creation of a turf of a specific biome type
generate_turf_for_terrainThis proc handles the creation of a turf of a specific biome type, assuming that the turf has not been initialized yet. Don't call this unless you know what you're doing.
generate_turfs_for_terrainThis proc handles the sequential creation of turfs of a specific biome type in order to optimize the generation for large amount of turfs.
populate_turfThis proc handles populating the given turf based on whether flora, features and fauna are allowed. Does not take megafauna into account.
populate_turfsThis proc handles populating the given turfs based on whether flora, features and fauna are allowed. Does not take megafauna into account.

Var Details

fauna_density

Chance of having a mob from the fauna types list spawn

fauna_types

Weighted list of type paths of fauna that can be spawned when the turf spawns fauna.

feature_density

Chance of spawning special features, such as geysers.

feature_types

Weighted list of extra features that can spawn in the biome, such as geysers. Gets expanded automatically.

flora_density

Chance of having a structure from the flora types list spawn

flora_types

Weighted list of type paths of flora that can be spawned when the turf spawns flora.

turf_type

Type of turf this biome creates

Proc Details

generate_turf

This proc handles the creation of a turf of a specific biome type

generate_turf_for_terrain

This proc handles the creation of a turf of a specific biome type, assuming that the turf has not been initialized yet. Don't call this unless you know what you're doing.

generate_turfs_for_terrain

This proc handles the sequential creation of turfs of a specific biome type in order to optimize the generation for large amount of turfs.

Arguments:

Returns a new list of turfs that were generated by the biome.

populate_turf

This proc handles populating the given turf based on whether flora, features and fauna are allowed. Does not take megafauna into account.

populate_turfs

This proc handles populating the given turfs based on whether flora, features and fauna are allowed. Does not take megafauna into account.

Does nothing if flora_allowed, features_allowed and fauna_allowed are FALSE, or if there's no flora, feature or fauna types for the matching allowed type. Aka, we return early if the proc wouldn't do anything anyway.