external config
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user