From f3169ccf82043af0f50a498c34c27899bdd6c9c9 Mon Sep 17 00:00:00 2001 From: Relintai Date: Mon, 6 Jul 2020 22:38:07 +0200 Subject: [PATCH] Spawn mobs more sporadically. --- game/modules/planets/test_planet/biomes/simple_biome.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/modules/planets/test_planet/biomes/simple_biome.gd b/game/modules/planets/test_planet/biomes/simple_biome.gd index 25ab51e2..c800cbb4 100644 --- a/game/modules/planets/test_planet/biomes/simple_biome.gd +++ b/game/modules/planets/test_planet/biomes/simple_biome.gd @@ -27,7 +27,7 @@ func _generate_chunk(chunk: VoxelChunk, spawn_mobs: bool) -> void: generate_simple_terrarin(chunk, spawn_mobs) - if not Engine.editor_hint and chunk.position_y == 0 and spawn_mobs: + if not Engine.editor_hint and chunk.position_y == 0 and spawn_mobs and randi() % 4 == 0: ESS.entity_spawner.spawn_mob(0, randi() % 3, Vector3(chunk.position_x * chunk.size_x * chunk.voxel_scale + chunk.size_x / 2,\ (chunk.position_y + 1) * chunk.size_y * chunk.voxel_scale, \ chunk.position_z * chunk.size_z * chunk.voxel_scale + chunk.size_z / 2))