DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

f32dae805d5243fdf506b80c5e8d5758c6ce1ab2 — Jonni Liljamo 1 year, 7 months ago 851af6c
feat(client): remove belly dep, disable UI for rework
4 files changed, 16 insertions(+), 306 deletions(-)

M Cargo.lock
M client/Cargo.toml
M client/src/main.rs
M client/src/plugins/menu/mod.rs
M Cargo.lock => Cargo.lock +6 -285
@@ 3,12 3,6 @@
version = 3

[[package]]
name = "Inflector"
version = "0.11.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3"

[[package]]
name = "ab_glyph"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 127,7 121,7 @@ dependencies = [
 "futures-core",
 "log",
 "redis-async",
 "time 0.3.18",
 "time",
 "tokio",
 "tokio-util",
]


@@ 268,7 262,7 @@ dependencies = [
 "serde_urlencoded",
 "smallvec",
 "socket2",
 "time 0.3.18",
 "time",
 "url",
]



@@ 745,62 739,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf"

[[package]]
name = "belly"
version = "0.1.0"
source = "git+https://github.com/jkb0o/belly?rev=bf05d3b#bf05d3b36136ac370ed099b3100d724b563a6c9a"
dependencies = [
 "belly_core",
 "belly_macro",
 "belly_widgets",
 "bevy",
 "embed-doc-image",
 "tagstr",
]

[[package]]
name = "belly_core"
version = "0.1.0"
source = "git+https://github.com/jkb0o/belly?rev=bf05d3b#bf05d3b36136ac370ed099b3100d724b563a6c9a"
dependencies = [
 "bevy",
 "bevy_stylebox",
 "cssparser",
 "itertools",
 "lazy_static",
 "roxmltree",
 "smallvec",
 "tagstr",
]

[[package]]
name = "belly_macro"
version = "0.1.0"
source = "git+https://github.com/jkb0o/belly?rev=bf05d3b#bf05d3b36136ac370ed099b3100d724b563a6c9a"
dependencies = [
 "belly_core",
 "bevy",
 "proc-macro2",
 "procout",
 "quote",
 "syn",
 "syn-rsx",
 "toml 0.5.11",
]

[[package]]
name = "belly_widgets"
version = "0.1.0"
source = "git+https://github.com/jkb0o/belly?rev=bf05d3b#bf05d3b36136ac370ed099b3100d724b563a6c9a"
dependencies = [
 "ab_glyph",
 "belly_core",
 "belly_macro",
 "bevy",
 "itertools",
 "tagstr",
]

[[package]]
name = "better-bae"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 1404,14 1342,6 @@ dependencies = [
]

[[package]]
name = "bevy_stylebox"
version = "0.1.0"
source = "git+https://github.com/jkb0o/belly?rev=bf05d3b#bf05d3b36136ac370ed099b3100d724b563a6c9a"
dependencies = [
 "bevy",
]

