From 06663f6e947e1f514a0dd87b4e256ef9de377d17 Mon Sep 17 00:00:00 2001 From: core Date: Sat, 16 May 2026 17:08:27 -0400 Subject: [PATCH] feat(netcode-rewrite): remove all networking --- Cargo.lock | 1147 +------------------ crates/unified/Cargo.toml | 27 +- crates/unified/src/attachment.rs | 10 - crates/unified/src/cli.rs | 91 +- crates/unified/src/client/mod.rs | 46 +- crates/unified/src/client/particles/mod.rs | 7 - crates/unified/src/client_plugins.rs | 13 +- crates/unified/src/config/planet.rs | 5 - crates/unified/src/config/recipe.rs | 1 - crates/unified/src/ecs.rs | 37 +- crates/unified/src/ecs/thruster.rs | 2 - crates/unified/src/main.rs | 85 +- crates/unified/src/particle_editor/ecs.rs | 38 - crates/unified/src/particle_editor/hooks.rs | 21 - crates/unified/src/particle_editor/mod.rs | 329 ------ crates/unified/src/particle_editor/spawn.rs | 100 -- crates/unified/src/particles.rs | 148 --- crates/unified/src/physics.rs | 89 +- crates/unified/src/prelude.rs | 4 +- crates/unified/src/server/craft.rs | 2 +- crates/unified/src/server/drill.rs | 2 +- crates/unified/src/server/mod.rs | 100 +- crates/unified/src/server/part.rs | 9 +- crates/unified/src/server/planets.rs | 1 - crates/unified/src/server/player.rs | 45 +- crates/unified/src/server/player/join.rs | 30 +- crates/unified/src/server/player/thrust.rs | 59 +- crates/unified/src/server_plugins.rs | 19 +- crates/unified/src/shared_plugins.rs | 55 +- crates/unified/src/thrust.rs | 8 +- crates/unified/src/wasm_entrypoint.rs | 24 +- 31 files changed, 104 insertions(+), 2450 deletions(-) delete mode 100644 crates/unified/src/client/particles/mod.rs delete mode 100644 crates/unified/src/particle_editor/ecs.rs delete mode 100644 crates/unified/src/particle_editor/hooks.rs delete mode 100644 crates/unified/src/particle_editor/mod.rs delete mode 100644 crates/unified/src/particle_editor/spawn.rs delete mode 100644 crates/unified/src/particles.rs diff --git a/Cargo.lock b/Cargo.lock index f38473c0c82e3e4bdbb9806eeff6116fa9a1b7b4..d6a4be201593bbd3a1cdcbdcea228c44b0ea6747 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,7 +48,7 @@ dependencies = [ "accesskit_consumer", "hashbrown 0.15.5", "objc2 0.5.2", - "objc2-app-kit 0.2.2", + "objc2-app-kit", "objc2-foundation 0.2.2", ] @@ -85,98 +85,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" -[[package]] -name = "aeronet" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c7a1ae9f2a25a6ce704cdcac85aa2d62f12cd34e8c6b5e259a400bfb4bde573" -dependencies = [ - "aeronet_io", - "aeronet_transport", - "bevy_app", -] - -[[package]] -name = "aeronet_io" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bdc30d6e77d611cffd0e6c418299de1eccf21696205de3368f75afc71413a98" -dependencies = [ - "anyhow", - "bevy_app", - "bevy_ecs", - "bevy_platform", - "bevy_reflect", - "bytes", - "derive_more", - "log", -] - -[[package]] -name = "aeronet_replicon" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3660e988e020e887f8e623e99eb8f0945e772ae0e35c4032026b5f73a40f0a3" -dependencies = [ - "aeronet_io", - "aeronet_transport", - "bevy_app", - "bevy_ecs", - "bevy_platform", - "bevy_reflect", - "bevy_replicon", - "bevy_state", - "log", -] - -[[package]] -name = "aeronet_transport" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460e73efd6b13dfd43992aff40d0a7a74202ae90b37dd31f4c0db7e368d10e63" -dependencies = [ - "aeronet_io", - "bevy_app", - "bevy_ecs", - "bevy_platform", - "bevy_reflect", - "bevy_time", - "bit-vec 0.8.0", - "derive_more", - "either", - "log", - "octs", - "ringbuf", - "typesize", -] - -[[package]] -name = "aeronet_websocket" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a721edcf893daea9bf5f565e81b58162c986b0c70d985d7a4ecf3e32e94edd" -dependencies = [ - "aeronet_io", - "bevy_app", - "bevy_ecs", - "bevy_platform", - "bytes", - "cfg-if", - "derive_more", - "futures", - "js-sys", - "rcgen", - "rustls", - "rustls-native-certs", - "tokio", - "tokio-rustls", - "tokio-tungstenite", - "tracing", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "ahash" version = "0.8.12" @@ -296,26 +204,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ad8689a486416c401ea15715a4694de30054248ec627edbf31f49cb64ee4086" -[[package]] -name = "arboard" -version = "3.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf" -dependencies = [ - "clipboard-win", - "image", - "log", - "objc2 0.6.4", - "objc2-app-kit 0.3.2", - "objc2-core-foundation", - "objc2-core-graphics", - "objc2-foundation 0.3.2", - "parking_lot", - "percent-encoding", - "windows-sys 0.60.2", - "x11rb", -] - [[package]] name = "arrayref" version = "0.3.9" @@ -509,34 +397,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "aws-lc-rs" -version = "1.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec6fb3fe69024a75fa7e1bfb48aa6cf59706a101658ea01bfd33b2b248a038f" -dependencies = [ - "aws-lc-sys", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50037ee5e1e41e7b8f9d161680a725bd1626cb6f8c7e901f91f942850852fe7" -dependencies = [ - "cc", - "cmake", - "dunce", - "fs_extra", -] - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - [[package]] name = "bevy" version = "0.18.1" @@ -867,53 +727,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "bevy_egui" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d0a7e4806f3f242326d2c6157531c36d710f3bf320ebc0a1678e44635ed0eac" -dependencies = [ - "arboard", - "bevy_app", - "bevy_asset", - "bevy_camera", - "bevy_color", - "bevy_core_pipeline", - "bevy_derive", - "bevy_ecs", - "bevy_image", - "bevy_input", - "bevy_log", - "bevy_math", - "bevy_mesh", - "bevy_picking", - "bevy_platform", - "bevy_reflect", - "bevy_render", - "bevy_shader", - "bevy_time", - "bevy_transform", - "bevy_ui_render", - "bevy_utils", - "bevy_window", - "bevy_winit", - "bytemuck", - "crossbeam-channel", - "egui", - "encase", - "getrandom 0.3.4", - "image", - "itertools 0.14.0", - "js-sys", - "thread_local", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webbrowser", - "wgpu-types 27.0.1", - "winit", -] - [[package]] name = "bevy_encase_derive" version = "0.18.1" @@ -1475,27 +1288,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "bevy_replicon" -version = "0.39.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a0d6f7d37938f1f6797950774a41adc189a459d73cffb1941804a5d9d8fd059" -dependencies = [ - "bevy", - "bitflags 2.11.1", - "bumpalo", - "bytes", - "deterministic-hash", - "log", - "petgraph", - "postcard", - "serde", - "smallbitvec", - "typeid", - "variadics_please", - "xxhash-rust", -] - [[package]] name = "bevy_scene" version = "0.18.1" @@ -2010,9 +1802,6 @@ name = "bytes" version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" -dependencies = [ - "portable-atomic", -] [[package]] name = "calloop" @@ -2162,33 +1951,6 @@ dependencies = [ "web-time 0.2.4", ] -[[package]] -name = "clipboard-win" -version = "5.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" -dependencies = [ - "error-code", -] - -[[package]] -name = "cmake" -version = "0.1.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" -dependencies = [ - "cc", -] - -[[package]] -name = "cobs" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" -dependencies = [ - "thiserror 2.0.18", -] - [[package]] name = "codespan-reporting" version = "0.12.0" @@ -2631,15 +2393,6 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" -[[package]] -name = "deranged" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" -dependencies = [ - "powerfmt", -] - [[package]] name = "derive_builder" version = "0.11.2" @@ -2694,12 +2447,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "deterministic-hash" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11277822c27bde750de02c5dc5159b91e88bf2661a2c1d98106f2fb1c5c6f590" - [[package]] name = "digest" version = "0.10.7" @@ -2759,7 +2506,7 @@ dependencies = [ "subsecond", "thiserror 2.0.18", "tracing", - "tungstenite 0.28.0", + "tungstenite", ] [[package]] @@ -2807,17 +2554,6 @@ dependencies = [ "objc2 0.6.4", ] -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "disqualified" version = "1.0.0" @@ -2860,12 +2596,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - [[package]] name = "dyn-clone" version = "1.0.20" @@ -2884,48 +2614,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fdab65db9274e0168143841eb8f864a0a21f8b1b8d2ba6812bbe6024346e99e" -[[package]] -name = "ecolor" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71ddb8ac7643d1dba1bb02110e804406dd459a838efcb14011ced10556711a8e" -dependencies = [ - "bytemuck", - "emath", -] - -[[package]] -name = "egui" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9b567d356674e9a5121ed3fedfb0a7c31e059fe71f6972b691bcd0bfc284e3" -dependencies = [ - "ahash", - "bitflags 2.11.1", - "emath", - "epaint", - "log", - "nohash-hasher", - "profiling", - "smallvec", - "unicode-segmentation", -] - [[package]] name = "either" version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" -[[package]] -name = "emath" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "491bdf728bf25ddd9ad60d4cf1c48588fa82c013a2440b91aa7fc43e34a07c32" -dependencies = [ - "bytemuck", -] - [[package]] name = "ena" version = "0.14.4" @@ -2989,30 +2683,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "epaint" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009d0dd3c2163823a0abdb899451ecbc78798dec545ee91b43aff1fa790bab62" -dependencies = [ - "ab_glyph", - "ahash", - "bytemuck", - "ecolor", - "emath", - "epaint_default_fonts", - "log", - "nohash-hasher", - "parking_lot", - "profiling", -] - -[[package]] -name = "epaint_default_fonts" -version = "0.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fbe202b6578d3d56428fa185cdf114a05e49da05f477b3c7f0fbb221f1862" - [[package]] name = "equivalent" version = "1.0.2" @@ -3040,12 +2710,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "error-code" -version = "3.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59" - [[package]] name = "euclid" version = "0.22.14" @@ -3082,26 +2746,6 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" -[[package]] -name = "fax" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05de7d48f37cd6730705cbca900770cab77a89f413d23e100ad7fad7795a0ab" -dependencies = [ - "fax_derive", -] - -[[package]] -name = "fax_derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "fdeflate" version = "0.3.7" @@ -3229,52 +2873,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] -name = "form_urlencoded" -version = "1.2.2" +name = "fsevent-sys" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" dependencies = [ - "percent-encoding", + "libc", ] [[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - -[[package]] -name = "fsevent-sys" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" -dependencies = [ - "libc", -] - -[[package]] -name = "futures" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.32" +name = "futures-channel" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", - "futures-sink", ] [[package]] @@ -3283,17 +2896,6 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" -[[package]] -name = "futures-executor" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - [[package]] name = "futures-io" version = "0.3.32" @@ -3324,12 +2926,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "futures-sink" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" - [[package]] name = "futures-task" version = "0.3.32" @@ -3342,13 +2938,9 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ - "futures-channel", "futures-core", - "futures-io", "futures-macro", - "futures-sink", "futures-task", - "memchr", "pin-project-lite", "slab", ] @@ -3383,17 +2975,6 @@ dependencies = [ "windows-link 0.2.1", ] -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - [[package]] name = "getrandom" version = "0.3.4" @@ -3401,11 +2982,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi 5.3.0", "wasip2", - "wasm-bindgen", ] [[package]] @@ -3759,88 +3338,6 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" -[[package]] -name = "icu_collections" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" -dependencies = [ - "displaydoc", - "potential_utf", - "utf8_iter", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" -dependencies = [ - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" - -[[package]] -name = "icu_properties" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" -dependencies = [ - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" - -[[package]] -name = "icu_provider" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" -dependencies = [ - "displaydoc", - "icu_locale_core", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - [[package]] name = "id-arena" version = "2.3.0" @@ -3853,27 +3350,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - [[package]] name = "image" version = "0.25.10" @@ -3885,7 +3361,6 @@ dependencies = [ "moxcms", "num-traits", "png", - "tiff", ] [[package]] @@ -4233,12 +3708,6 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" -[[package]] -name = "litemap" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" - [[package]] name = "litrs" version = "1.0.0" @@ -4485,12 +3954,6 @@ dependencies = [ "libc", ] -[[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - [[package]] name = "nonmax" version = "0.5.5" @@ -4555,12 +4018,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-conv" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" - [[package]] name = "num-derive" version = "0.4.2" @@ -4654,18 +4111,6 @@ dependencies = [ "objc2-quartz-core 0.2.2", ] -[[package]] -name = "objc2-app-kit" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" -dependencies = [ - "bitflags 2.11.1", - "objc2 0.6.4", - "objc2-core-graphics", - "objc2-foundation 0.3.2", -] - [[package]] name = "objc2-cloud-kit" version = "0.2.2" @@ -4713,19 +4158,6 @@ dependencies = [ "objc2 0.6.4", ] -[[package]] -name = "objc2-core-graphics" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" -dependencies = [ - "bitflags 2.11.1", - "dispatch2", - "objc2 0.6.4", - "objc2-core-foundation", - "objc2-io-surface", -] - [[package]] name = "objc2-core-image" version = "0.2.2" @@ -4791,17 +4223,6 @@ dependencies = [ "objc2-core-foundation", ] -[[package]] -name = "objc2-io-surface" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" -dependencies = [ - "bitflags 2.11.1", - "objc2 0.6.4", - "objc2-core-foundation", -] - [[package]] name = "objc2-link-presentation" version = "0.2.2" @@ -4810,7 +4231,7 @@ checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" dependencies = [ "block2 0.5.1", "objc2 0.5.2", - "objc2-app-kit 0.2.2", + "objc2-app-kit", "objc2-foundation 0.2.2", ] @@ -4933,15 +4354,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "octs" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3beef54705459f4a421ff43b6c9b8381f5b84769e4ae69942783dd8918837b7" -dependencies = [ - "bytes", -] - [[package]] name = "offset-allocator" version = "0.2.0" @@ -4964,12 +4376,6 @@ version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" -[[package]] -name = "openssl-probe" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" - [[package]] name = "orbclient" version = "0.3.53" @@ -4987,8 +4393,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7d950ca161dc355eaf28f82b11345ed76c6e1f6eb1f4f4479e0323b9e2fbd0e" dependencies = [ "num-traits", - "rand 0.8.6", - "serde", ] [[package]] @@ -5111,34 +4515,12 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pem" -version = "3.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" -dependencies = [ - "base64", - "serde_core", -] - [[package]] name = "percent-encoding" version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" -[[package]] -name = "petgraph" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" -dependencies = [ - "fixedbitset", - "hashbrown 0.15.5", - "indexmap", - "serde", -] - [[package]] name = "pico-args" version = "0.5.0" @@ -5264,43 +4646,6 @@ dependencies = [ "portable-atomic", ] -[[package]] -name = "postcard" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" -dependencies = [ - "cobs", - "postcard-derive", - "serde", -] - -[[package]] -name = "postcard-derive" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0232bd009a197ceec9cc881ba46f727fcd8060a2d8d6a9dde7a69030a6fe2bb" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "potential_utf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" -dependencies = [ - "zerovec", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "pp-rs" version = "0.2.1" @@ -5396,12 +4741,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - [[package]] name = "quick-xml" version = "0.39.2" @@ -5438,16 +4777,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "019b4b213425016d7d84a153c4c73afb0946fbb4840e4eece7ba8848b9d6da22" -[[package]] -name = "rand" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" -dependencies = [ - "rand_core 0.6.4", - "serde", -] - [[package]] name = "rand" version = "0.9.4" @@ -5479,15 +4808,6 @@ dependencies = [ "rand_core 0.9.5", ] -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "serde", -] - [[package]] name = "rand_core" version = "0.9.5" @@ -5563,19 +4883,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "rcgen" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75e669e5202259b5314d1ea5397316ad400819437857b90861765f24c4cf80a2" -dependencies = [ - "pem", - "ring", - "rustls-pki-types", - "time", - "yasna", -] - [[package]] name = "rdst" version = "0.20.14" @@ -5679,31 +4986,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" -[[package]] -name = "ring" -version = "0.17.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.17", - "libc", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "ringbuf" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe47b720588c8702e34b5979cb3271a8b1842c7cb6f57408efa70c779363488c" -dependencies = [ - "crossbeam-utils", - "portable-atomic", - "portable-atomic-util", -] - [[package]] name = "robust" version = "1.2.0" @@ -5777,54 +5059,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "rustls" -version = "0.23.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2c118cb077cca2822033836dfb1b975355dfb784b5e8da48f7b6c5db74e60e" -dependencies = [ - "aws-lc-rs", - "log", - "once_cell", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-native-certs" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" -dependencies = [ - "openssl-probe", - "rustls-pki-types", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-pki-types" -version = "1.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" -dependencies = [ - "zeroize", -] - -[[package]] -name = "rustls-webpki" -version = "0.103.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" -dependencies = [ - "aws-lc-rs", - "ring", - "rustls-pki-types", - "untrusted", -] - [[package]] name = "rustversion" version = "1.0.22" @@ -5858,15 +5092,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "schannel" -version = "0.1.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" -dependencies = [ - "windows-sys 0.61.2", -] - [[package]] name = "scoped-tls" version = "1.0.1" @@ -5892,29 +5117,6 @@ dependencies = [ "tiny-skia", ] -[[package]] -name = "security-framework" -version = "3.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" -dependencies = [ - "bitflags 2.11.1", - "core-foundation 0.10.1", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "self_cell" version = "1.2.2" @@ -6111,12 +5313,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "smallbitvec" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d31d263dd118560e1a492922182ab6ca6dc1d03a3bf54e7699993f31a4150e3f" - [[package]] name = "smallvec" version = "1.15.1" @@ -6160,16 +5356,6 @@ dependencies = [ "serde", ] -[[package]] -name = "socket2" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" -dependencies = [ - "libc", - "windows-sys 0.61.2", -] - [[package]] name = "spade" version = "2.15.1" @@ -6229,28 +5415,19 @@ dependencies = [ name = "starkingdoms" version = "0.1.0" dependencies = [ - "aeronet", - "aeronet_replicon", - "aeronet_transport", - "aeronet_websocket", "avian2d", "bevy", "bevy_common_assets", - "bevy_egui", - "bevy_replicon", "console_error_panic_hook", "ctrlc", "getrandom 0.4.2", "good_lp", "leafwing-input-manager", - "ordered-float", "pico-args", "rand 0.10.1", - "ron", "serde", "tracing-subscriber", "tracing-web", - "url", "wasm-bindgen", "web-time 1.1.0", "wgpu 29.0.1", @@ -6302,12 +5479,6 @@ dependencies = [ "serde", ] -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - [[package]] name = "svg_fmt" version = "0.4.5" @@ -6347,17 +5518,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "sys-locale" version = "0.3.2" @@ -6449,20 +5609,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "tiff" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52" -dependencies = [ - "fax", - "flate2", - "half", - "quick-error", - "weezl", - "zune-jpeg", -] - [[package]] name = "tikv-jemalloc-sys" version = "0.5.4+5.3.0-patched" @@ -6483,25 +5629,6 @@ dependencies = [ "tikv-jemalloc-sys", ] -[[package]] -name = "time" -version = "0.3.47" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" -dependencies = [ - "deranged", - "num-conv", - "powerfmt", - "serde_core", - "time-core", -] - -[[package]] -name = "time-core" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" - [[package]] name = "tiny-skia" version = "0.11.4" @@ -6527,16 +5654,6 @@ dependencies = [ "strict-num", ] -[[package]] -name = "tinystr" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" -dependencies = [ - "displaydoc", - "zerovec", -] - [[package]] name = "tinytemplate" version = "1.2.1" @@ -6562,46 +5679,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" -[[package]] -name = "tokio" -version = "1.52.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" -dependencies = [ - "bytes", - "libc", - "mio", - "pin-project-lite", - "socket2", - "windows-sys 0.61.2", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" -dependencies = [ - "futures-util", - "log", - "rustls", - "rustls-native-certs", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tungstenite 0.26.2", -] - [[package]] name = "toml" version = "0.9.12+spec-1.1.0" @@ -6780,25 +5857,6 @@ dependencies = [ "core_maths", ] -[[package]] -name = "tungstenite" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" -dependencies = [ - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand 0.9.4", - "rustls", - "rustls-pki-types", - "sha1", - "thiserror 2.0.18", - "utf-8", -] - [[package]] name = "tungstenite" version = "0.28.0" @@ -6834,26 +5892,6 @@ version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" -[[package]] -name = "typesize" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da66c62c5b7017a2787e77373c03e6a5aafde77a73bff1ff96e91cd2e128179" -dependencies = [ - "typesize-derive", -] - -[[package]] -name = "typesize-derive" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "536b6812192bda8551cfa0e52524e328c6a951b48e66529ee4522d6c721243d6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "typewit" version = "1.15.2" @@ -6902,36 +5940,12 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - [[package]] name = "utf-8" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - [[package]] name = "uuid" version = "1.23.1" @@ -7266,28 +6280,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webbrowser" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc95580916af1e68ff6a7be07446fc5db73ebf71cf092de939bbf5f7e189f72" -dependencies = [ - "core-foundation 0.10.1", - "jni", - "log", - "ndk-context", - "objc2 0.6.4", - "objc2-foundation 0.3.2", - "url", - "web-sys", -] - -[[package]] -name = "weezl" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" - [[package]] name = "wgpu" version = "27.0.1" @@ -8098,7 +7090,7 @@ dependencies = [ "memmap2", "ndk", "objc2 0.5.2", - "objc2-app-kit 0.2.2", + "objc2-app-kit", "objc2-foundation 0.2.2", "objc2-ui-kit", "orbclient", @@ -8238,12 +7230,6 @@ dependencies = [ "wasmparser", ] -[[package]] -name = "writeable" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" - [[package]] name = "x11-dl" version = "2.21.0" @@ -8315,50 +7301,12 @@ dependencies = [ "qsv-tabwriter", ] -[[package]] -name = "xxhash-rust" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" - -[[package]] -name = "yasna" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" -dependencies = [ - "time", -] - [[package]] name = "yazi" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5" -[[package]] -name = "yoke" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" -dependencies = [ - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", - "synstructure", -] - [[package]] name = "zeno" version = "0.3.3" @@ -8385,83 +7333,8 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "zerofrom" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", - "synstructure", -] - -[[package]] -name = "zeroize" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" - -[[package]] -name = "zerotrie" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "zmij" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" - -[[package]] -name = "zune-core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9" - -[[package]] -name = "zune-jpeg" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296" -dependencies = [ - "zune-core", -] diff --git a/crates/unified/Cargo.toml b/crates/unified/Cargo.toml index 2de6755b0f8ccb8f88b3d90f42350b7509b7c9ed..cf858c8290a8c51d5dd13af1f4d7338234795d61 100644 --- a/crates/unified/Cargo.toml +++ b/crates/unified/Cargo.toml @@ -22,6 +22,7 @@ bevy = { version = "0.18", default-features = false, features = [ "bevy_log", "multi_threaded", "bevy_dev_tools", + "bevy_state", "sprite_picking", "mesh_picking", "default_font", @@ -50,10 +51,6 @@ avian2d = { version = "0.6", default-features = false, features = [ ]} bevy_common_assets = { version = "0.16", features = ["toml"] } -bevy_replicon = "0.39" - -url = "2" - tracing-subscriber = "0.3" serde = { version = "1", features = ["derive"] } @@ -61,22 +58,13 @@ serde = { version = "1", features = ["derive"] } rand = "0.10" getrandom = { version = "0.4", features = [] } -aeronet = "0.20" -aeronet_replicon = { version = "0.20", features = ["client"] } -aeronet_websocket = { version = "0.20", features = ["client"] } -aeronet_transport = "0.20" - -ordered-float = { version = "5", features = ["serde"] } -ron = "0.12" wgpu = "*" pico-args = "0.5" -bevy_egui = { version = "0.39", optional = true } - -leafwing-input-manager = { version = "0.20", optional = true } -good_lp = { version = "1.15", default-features = false, features = ["clarabel"], optional = true } +leafwing-input-manager = { version = "0.20" } +good_lp = { version = "1.15", default-features = false, features = ["clarabel"] } web-time = "1" @@ -92,7 +80,8 @@ console_error_panic_hook = "0.1" native_dev = [ "bevy/file_watcher", "bevy/hotpatching", - "bevy/dynamic_linking" + "bevy/dynamic_linking", + "native" ] native = [ "bevy/x11", @@ -101,9 +90,3 @@ native = [ ] wasm = ["getrandom/wasm_js", "bevy/webgl2"] -particle_editor = ["dep:bevy_egui"] -server = ["aeronet_websocket/server", "aeronet_replicon/server"] -client = [ - "dep:leafwing-input-manager", - "dep:good_lp" -] diff --git a/crates/unified/src/attachment.rs b/crates/unified/src/attachment.rs index 7d14a6be442164c1a9d6abd535219b95be1ec93b..dd08e965c0244780c35eeadf7f7db75072ef215a 100644 --- a/crates/unified/src/attachment.rs +++ b/crates/unified/src/attachment.rs @@ -20,13 +20,11 @@ use serde::{Deserialize, Serialize}; use std::ops::Deref; #[derive(Component, Serialize, Deserialize)] -#[require(Replicated)] /// The primary component for a ship structure. Will be present on Hearty pub struct Ship; #[derive(Component, Serialize, Deserialize, MapEntities, Deref)] #[relationship_target(relationship = PartInShip, linked_spawn)] -#[require(Replicated)] /// List of all parts in this Ship. Will be present on Hearty. /// Managed automatically by attachment system (do not modify)y, @@ -34,14 +32,12 @@ pub struct Parts(#[entities] Vec); #[derive(Component, Serialize, Deserialize, MapEntities, Debug)] #[relationship(relationship_target = Parts)] -#[require(Replicated)] /// A Pointer to the `Ship` that this part belongs to. Managed automatically by attachment system /// (do not add/remove manually) pub struct PartInShip(#[entities] pub Entity); #[derive(Component, Serialize, Deserialize)] #[require(Transform)] -#[require(Replicated)] /// A `Joint` is a separate entity (child of a part) that represents a single possible attachment /// point for that part. pub struct Joint { @@ -49,7 +45,6 @@ pub struct Joint { pub transform: Transform, } #[derive(Component, Serialize, Deserialize, MapEntities)] -#[require(Replicated)] /// A `Peer` is a pointer component of a `Joint` that references the Joint entity it is connected to. /// Two joints are said to be 'peered' when they are attached to each other. /// Two Parts are connected when they have a set of peered `Joint`s @@ -62,12 +57,10 @@ pub struct Peer { #[derive(Component, Serialize, Deserialize, MapEntities)] #[relationship(relationship_target = Joints)] -#[require(Replicated)] /// A pointer to the `Part` that this `Joint` belongs to. Managed automatically, do not add/remove pub struct JointOf(#[entities] pub Entity); #[derive(Component, Serialize, Deserialize, MapEntities, Debug, Clone)] #[relationship_target(relationship = JointOf)] -#[require(Replicated)] /// All the `Joint`s that belong to this `Part`. Managed automatically, do not modify pub struct Joints(#[entities] Vec); impl Deref for Joints { @@ -79,13 +72,11 @@ impl Deref for Joints { #[derive(Component, Serialize, Deserialize, MapEntities)] #[relationship(relationship_target = Snaps)] -#[require(Replicated)] /// The `Part` that this Snap belongs to. A Snap is an internal entity used for snapping during /// the attachment routine. Managed automatically. pub struct SnapOf(#[entities] pub Entity); #[derive(Component, Serialize, Deserialize, MapEntities)] #[relationship_target(relationship = SnapOf)] -#[require(Replicated)] /// All the `Snap`s of this `Joint`. Managed automatically. pub struct Snaps(#[entities] Vec); impl Deref for Snaps { @@ -106,6 +97,5 @@ impl JointId { } #[derive(Serialize, Deserialize, Component, MapEntities)] -#[require(Replicated)] /// The `Joint` that this `Snap` belongs to pub struct SnapOfJoint(#[entities] pub Entity); diff --git a/crates/unified/src/cli.rs b/crates/unified/src/cli.rs index 5ca995465ac6a772e46a8b10f5fbafb4442b41c9..16e1d3e02d747a3e81f02213fb67b89fd7fe8f8d 100644 --- a/crates/unified/src/cli.rs +++ b/crates/unified/src/cli.rs @@ -1,25 +1,10 @@ -#[cfg(not(any(feature = "client", feature = "server", feature = "particle_editor")))] -compile_error!("You need to enable one or more of client, server, particle_editor features"); #[cfg(not(any(feature = "native", feature = "wasm")))] compile_error!("You need to enable one of native, wasm features"); #[cfg(all(feature = "native", feature = "wasm"))] compile_error!("You cannot enable both native and wasm features"); pub enum StkArgs { - #[cfg(feature = "client")] - Client { - server: String, - }, - #[cfg(feature = "server")] - Server { - bind_to: std::net::SocketAddr, - max_clients: std::num::NonZeroUsize, - tick_rate: f32, - #[cfg(feature = "client")] - with_client: bool - }, - #[cfg(feature = "particle_editor")] - ParticleEditor + Play, } #[cfg(not(target_arch = "wasm32"))] @@ -32,41 +17,16 @@ pub fn parse_args() -> StkArgs { } if pargs.contains(["-v", "--version"]) { - println!("{}",env!("CARGO_PKG_VERSION")); + println!("{}", env!("CARGO_PKG_VERSION")); std::process::exit(0); } - let Some(subcommand) = pargs.subcommand().unwrap() else { - eprintln!("a subcommand is required"); - print_help(); - std::process::exit(1); - }; - - + let subcommand = pargs.subcommand().unwrap(); - match subcommand.as_str() { - #[cfg(feature = "client")] - "client" => { - StkArgs::Client { - server: pargs.value_from_str(["-s", "--server"]).unwrap(), - } - }, - #[cfg(feature = "server")] - "server" => { - StkArgs::Server { - bind_to: pargs.value_from_str(["-b", "--bind-to"]).unwrap(), - max_clients: pargs.value_from_str(["-c", "--max-clients"]).unwrap(), - tick_rate: pargs.value_from_str(["-r", "--tick-rate"]).unwrap(), - #[cfg(feature = "client")] - with_client: pargs.contains("--with-client"), - } - }, - #[cfg(feature = "particle_editor")] - "particle_editor" => { - StkArgs::ParticleEditor - }, - unknown => { - eprintln!("unknown subcommand: {unknown} (is that feature enabled?)"); + match subcommand.as_deref() { + None | Some("play") => StkArgs::Play, + Some(unknown) => { + eprintln!("unknown subcommand: {unknown}"); eprintln!("-h, --help for help"); std::process::exit(1); } @@ -76,43 +36,12 @@ pub fn parse_args() -> StkArgs { fn print_help() { println!("\ USAGE: - starkingdoms [FLAGS] [...] + starkingdoms [FLAGS] [subcommand] FLAGS: -h, --help Prints help information -v, --version Prints version information SUBCOMMANDS: - "); - - if cfg!(feature = "client") { - println!(" client Run the client (see CLIENT for options)"); - } - if cfg!(feature = "server") { - println!(" server Run the server (see SERVER for options)"); - } - if cfg!(feature = "particle_editor") { - println!("particle_editor Run the particle editor"); - } - - println!("\n"); - - if cfg!(feature = "client") { - println!("\ -CLIENT: - -s, --server WebSocket URL to connect to - "); - } - if cfg!(feature = "server") { - print!("\ -SERVER: - -b, --bind-to Socket address to bind to - -c, --max-clients Maximum number of clients to accept - -r, --tick-rate Tick rate\n"); - if cfg!(feature = "client") { - println!(" --with-client Start a client connected to this server"); - } else { - println!(); - } - } -} \ No newline at end of file + play Run the game (default)"); +} diff --git a/crates/unified/src/client/mod.rs b/crates/unified/src/client/mod.rs index 5ca2be0d2b7087cc707477b3b5bc6eff3b25f28f..bffcc63381babc85b29acfe7dffab62a0e0a46d7 100644 --- a/crates/unified/src/client/mod.rs +++ b/crates/unified/src/client/mod.rs @@ -8,18 +8,15 @@ use crate::client::ui::ui_plugin; use crate::client::zoom::zoom_plugin; use crate::client::starguide::init::starguide_init_plugin; use crate::client::starguide::input::starguide_input_plugin; -use crate::ecs::{Hi, StarguideGizmos}; -use aeronet_websocket::client::WebSocketClient; +use crate::ecs::StarguideGizmos; use bevy::dev_tools::picking_debug::DebugPickingMode; use crate::prelude::*; use planet::incoming_planets::incoming_planets_plugin; use crate::client::ship::attachment::client_attachment_plugin; -use crate::ecs::{Me, GameplayState}; +use crate::ecs::GameplayState; pub mod colors; pub mod key_input; -pub mod net; -pub mod particles; pub mod parts; pub mod planet; pub mod starfield; @@ -31,28 +28,15 @@ pub mod input; pub mod starguide; pub mod crafting; -pub struct ClientPlugin { - pub server: Option, -} +pub struct ClientPlugin; + impl Plugin for ClientPlugin { fn build(&self, app: &mut App) { - let server = self.server.clone(); app - - .add_systems(Startup, move |mut commands: Commands| { - let Some(server) = server.as_ref() else { return }; - let config = net::websocket_config(); - - commands - .spawn(Name::new("default-session")) - .queue(WebSocketClient::connect(config, server.clone())); - }) .init_gizmo_group::() .add_plugins(rendering::render_plugin) .add_plugins(input::input_plugin) .add_plugins(ship::thrusters::client_thrusters_plugin) - .add_systems(Update, find_me) - .add_systems(Update, net::set_config) .add_plugins((incoming_planets_plugin, indicators_plugin)) .add_plugins(parts_plugin) .add_plugins(key_input_plugin) @@ -66,27 +50,5 @@ impl Plugin for ClientPlugin { .add_plugins(crafting_ui_plugin) .insert_state(GameplayState::Main) .insert_resource(DebugPickingMode::Disabled); - - // These are only needed if we're actually doing network things - if self.server.is_some() { - app.add_observer(net::on_connecting) - .add_observer(net::on_connected) - .add_observer(net::on_disconnected); - } } } - - - -fn find_me( - mut commands: Commands, - mut reader: MessageReader, -) { - for msg in reader.read() { - info!("^^^^^^^^^^^ IGNORE THESE WARNINGS ^^^^^^^^^^^^^^"); - info!("they are normal! and are from the world state being replicated as it is sent over the network"); - info!(?msg, "finding me: got hello from server"); - commands.entity(msg.you_are).insert(Me); - } -} - diff --git a/crates/unified/src/client/particles/mod.rs b/crates/unified/src/client/particles/mod.rs deleted file mode 100644 index 07c5e736a7f085846d7508b9fded1dd92d2088f7..0000000000000000000000000000000000000000 --- a/crates/unified/src/client/particles/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use bevy::app::{App, Plugin}; - -pub struct ParticlePlugin; - -impl Plugin for ParticlePlugin { - fn build(&self, _app: &mut App) {} -} diff --git a/crates/unified/src/client_plugins.rs b/crates/unified/src/client_plugins.rs index 74e7cadbb9b07e70e54cf02392603ce83a2e6783..1fa6fba232457c4c31a3ff6d0ad7a963458f1130 100644 --- a/crates/unified/src/client_plugins.rs +++ b/crates/unified/src/client_plugins.rs @@ -1,6 +1,4 @@ use crate::client::ClientPlugin; -use aeronet_replicon::client::AeronetRepliconClientPlugin; -use aeronet_websocket::client::WebSocketClientPlugin; use bevy::app::{PluginGroup, PluginGroupBuilder}; use bevy::dev_tools::picking_debug::DebugPickingPlugin; use bevy::ecs::schedule::ScheduleLabel; @@ -9,19 +7,14 @@ use crate::prelude::*; use bevy::ui::UiPlugin; use leafwing_input_manager::plugin::InputManagerPlugin; -pub struct ClientPluginGroup { - pub server: Option, -} +pub struct ClientPluginGroup; + impl PluginGroup for ClientPluginGroup { fn build(self) -> PluginGroupBuilder { PluginGroupBuilder::start::() - .add(WebSocketClientPlugin) - .add(AeronetRepliconClientPlugin) .add(MeshPickingPlugin) .add(DebugPickingPlugin) - .add(ClientPlugin { - server: self.server, - }) + .add(ClientPlugin) .add(UiPlugin) .add(InputDispatchPlugin) .add(InputManagerPlugin::::default()) diff --git a/crates/unified/src/config/planet.rs b/crates/unified/src/config/planet.rs index bfb58f4ca5ddc11402e8830eb6700b17b4df1eb0..232011b82dddcd2faa95494a33894a94308326a3 100644 --- a/crates/unified/src/config/planet.rs +++ b/crates/unified/src/config/planet.rs @@ -7,7 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Deserialize, Asset, TypePath, Component, Serialize, Clone, Debug)] #[require( RigidBody::Dynamic, - Replicated, )] pub struct Planet { pub name: String, @@ -24,16 +23,12 @@ pub struct Planet { #[derive(Component, Serialize, Deserialize)] #[require( RigidBody::Static, - Replicated, )] pub struct PlanetSpring { pub name: String } #[derive(Component, Serialize, Deserialize)] -#[require( - Replicated, -)] pub struct PlanetSpringJoint { pub name: String } diff --git a/crates/unified/src/config/recipe.rs b/crates/unified/src/config/recipe.rs index d67f651e99cf3ca7b4d9e6018de682a8351de3c1..bc9ce6dcb763f469d33aeaf15c985e3e33c94ebd 100644 --- a/crates/unified/src/config/recipe.rs +++ b/crates/unified/src/config/recipe.rs @@ -5,7 +5,6 @@ use serde::{Deserialize, Serialize}; use crate::prelude::*; #[derive(Deserialize, Asset, TypePath, Component, Serialize, Clone, Debug)] -#[require(Replicated)] pub struct RecipesConfig { pub recipes: HashMap>, } diff --git a/crates/unified/src/ecs.rs b/crates/unified/src/ecs.rs index 6e0824ff9c8c903b56912b9e2ac5dd95a783744e..2a60347d2ad8e94cc578e29a7ef11532de99fcaf 100644 --- a/crates/unified/src/ecs.rs +++ b/crates/unified/src/ecs.rs @@ -1,12 +1,9 @@ pub mod thruster; use crate::config::part::PartConfig; -use bevy::ecs::entity::MapEntities; use bevy::math::{Quat, Vec2}; use bevy::camera::visibility::RenderLayers; use crate::prelude::*; -use bevy_replicon::prelude::Replicated; -use serde::{Deserialize, Serialize}; use avian2d::prelude::*; use std::collections::HashMap; use std::sync::LazyLock; @@ -52,43 +49,28 @@ pub struct PlanetSensor(pub String); // corresponding planet name LinearVelocity, AngularVelocity, ConstantForce, - Replicated, )] pub struct Part { pub strong_config: PartConfig, } #[derive(Component, Debug)] -#[require(Replicated)] pub struct PartHandle(pub Handle); #[derive(Component, Serialize, Deserialize, Debug)] -#[require(Replicated)] pub struct Player { - #[entities] pub client: Entity, } -#[derive(Component, Serialize, Deserialize, Debug)] -#[require(Replicated)] -pub struct Particles { - pub effect: String, - pub active: bool, -} - -#[derive(Serialize, Deserialize, Message, Debug, MapEntities, Clone)] +#[derive(Message, Debug, Clone)] pub struct DragRequestEvent { - #[entities] pub drag_target: Entity, pub drag_to: Vec2, pub set_rotation: Quat, - #[entities] pub snap_target: Option, - #[entities] pub peer_snap: Option, } #[derive(Component, Serialize, Deserialize, Debug)] -#[require(Replicated)] pub struct PlayerStorage { pub fuel_capacity: f32, pub fuel: f32, @@ -107,27 +89,18 @@ pub struct StarguideOrbitImage(pub Handle); #[derive(Component)] pub struct StarguideOrbit; -#[derive(Message, Serialize, Deserialize, Debug, MapEntities)] -pub struct Hi { - #[entities] - pub you_are: Entity -} - #[derive(Component, Serialize, Deserialize, Debug)] -#[require(Replicated)] pub struct CanCraft; #[derive(Component, Serialize, Deserialize, Debug)] pub struct CraftingUi; -#[derive(Message, Serialize, Deserialize, Debug, Clone, MapEntities)] +#[derive(Message, Debug, Clone)] pub struct CraftPartRequest { - #[entities] pub crafting_part: Entity, pub crafted_part: String, pub inputs: HashMap, } #[derive(Component, Serialize, Deserialize, Debug)] -#[require(Replicated)] pub struct Temperature(pub f64); #[derive(Component, Serialize, Deserialize, Debug)] pub struct TemperatureSprite; @@ -143,27 +116,23 @@ pub struct Radiator { } #[derive(Component, Serialize, Deserialize, Debug)] -#[require(Replicated)] pub struct Drill { pub drilling: bool, pub resource_multiplier: f32, pub on_planet: Option, } -#[derive(Message, Serialize, Deserialize, Debug, MapEntities, Clone)] +#[derive(Message, Debug, Clone)] pub struct ToggleDrillEvent { - #[entities] pub drill_entity: Entity, } #[derive(Component, Serialize, Deserialize, Debug)] -#[require(Replicated)] pub struct SingleStorage { pub resource_name: String, pub capacity: f32, pub stored: f32, } #[derive(Component, Serialize, Deserialize, Debug)] -#[require(Replicated)] pub struct VariableStorage { pub resources: HashMap, pub capacity: f32, diff --git a/crates/unified/src/ecs/thruster.rs b/crates/unified/src/ecs/thruster.rs index 5ce05b59ad97e24b3e0ec9d379363a240f5f3e3e..7a98e6e8f68ccd8df3373dd28b674dbfe7fbfaf5 100644 --- a/crates/unified/src/ecs/thruster.rs +++ b/crates/unified/src/ecs/thruster.rs @@ -4,7 +4,6 @@ use bevy::math::Vec2; use bevy::prelude::Bundle; use serde::{Deserialize, Serialize}; use crate::prelude::{ChildOf, Component, Entity, Transform}; -use bevy_replicon::prelude::Replicated; #[derive(Serialize, Deserialize, PartialEq, Eq, Clone)] pub struct ThrusterId(pub String); @@ -31,7 +30,6 @@ impl Deref for PartThrusters { pub struct ThrusterOfPart(#[entities] pub Entity); #[derive(Component, Serialize, Deserialize)] -#[require(Replicated)] pub struct Thruster { pub id: ThrusterId, pub thrust_vector: Vec2, diff --git a/crates/unified/src/main.rs b/crates/unified/src/main.rs index eb70839c6d3f081f21c869d4f4bc42a266fca597..968d56bc4d9028bc35075e6d7f851e3a55f57004 100644 --- a/crates/unified/src/main.rs +++ b/crates/unified/src/main.rs @@ -1,4 +1,4 @@ -#![warn(clippy::pedantic)] // Be annoying, and disable specific irritating lints if needed +#![warn(clippy::pedantic)] #![deny( clippy::allow_attributes_without_reason, clippy::assertions_on_result_states @@ -14,24 +14,14 @@ )] #![allow(clippy::missing_panics_doc, reason = "Gamedev! We panic a lot")] #![allow(clippy::too_many_arguments, reason = "Le Bevy:tm:")] -#![allow( - clippy::too_many_lines, - reason = "With the three of us, this is impossible" -)] +#![allow(clippy::too_many_lines, reason = "With the three of us, this is impossible")] pub mod attachment; -#[cfg(feature = "client")] pub mod client; -#[cfg(feature = "client")] pub mod client_plugins; pub mod config; pub mod ecs; -#[cfg(feature = "particle_editor")] -pub mod particle_editor; -pub mod particles; -#[cfg(feature = "server")] pub mod server; -#[cfg(feature = "server")] pub mod server_plugins; pub mod shared_plugins; pub mod world_config; @@ -49,81 +39,23 @@ use std::str::FromStr; pub use wasm_entrypoint::*; use crate::cli::StkArgs; -use crate::prelude::*; -#[cfg(feature = "client")] use crate::client_plugins::ClientPluginGroup; -#[cfg(feature = "server")] +use crate::prelude::*; use crate::server_plugins::ServerPluginGroup; - -#[allow(unused_mut, reason = "Conditional compilation hell")] fn run(cli: StkArgs) -> AppExit { let mut app = App::new(); match cli { - #[cfg(feature = "client")] - StkArgs::Client { server } => { + StkArgs::Play => { app.add_plugins( DefaultPlugins.build() .disable::() .disable::() ); - app.add_plugins(ClientPluginGroup { server: Some(server) }); - app.add_plugins(shared_plugins::SharedPluginGroup); - } - #[cfg(feature = "server")] - StkArgs::Server { - bind_to, - tick_rate, - max_clients, - #[cfg(feature = "client")] - with_client - } => { - let mut with_client_all = false; - #[cfg(feature = "client")] - if with_client { - with_client_all = true; - app.add_plugins( - DefaultPlugins.build() - .disable::() - .disable::() - ); - app.add_plugins(|app: &mut App| { - app.add_systems(Startup, server::player::join::ls_magically_invent_player); - }); - } - if !with_client_all { - app - .add_plugins(AssetPlugin::default()) - .add_plugins(bevy::state::app::StatesPlugin) - .add_plugins(TaskPoolPlugin::default()) - .add_plugins(bevy::diagnostic::FrameCountPlugin) - .add_plugins(bevy::time::TimePlugin) - .add_plugins(bevy::app::ScheduleRunnerPlugin::run_loop(std::time::Duration::from_secs_f32( - 1.0 / tick_rate, - ))); - } - app.add_plugins(shared_plugins::SharedPluginGroup); - - let mut pg = ServerPluginGroup { - bind: bind_to, - tick_rate, - max_clients: max_clients.into(), - }.build(); - - #[cfg(feature = "client")] - if with_client { - pg = pg.add_group(ClientPluginGroup { - server: None - }); - } - - app.add_plugins(pg); - } - #[cfg(feature = "particle_editor")] - StkArgs::ParticleEditor {} => { - app.add_plugins(crate::particle_editor::particle_editor_plugin); + app.add_plugins(ServerPluginGroup); + app.add_plugins(ClientPluginGroup); } } @@ -138,7 +70,7 @@ fn main() { #[cfg(feature = "native")] fn main() -> AppExit { use tracing_subscriber::util::SubscriberInitExt; - use bevy::log::{tracing_subscriber}; + use bevy::log::tracing_subscriber; let cli = crate::cli::parse_args(); @@ -147,8 +79,7 @@ fn main() -> AppExit { tracing_subscriber::EnvFilter::from_default_env() .add_directive(tracing_subscriber::filter::Directive::from_str("naga=error").unwrap()) .add_directive(tracing_subscriber::filter::Directive::from_str("info").unwrap()) - .add_directive(tracing_subscriber::filter::Directive::from_str("starkingdoms=trace").unwrap()) - , + .add_directive(tracing_subscriber::filter::Directive::from_str("starkingdoms=trace").unwrap()), ) .finish() .init(); diff --git a/crates/unified/src/particle_editor/ecs.rs b/crates/unified/src/particle_editor/ecs.rs deleted file mode 100644 index 4987864c5d7a3b2c63db599ffb9c092e2c2a180e..0000000000000000000000000000000000000000 --- a/crates/unified/src/particle_editor/ecs.rs +++ /dev/null @@ -1,38 +0,0 @@ -use std::time::Duration; - -use crate::particles::ParticleEffect; -use bevy::{ - asset::Handle, - ecs::component::Component, - time::{Timer, TimerMode}, -}; -use crate::prelude::*; - -#[derive(Component)] -pub struct Particle; - -#[derive(Component)] -pub struct LifetimeTimer(pub Timer); -impl LifetimeTimer { - #[allow(dead_code, reason = "ghostly, what is this for?")] - pub fn new(lifetime: f32) -> LifetimeTimer { - LifetimeTimer(Timer::new( - Duration::from_secs_f32(lifetime), - TimerMode::Once, - )) - } -} - -#[derive(Component)] -pub struct SpawnDelayTimer(pub Timer); -impl SpawnDelayTimer { - pub fn new(delay: f32) -> SpawnDelayTimer { - SpawnDelayTimer(Timer::new(Duration::from_secs_f32(delay), TimerMode::Once)) - } -} - -#[derive(Component)] -pub struct CircleMesh(pub Handle, pub Handle); - -#[derive(Component)] -pub struct ParentEffect(pub ParticleEffect); diff --git a/crates/unified/src/particle_editor/hooks.rs b/crates/unified/src/particle_editor/hooks.rs deleted file mode 100644 index ba883e6d32c1e2289df9e0e521be9b78a781117f..0000000000000000000000000000000000000000 --- a/crates/unified/src/particle_editor/hooks.rs +++ /dev/null @@ -1,21 +0,0 @@ -use crate::prelude::*; - -use crate::{particle_editor::ecs::SpawnDelayTimer, particles::ParticleEffect}; - -pub fn hooks_plugin(app: &mut App) { - app.add_systems(Update, init_particle_effect); -} - -fn init_particle_effect( - mut commands: Commands, - particle_effect: Query<(Entity, &ParticleEffect), Added>, -) { - for (entity, effect) in particle_effect { - commands - .get_entity(entity) - .unwrap() - .insert(SpawnDelayTimer::new( - effect.batch_spawn_delay_seconds.sample(&mut rand::rng()), - )); - } -} diff --git a/crates/unified/src/particle_editor/mod.rs b/crates/unified/src/particle_editor/mod.rs deleted file mode 100644 index 0fc892ee8b19b7edc0dac1ccf97028248b7db171..0000000000000000000000000000000000000000 --- a/crates/unified/src/particle_editor/mod.rs +++ /dev/null @@ -1,329 +0,0 @@ -use crate::{ - particle_editor::{hooks::hooks_plugin, spawn::spawn_plugin}, - particles::{LifetimeCurve, ParticleEffect, RandF32, RandUsize, RandVec2}, -}; -use crate::prelude::*; -use bevy_egui::{EguiContexts, EguiPlugin, EguiPrimaryContextPass, egui}; -use ordered_float::OrderedFloat; -use std::collections::BTreeMap; - -mod ecs; -mod hooks; -mod spawn; - -pub fn particle_editor_plugin(app: &mut App) { - app.add_plugins(DefaultPlugins); - app.insert_resource(Gravity::ZERO); - app.add_plugins(EguiPlugin::default()); - app.add_plugins(PhysicsPlugins::default().with_length_unit(100.0)); - app.add_systems(Startup, setup_camera_system); - app.add_systems(EguiPrimaryContextPass, editor_ui); - app.add_systems(Startup, setup_editor_effect); - app.add_plugins(spawn_plugin); - app.add_plugins(hooks_plugin); - app.insert_resource(EditorResource { - ser_field: String::new(), - status: "Ready".to_string(), - add_scale_t: 0.0, - add_scale_v: 0.0, - add_color_t: 0.0, - add_color_v: [0u8; 4], - scale_curve: LifetimeCurve::new(&[(0.0f32, 5.0), (2.0, 0.0)]) - .0 - .iter() - .map(|u| (*u.0, *u.1)) - .collect::>(), - color_curve: vec![(OrderedFloat(0.0f32), [255, 0, 0, 255])], - }); -} - -fn setup_editor_effect(mut commands: Commands) { - commands.spawn(( - ParticleEffect { - lifetime_seconds: RandF32 { - value: 2.0, - randomness: 0.1, - }, - batch_spawn_delay_seconds: RandF32 { - value: 0.1, - randomness: 0.05, - }, - particles_in_batch: RandUsize { - value: 1, - randomness: 1, - }, - initial_linear_velocity: RandVec2 { - x: RandF32 { - value: 0.0, - randomness: 0.5, - }, - y: RandF32 { - value: 10.0, - randomness: 1.0, - }, - }, - initial_angular_velocity: RandF32 { - value: 1.0, - randomness: 0.5, - }, - scale: LifetimeCurve::new(&[(0.0f32, 5.0), (2.0, 0.0)]), - color: LifetimeCurve::new(&[(0.0f32, Srgba::new(1.0, 0.0, 0.0, 1.0).into())]), - }, - Transform::from_xyz(0.0, 0.0, 0.0), - )); -} - -fn setup_camera_system(mut commands: Commands) { - commands.spawn((Camera2d, Transform::from_scale(Vec3::splat(0.1)))); -} - -#[derive(Resource)] -struct EditorResource { - ser_field: String, - status: String, - - add_scale_t: f32, - add_scale_v: f32, - - add_color_t: f32, - add_color_v: [u8; 4], - - scale_curve: Vec<(OrderedFloat, f32)>, - color_curve: Vec<(OrderedFloat, [u8; 4])>, -} - -fn editor_ui( - mut contexts: EguiContexts, - effect: Single<&mut ParticleEffect>, - mut editor_resource: ResMut, -) -> Result { - let mut effect = effect.into_inner(); - egui::Window::new("Particle Effect") - .resizable(false) - .show(contexts.ctx_mut()?, |ui| { - egui::Grid::new("effect").striped(true).show(ui, |ui| { - draw_rand_f32(&mut effect.lifetime_seconds, "Lifetime (seconds): ", ui); - draw_rand_f32( - &mut effect.batch_spawn_delay_seconds, - "Delay in between batches (seconds): ", - ui, - ); - draw_rand_usize( - &mut effect.particles_in_batch, - "Number of particles in batch: ", - ui, - ); - - draw_rand_f32( - &mut effect.initial_linear_velocity.x, - "Linear velocity (x-axis, m/s): ", - ui, - ); - draw_rand_f32( - &mut effect.initial_linear_velocity.y, - "Linear velocity (y-axis, m/s): ", - ui, - ); - draw_rand_f32( - &mut effect.initial_angular_velocity, - "Angular velocity (radians/second): ", - ui, - ); - - ui.separator(); - ui.label("Scale curve"); - if ui.button("sort").clicked() { - editor_resource.scale_curve.sort_by_key(|u| u.0); - } - ui.end_row(); - - editor_resource.scale_curve.retain_mut(|(k, v)| { - ui.label("scale t="); - ui.add( - egui::DragValue::new(k.as_mut()) - .speed(0.01) - .range(0.0f32..=effect.lifetime_seconds.value), - ); - ui.label("v="); - ui.add(egui::DragValue::new(v).speed(0.01)); - let r = ui.button("-"); - ui.end_row(); - !r.clicked() - }); - - ui.separator(); - ui.end_row(); - - ui.label("new scale: t="); - ui.add( - egui::DragValue::new(&mut editor_resource.add_scale_t) - .speed(0.01) - .range(0.0f32..=effect.lifetime_seconds.value), - ); - ui.label("v="); - ui.add(egui::DragValue::new(&mut editor_resource.add_scale_v).speed(0.01)); - if ui.button("+").clicked() { - let new_v = ( - OrderedFloat(editor_resource.add_scale_t), - editor_resource.add_scale_v, - ); - editor_resource.scale_curve.push(new_v); - } - ui.end_row(); - - effect.scale = LifetimeCurve( - editor_resource - .scale_curve - .iter() - .copied() - .collect::>(), - ); - - ui.separator(); - ui.end_row(); - - ui.separator(); - ui.label("Color curve"); - if ui.button("sort").clicked() { - editor_resource.color_curve.sort_by_key(|u| u.0); - } - ui.end_row(); - - editor_resource.color_curve.retain_mut(|(k, v)| { - ui.label("color t="); - ui.add( - egui::DragValue::new(k.as_mut()) - .speed(0.01) - .range(0.0f32..=effect.lifetime_seconds.value), - ); - ui.label("v="); - ui.color_edit_button_srgba_unmultiplied(v); - let r = ui.button("-"); - ui.end_row(); - !r.clicked() - }); - - ui.separator(); - ui.end_row(); - - ui.label("new color: t="); - ui.add( - egui::DragValue::new(&mut editor_resource.add_color_t) - .speed(0.01) - .range(0.0f32..=effect.lifetime_seconds.value), - ); - ui.label("v="); - ui.color_edit_button_srgba_unmultiplied(&mut editor_resource.add_color_v); - if ui.button("+").clicked() { - let new_v = ( - OrderedFloat(editor_resource.add_color_t), - editor_resource.add_color_v, - ); - editor_resource.color_curve.push(new_v); - } - ui.end_row(); - - let curve_copied = editor_resource.color_curve.clone(); - effect.color = LifetimeCurve( - curve_copied - .iter() - .map(|(u, v)| { - ( - *u, - Color::Srgba(Srgba::new( - f32::from(v[0]) / 256.0, - f32::from(v[1]) / 256.0, - f32::from(v[2]) / 256.0, - f32::from(v[3]) / 256.0, - )), - ) - }) - .collect::>(), - ); - - ui.separator(); - ui.end_row(); - }); - ui.horizontal(|ui| { - if ui.button("Generate").clicked() { - effect.scale = LifetimeCurve( - editor_resource - .scale_curve - .iter() - .copied() - .collect::>(), - ); - let curve_copied = editor_resource.color_curve.clone(); - effect.color = LifetimeCurve( - curve_copied - .iter() - .map(|(u, v)| { - ( - *u, - Color::Srgba(Srgba::new( - f32::from(v[0]) / 256.0, - f32::from(v[1]) / 256.0, - f32::from(v[2]) / 256.0, - f32::from(v[3]) / 256.0, - )), - ) - }) - .collect::>(), - ); - - editor_resource.ser_field = ron::ser::to_string(effect.as_ref()).unwrap(); - editor_resource.status = "Ready; Generated OK".to_string(); - } - if ui.button("Load").clicked() { - match ron::from_str(&editor_resource.ser_field) { - Ok(e) => { - *effect = e; - editor_resource.scale_curve = effect - .scale - .0 - .iter() - .map(|u| (*u.0, *u.1)) - .collect::>(); - editor_resource.color_curve = effect - .color - .0 - .iter() - .map(|u| { - (*u.0, { - let mut r = [0u8; 4]; - let srgba: Srgba = (*u.1).into(); - r[0] = (srgba.red * 256.0).floor() as u8; - r[1] = (srgba.green * 256.0).floor() as u8; - r[2] = (srgba.blue * 256.0).floor() as u8; - r[3] = (srgba.alpha * 256.0).floor() as u8; - r - }) - }) - .collect::>(); - } - Err(e) => { - editor_resource.status = e.to_string(); - } - } - } - }); - ui.text_edit_multiline(&mut editor_resource.ser_field); - ui.text_edit_multiline(&mut editor_resource.status.as_str()); - }); - Ok(()) -} - -fn draw_rand_f32(v: &mut RandF32, l: &str, ui: &mut egui::Ui) { - ui.label(l); - ui.add(egui::DragValue::new(&mut v.value).speed(0.01)); - ui.label("variance:"); - ui.add(egui::DragValue::new(&mut v.randomness).speed(0.01)); - ui.end_row(); -} -fn draw_rand_usize(v: &mut RandUsize, l: &str, ui: &mut egui::Ui) { - ui.label(l); - ui.add(egui::DragValue::new(&mut v.value).speed(0.1)); - ui.label("variance:"); - ui.add(egui::DragValue::new(&mut v.randomness).speed(0.1)); - ui.end_row(); -} diff --git a/crates/unified/src/particle_editor/spawn.rs b/crates/unified/src/particle_editor/spawn.rs deleted file mode 100644 index 1af3fab6f4ee1d188882052d7f562e6f1eb04bc6..0000000000000000000000000000000000000000 --- a/crates/unified/src/particle_editor/spawn.rs +++ /dev/null @@ -1,100 +0,0 @@ -use std::time::Duration; -use avian2d::prelude::*; -use crate::prelude::*; - -use crate::{ - particle_editor::ecs::{CircleMesh, LifetimeTimer, ParentEffect, Particle, SpawnDelayTimer}, - particles::ParticleEffect, -}; - -pub fn spawn_plugin(app: &mut App) { - app.add_systems(Update, spawn_particles); - app.add_systems(Update, lifetime_particles); -} - -fn spawn_particles( - mut commands: Commands, - particle_effects: Query<(&Transform, &ParticleEffect, &mut SpawnDelayTimer)>, - time: ResMut