Adds basic camp generation and placement
Adds basic camp generation and placement logic to the map generation process. It attempts to place the camp in a valid location, avoiding paths and water bodies. It also sets the player's spawn point to the center of the generated camp, including some basic camp props like a tent, campfire, and bed. Additionally, vegetation spawning is now dependent on the `should_spawn_*` methods of the `CellDataResource`, allowing more control over what spawns where.
This commit is contained in:
parent
3959333534
commit
a1efaf6294
8 changed files with 402 additions and 125 deletions
|
|
@ -45,13 +45,13 @@ func spawn_content():
|
|||
if cell_info == null:
|
||||
return
|
||||
|
||||
if tree_spawner:
|
||||
if tree_spawner and cell_info.should_spawn_trees():
|
||||
tree_spawner.spawn_trees_for_cell(cell_info)
|
||||
if grass_spawner:
|
||||
if grass_spawner and cell_info.should_spawn_grass():
|
||||
grass_spawner.spawn_grass_for_cell(cell_info)
|
||||
if bush_spawner:
|
||||
if bush_spawner and cell_info.should_spawn_bushes():
|
||||
bush_spawner.spawn_bushes_for_cell(cell_info)
|
||||
if flower_spawner:
|
||||
if flower_spawner and cell_info.should_spawn_flowers():
|
||||
flower_spawner.spawn_flowers_for_cell(cell_info)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue