external config

This commit is contained in:
2026-03-18 23:19:58 +00:00
parent a5154f73dd
commit 15c0d1c7a2
9 changed files with 87 additions and 10 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
use crate::config::GameConfig;
use crate::constants::TILE_SIZE;
use crate::constants::*;
use crate::entities::shared_components::Ambulatory;
@@ -40,10 +41,10 @@ pub fn spawn_dorfs(
mut commands: Commands,
asset_server: Res<AssetServer>,
mut rng_q: Query<&mut WyRand, With<GlobalRng>>,
config: Res<GameConfig>,
) {
if let Ok(mut rng) = rng_q.single_mut() {
// Spawn a handful of dorfs
for _ in 0..40 {
for _ in 0..config.spawn_counts.dorfs {
let cit = commands
.spawn(Dorf::new(
&asset_server,