debug key now dumps all game variables to console

This commit is contained in:
yuni 2024-06-12 00:57:29 +02:00
parent 8636b08b5f
commit 3b540b290d

View file

@ -402,6 +402,7 @@ fn debug(
Assets<ExtendedMaterial<StandardMaterial, load::AsteroidSurface>>, Assets<ExtendedMaterial<StandardMaterial, load::AsteroidSurface>>,
>, >,
mut achievement_tracker: ResMut<var::AchievementTracker>, mut achievement_tracker: ResMut<var::AchievementTracker>,
vars: Res<var::GameVars>,
materials: Query<(Entity, Option<&Name>, &Handle<Mesh>)>, materials: Query<(Entity, Option<&Name>, &Handle<Mesh>)>,
) { ) {
if settings.dev_mode && keyboard_input.just_pressed(KeyCode::KeyP) { if settings.dev_mode && keyboard_input.just_pressed(KeyCode::KeyP) {
@ -415,6 +416,7 @@ fn debug(
} }
if settings.dev_mode && keyboard_input.just_pressed(KeyCode::KeyN) { if settings.dev_mode && keyboard_input.just_pressed(KeyCode::KeyN) {
achievement_tracker.achieve_all(); achievement_tracker.achieve_all();
dbg!(&vars);
} }
} }