From e3ef07df674c996a5e66b9fb4733ee23f7508545 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Sat, 21 Jan 2023 02:39:55 +0100 Subject: [PATCH] sync --- src/main.rs | 1 + src/settings.rs | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 src/settings.rs diff --git a/src/main.rs b/src/main.rs index 1b4fb3f..235edde 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,6 +19,7 @@ pub(crate) mod player; pub(crate) mod world; pub(crate) mod prefabs; pub(crate) mod transform; +pub(crate) mod settings; use rendering::{Rederer, RenderTarget, BackgroundColor, clear_background}; use player::spawn_player; diff --git a/src/settings.rs b/src/settings.rs new file mode 100644 index 0000000..9b52fd2 --- /dev/null +++ b/src/settings.rs @@ -0,0 +1,14 @@ +use shipyard::Unique; + +#[derive(Unique)] +pub struct GameSettings { + //there's a 1 chunk border of loaded but invisible around this + pub render_distance: usize, +} +impl Default for GameSettings { + fn default() -> Self { + Self { + render_distance: 5 + } + } +}