use std::fs; use bevy::{core_pipeline::smaa::SmaaSpecializedRenderPipelines, prelude::*}; use bevy::{prelude::*, scene::ScenePlugin}; use bevy_editor_pls::EditorPlugin; use bevy_rapier2d::prelude::*; use readformat::readf; use crate::AppState; pub(super) fn scene_plugin(app: &mut App) { app.add_plugins(EditorPlugin::default()); // app.add_systems(, ) app.add_systems(Startup, (import_text_world,)); } pub struct WorldInfo { block_size: f32, } pub(super) fn import_text_world(mut commands: Commands, assets: Res) { let world_string = fs::read_to_string("assets/world.txt").expect("need a world to load"); let [info_string, world_string] = &readf("info section\n{}\nworld section\n{}", &world_string) .expect("world does not have sections")[..] else { panic!("world does not have sections"); }; for line in info_string.lines() { readf("{} = {}", &line); } }