code/modules/worldgen/prefab/mapPrefab.dm 
| /proc/get_map_prefabs | Gets all prefabs of a given type. |
|---|---|
| /proc/pick_map_prefab | Picks a random prefab from given prefab type. Filters the prefabs picked based on the given tags. Choice is performed by a weighted random choice based on the prefab's probability. Prefabs marked as required are always picked first. |