[[package]]
name = "bevy_tasks"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 1512,7 1442,7 @@ checksum = "16750aae52cd35bd7b60eb61cee883420b250e11b4a290b8d44b2b2941795739"
dependencies = [
 "ahash 0.7.6",
 "getrandom 0.2.8",
 "hashbrown 0.12.3",
 "hashbrown",
 "instant",
 "tracing",
 "uuid 1.3.0",


@@ 1776,12 1706,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f"
dependencies = [
 "iana-time-zone",
 "js-sys",
 "num-integer",
 "num-traits",
 "serde",
 "time 0.1.45",
 "wasm-bindgen",
 "winapi",
]



@@ 1856,7 1783,6 @@ dependencies = [
name = "client"
version = "0.1.0"
dependencies = [
 "belly",
 "bevy",
 "bevy-inspector-egui",
 "bevy_console",


@@ 1999,7 1925,7 @@ dependencies = [
 "rand",
 "sha2 0.10.6",
 "subtle",
 "time 0.3.18",
 "time",
 "version_check",
]



@@ 2196,33 2122,6 @@ dependencies = [
]

[[package]]
name = "cssparser"
version = "0.29.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa"
dependencies = [
 "cssparser-macros",
 "dtoa-short",
 "itoa",
 "matches",
 "phf",
 "proc-macro2",
 "quote",
 "smallvec",
 "syn",
]

[[package]]
name = "cssparser-macros"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e"
dependencies = [
 "quote",
 "syn",
]

[[package]]
name = "ctr"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 2591,21 2490,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"

[[package]]
name = "dtoa"
version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0"

[[package]]
name = "dtoa-short"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bde03329ae10e79ede66c9ce4dc930aa8599043b0743008548680f25b91502d6"
dependencies = [
 "dtoa",
]

[[package]]
name = "ecdsa"
version = "0.14.8"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 2638,12 2522,6 @@ dependencies = [
]

[[package]]
name = "either"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"

[[package]]
name = "elliptic-curve"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 2683,18 2561,6 @@ dependencies = [
]

[[package]]
name = "embed-doc-image"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af36f591236d9d822425cb6896595658fa558fcebf5ee8accac1d4b92c47166e"
dependencies = [
 "base64 0.13.1",
 "proc-macro2",
 "quote",
 "syn",
]

[[package]]
name = "encase"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 3205,7 3071,7 @@ checksum = "0b0c02e1ba0bdb14e965058ca34e09c020f8e507a760df1121728e0aef68d57a"
dependencies = [
 "bitflags",
 "gpu-descriptor-types",
 "hashbrown 0.12.3",
 "hashbrown",
]

[[package]]


@@ 3288,15 3154,6 @@ dependencies = [
]

[[package]]
name = "hashbrown"
version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
dependencies = [
 "ahash 0.8.2",
]

[[package]]
name = "heck"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 3526,7 3383,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
dependencies = [
 "autocfg",
 "hashbrown 0.12.3",
 "hashbrown",
]

[[package]]


@@ 3615,15 3472,6 @@ dependencies = [
]

[[package]]
name = "itertools"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
 "either",
]

[[package]]
name = "itoa"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 3878,12 3726,6 @@ dependencies = [
]

[[package]]
name = "matches"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"

[[package]]
name = "memchr"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 4719,50 4561,6 @@ dependencies = [
]

[[package]]
name = "phf"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
dependencies = [
 "phf_macros",
 "phf_shared",
 "proc-macro-hack",
]

[[package]]
name = "phf_generator"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
dependencies = [
 "phf_shared",
 "rand",
]

[[package]]
name = "phf_macros"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0"
dependencies = [
 "phf_generator",
 "phf_shared",
 "proc-macro-hack",
 "proc-macro2",
 "quote",
 "syn",
]

[[package]]
name = "phf_shared"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
dependencies = [
 "siphasher",
]

[[package]]
name = "pin-project-lite"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 4915,12 4713,6 @@ dependencies = [
]

[[package]]
name = "proc-macro-hack"
version = "0.5.20+deprecated"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"

[[package]]
name = "proc-macro2"
version = "1.0.50"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 4930,19 4722,6 @@ dependencies = [
]

[[package]]
name = "procout"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d710f595d4e0a6df3265e2fc65731ee564ada41400628563fe635905ab70418"
dependencies = [
 "Inflector",
 "chrono",
 "proc-macro2",
 "quote",
 "syn",
]

[[package]]
name = "profiling"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 5234,15 5013,6 @@ dependencies = [
]

[[package]]
name = "roxmltree"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb6d47b59770b0ae88c7f270c68502832ec14d8c7ab5f7a584f204bb76dbfd8e"
dependencies = [
 "xmlparser",
]

[[package]]
name = "rustc-hash"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 5671,12 5441,6 @@ dependencies = [
]

[[package]]
name = "siphasher"
version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"

[[package]]
name = "slab"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 5847,17 5611,6 @@ dependencies = [
]

[[package]]
name = "syn-rsx"
version = "0.9.0"
source = "git+https://github.com/stoically/syn-rsx.git#149109f1420df7a11f5a69e4a9fb90bf57ec4f02"
dependencies = [
 "proc-macro2",
 "quote",
 "syn",
 "thiserror",
]

[[package]]
name = "synstructure"
version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 5883,15 5636,6 @@ dependencies = [
]

[[package]]
name = "tagstr"
version = "0.1.0"
source = "git+https://github.com/jkb0o/belly?rev=bf05d3b#bf05d3b36136ac370ed099b3100d724b563a6c9a"
dependencies = [
 "hashbrown 0.13.2",
 "lazy_static",
]

[[package]]
name = "tap"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 5962,17 5706,6 @@ dependencies = [

[[package]]
name = "time"
version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
dependencies = [
 "libc",
 "wasi 0.10.0+wasi-snapshot-preview1",
 "winapi",
]

[[package]]
name = "time"
version = "0.3.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af0097eaf301d576d0b2aead7a59facab6d53cc636340f0291fab8446a2e8613"


@@ 6383,12 6116,6 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"

[[package]]
name = "wasi"
version = "0.10.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"

[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"


@@ 7027,12 6754,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a"

[[package]]
name = "xmlparser"
version = "0.13.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd"

[[package]]
name = "yasna"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"

M client/Cargo.toml => client/Cargo.toml +0 -4
@@ 37,10 37,6 @@ bevy_console = { git = "https://github.com/QuendirSkye/bevy-console", branch = "
# NOTE: most likely not needed when bevy 0.10.0 comes around
iyes_loopless = "0.9.1"

# better ui
# NOTE: locked into a commit, since they don't have a crates.io release yet
belly = { git = "https://github.com/jkb0o/belly", rev = "bf05d3b" }

# (de)serialization
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.91"

M client/src/main.rs => client/src/main.rs +4 -13
@@ 10,16 10,9 @@ use bevy::{
    prelude::*,
    window::{CompositeAlphaMode, CursorGrabMode, PresentMode, WindowResizeConstraints},
};

use bevy_console::{ConsoleConfiguration, ConsolePlugin, ToggleConsoleKey};
use bevy_inspector_egui::quick::WorldInspectorPlugin;

//use bevy_mod_scripting::prelude::*;

use iyes_loopless::prelude::*;

use belly::prelude::{BellyPlugin, StyleSheet};

use naia_bevy_client::{
    Client as NaiaClient, ClientConfig as NaiaClientConfig, Plugin as NaiaClientPlugin,
};


@@ 28,11 21,14 @@ use laurelin_shared::server::protocol::protocol;

mod cfg;
mod constants;
//mod lua;
mod plugins;
mod runtime;
mod util;

// NOTE: lua things, currently not in use
//use bevy_mod_scripting::prelude::*;
//mod lua;

/// Used to control the state of the game
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub enum GameState {


@@ 85,8 81,6 @@ fn main() {

    //app.add_plugin(ScriptingPlugin).add_plugin(lua::LuaPlugin);

    app.add_plugin(BellyPlugin);

    app.insert_resource(cfg::CfgDirs(
        directories::ProjectDirs::from("com", "liljamo", "deckbuilder")
            .expect("failed to get project directories"),


@@ 128,9 122,6 @@ fn init_networking(mut commands: Commands, mut client: NaiaClient) {
fn setup(mut commands: Commands) {
    // Spawn a camera
    commands.spawn(Camera3dBundle::default());

    // Load in a stylesheet for the UI
    commands.add(StyleSheet::load("ui.ess"));
}

/// Utility function do despawn an entity and all its children

M client/src/plugins/menu/mod.rs => client/src/plugins/menu/mod.rs +6 -4
@@ 11,11 11,11 @@ use iyes_loopless::prelude::*;

use crate::{remove_ui, GameState};

mod mainmenuscreen;
use mainmenuscreen::*;
//mod mainmenuscreen;
//use mainmenuscreen::*;

mod settingsscreen;
use settingsscreen::*;
//mod settingsscreen;
//use settingsscreen::*;

//mod accountscreenloggedout;
//use accountscreenloggedout::*;


@@ 32,6 32,7 @@ pub struct MenuPlugin;

impl Plugin for MenuPlugin {
    fn build(&self, app: &mut App) {
        /*
        app.
            // Start with no menu. The menu is loaded when the GameState::MainMenu is entered.
            add_loopless_state(MenuState::None)


@@ 49,6 50,7 @@ impl Plugin for MenuPlugin {
                    .with_system(handle_exit_event.run_on_event::<ExitEvent>())
                    .into()
            );
        */
        // Systems for the settings screen
        //.add_enter_system(MenuState::Settings, settings_setup)
        //.add_exit_system(MenuState::Settings, remove_ui)