diff --git a/Cargo.lock b/Cargo.lock index b2647c5..5481898 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -376,9 +376,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bevy" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e938630e9f472b1899c78ef84aa907081b23bad8333140e2295c620485b6ee7" +checksum = "043c9ad4b6fc4ca52d779873a8ca792a4e37842d07fce95363c9e17e36a1d8a0" dependencies = [ "bevy_internal", ] @@ -429,9 +429,9 @@ dependencies = [ [[package]] name = "bevy_a11y" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e613f0e7d5a92637e59744f7185e374c9a59654ecc6d7575adcec9581db1363" +checksum = "ae1a976cb539d6a5a3ff579cdb78187a6bcfbffa7e8224ea28f23d8b983d9389" dependencies = [ "accesskit", "bevy_app", @@ -441,9 +441,9 @@ dependencies = [ [[package]] name = "bevy_animation" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23aa4141df149b743e69c90244261c6372bafb70d9f115885de48a75fc28fd9b" +checksum = "93aef7d21a0342c24b05059493aa31d58f1798d34a2236569a8789b74df5a475" dependencies = [ "bevy_app", "bevy_asset", @@ -471,9 +471,9 @@ dependencies = [ [[package]] name = "bevy_app" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f548e9dab7d10c5f99e3b504c758c4bf87aa67df9bcb9cc8b317a0271770e72" +checksum = "a5361d0f8a8677a5d0102cfe7321a7ecd2a8b9a4f887ce0dde1059311cf9cd42" dependencies = [ "bevy_derive", "bevy_ecs", @@ -489,9 +489,9 @@ dependencies = [ [[package]] name = "bevy_asset" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d198e4c3419215de2ad981d4e734bbfab46469b7575e3b7150c912b9ec5175" +checksum = "60ec5ea257e1ebd3d411f669e29acf60beb715bebc7e1f374c17f49cd3aad46c" dependencies = [ "async-broadcast", "async-fs", @@ -547,9 +547,9 @@ dependencies = [ [[package]] name = "bevy_asset_macros" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b2cbeba287a4b44e116c33dbaf37dce80a9d84477b2bb35ff459999d6c9e1b" +checksum = "c9eb05ce838d282f09d83380b4d6432aec7519d421dee8c75cc20e6148237e6e" dependencies = [ "bevy_macro_utils", "proc-macro2 1.0.86", @@ -559,9 +559,9 @@ dependencies = [ [[package]] name = "bevy_audio" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e41ecf15d0aae31bdb6d2b5cc590f966451e9736ddfee634c8f1ca5af1ac4342" +checksum = "8ee31312a0e67f288fe12a1d9aa679dd0ba8a49e1e6fe5fcd2ba1aa1ea34e5ed" dependencies = [ "bevy_app", "bevy_asset", @@ -578,9 +578,9 @@ dependencies = [ [[package]] name = "bevy_color" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a933306f5c7dc9568209180f482b28b5f40d2f8d5b361bc1b270c0a588752c0" +checksum = "04842e9d38a93f0c75ab46f7f404ea24ef57ad83dbd159e5b4b35318b02257bb" dependencies = [ "bevy_math", "bevy_reflect", @@ -606,9 +606,9 @@ dependencies = [ [[package]] name = "bevy_core" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ddeed5ebf2fa75a4d4f32e2da9c60f11037e36252695059a151c6685cd3d72b" +checksum = "de706862871a1fe99ea619bff2f99d73e43ad82f19ef866a9e19a14c957c8537" dependencies = [ "bevy_app", "bevy_ecs", @@ -620,9 +620,9 @@ dependencies = [ [[package]] name = "bevy_core_pipeline" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b978220b5edc98f2c5cbbd14c118c74b3ec7216e5416d3c187c1097279b009b" +checksum = "2f6e1e122ada4cd811442e083fb5ad3e325c59a87271d5ef57193f1c2cad7f8c" dependencies = [ "bevy_app", "bevy_asset", @@ -645,9 +645,9 @@ dependencies = [ [[package]] name = "bevy_derive" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8a8173bad3ed53fa158806b1beda147263337d6ef71a093780dd141b74386b1" +checksum = "3fbfc33a4c6b80760bb8bf850a2cc65a1e031da62fd3ca8b552189104dc98514" dependencies = [ "bevy_macro_utils", "quote 1.0.36", @@ -656,9 +656,9 @@ dependencies = [ [[package]] name = "bevy_diagnostic" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7f82011fd70048be282526a99756d54bf00e874edafa9664ba0dc247678f03" +checksum = "bebb154e0cc78e3bbfbfdb42fb502b14c1cd47e72f16e6d4228dfe6233ba6cbd" dependencies = [ "bevy_app", "bevy_core", @@ -672,9 +672,9 @@ dependencies = [ [[package]] name = "bevy_ecs" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c77fdc3a7230eff2fcebe4bd17c155bd238c660a0089d0f98c39ba0d461b923" +checksum = "9ee4222406637f3c8e3991a99788cfcde76097bf997c311f1b6297364057483f" dependencies = [ "arrayvec", "bevy_ecs_macros", @@ -693,9 +693,9 @@ dependencies = [ [[package]] name = "bevy_ecs_macros" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9272b511958525306cd141726d3ca59740f79fc0707c439b55a007bcc3497308" +checksum = "36b573430b67aff7bde8292257494f39343401379bfbda64035ba4918bba7b20" dependencies = [ "bevy_macro_utils", "proc-macro2 1.0.86", @@ -727,9 +727,9 @@ dependencies = [ [[package]] name = "bevy_encase_derive" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0452d8254c8bfae4bff6caca2a8be3b0c1b2e1a72b93e9b9f6a21c8dff807e0" +checksum = "d06c9693847a2a6ea61d6b86288dd4d8b6a79f05d4bf6e27b96d4f5c8d552fe4" dependencies = [ "bevy_macro_utils", "encase_derive_impl", @@ -737,9 +737,9 @@ dependencies = [ [[package]] name = "bevy_gilrs" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbad8e59470c3d5cf25aa8c48462c4cf6f0c6314538c68ab2f5cf393146f0fc2" +checksum = "0422ccb3ce0f79b264100cf064fdc5ef65cef5c7d51bf6378058f9b96fea4183" dependencies = [ "bevy_app", "bevy_ecs", @@ -752,9 +752,9 @@ dependencies = [ [[package]] name = "bevy_gizmos" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbb0556f0c6e45f4a17aef9c708c06ebf15ae1bed4533d7eddb493409f9f025" +checksum = "dfe32af0666d8d8a7fd6eb6b5e41eceefdc6f2e5441c74b812e8f0902a9d7f52" dependencies = [ "bevy_app", "bevy_asset", @@ -775,9 +775,9 @@ dependencies = [ [[package]] name = "bevy_gizmos_macros" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ef351a4b6498c197d1317c62f46ba84b69fbde3dbeb57beb2e744bbe5b7c3e0" +checksum = "906b052f8cf3f3983f0f6df625fb10cbd9b27d44e362a327dc1ed51300d362bc" dependencies = [ "bevy_macro_utils", "proc-macro2 1.0.86", @@ -787,9 +787,9 @@ dependencies = [ [[package]] name = "bevy_gltf" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd7abeaf3f28afd1f8999c2169aa17b40a37ad11253cf7dd05017024b65adc6" +checksum = "d6adbd325b90e3c700d0966b5404e226c7deec1b8bda8f36832788d7b435b9b8" dependencies = [ "base64 0.22.1", "bevy_animation", @@ -818,9 +818,9 @@ dependencies = [ [[package]] name = "bevy_hierarchy" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "802eca6f341d19ade790ccfaba7044be4d823b708087eb5ac4c1f74e4ea0916a" +checksum = "a88b912b37e1bc4dbb2aa40723199f74c8b06c4fbb6da0bb4585131df28ef66e" dependencies = [ "bevy_app", "bevy_core", @@ -832,9 +832,9 @@ dependencies = [ [[package]] name = "bevy_input" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d050f1433f48ca23f1ea078734ebff119a3f76eb7d221725ab0f1fd9f81230b" +checksum = "8dd3a54e67cc3ba17971de7b1a7e64eda84493c1e7bb6bfa11c6cf8ac124377b" dependencies = [ "bevy_app", "bevy_ecs", @@ -847,9 +847,9 @@ dependencies = [ [[package]] name = "bevy_internal" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ddd2b23e44d3a1f8ae547cbee5b6661f8135cc456c5de206e8648789944e7a1" +checksum = "45d435cac77c568f3aef65f786a5fee0e53c81950c5258182dd2c1d6cd6c4fec" dependencies = [ "bevy_a11y", "bevy_animation", @@ -888,9 +888,9 @@ dependencies = [ [[package]] name = "bevy_log" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab641fd0de254915ab746165a07677465b2d89b72f5b49367d73b9197548a35" +checksum = "67240c7596c8f0653e50fce35a60196516817449235193246599facba9002e02" dependencies = [ "android_log-sys", "bevy_app", @@ -905,9 +905,9 @@ dependencies = [ [[package]] name = "bevy_macro_utils" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ad860d35d74b35d4d6ae7f656d163b6f475aa2e64fc293ee86ac901977ddb7" +checksum = "bfc65e570012e64a21f3546df68591aaede8349e6174fb500071677f54f06630" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.36", @@ -917,31 +917,32 @@ dependencies = [ [[package]] name = "bevy_math" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51bd6ce2174d3237d30e0ab5b2508480cc7593ca4d96ffb3a3095f9fc6bbc34c" +checksum = "5421792749dda753ab3718e77d27bfce38443daf1850b836b97530b6245a4581" dependencies = [ "bevy_reflect", "glam", "rand 0.8.5", + "serde", "smallvec", "thiserror", ] [[package]] name = "bevy_mikktspace" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ce4266293629a2d10459cc112dffe3b3e9229a4f2b8a4d20061b8dd53316d0" +checksum = "66cf695a264b043f2c4edb92dd5c742e6892180d2b30dac870012d153f8557ea" dependencies = [ "glam", ] [[package]] name = "bevy_pbr" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3effe8ff28899f14d250d0649ca9868dbe68b389d0f2b7af086759b8e16c6e3d" +checksum = "4dccaa3c945f19834dcf7cd8eb358236dbf0fc4000dacbc7710564e7856714db" dependencies = [ "bevy_app", "bevy_asset", @@ -966,9 +967,9 @@ dependencies = [ [[package]] name = "bevy_ptr" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c115c97a5c8a263bd0aa7001b999772c744ac5ba797d07c86f25734ce381ea69" +checksum = "61baa1bdc1f4a7ac2c18217570a7cc04e1cd54d38456e91782f0371c79afe0a8" [[package]] name = "bevy_rapier3d" @@ -985,9 +986,9 @@ dependencies = [ [[package]] name = "bevy_reflect" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406ea0fce267169c2320c7302d97d09f605105686346762562c5f65960b5ca2f" +checksum = "2508785a4a5809f25a237eec4fee2c91a4dbcf81324b2bbc2d6c52629e603781" dependencies = [ "bevy_ptr", "bevy_reflect_derive", @@ -1005,9 +1006,9 @@ dependencies = [ [[package]] name = "bevy_reflect_derive" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0427fdb4425fc72cc96d45e550df83ace6347f0503840de116c76a40843ba751" +checksum = "967d5da1882ec3bb3675353915d3da909cafac033cbf31e58727824a1ad2a288" dependencies = [ "bevy_macro_utils", "proc-macro2 1.0.86", @@ -1018,9 +1019,9 @@ dependencies = [ [[package]] name = "bevy_render" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c48acf1ff4267c231def4cbf573248d42ac60c9952108822d505019460bf36d" +checksum = "836cf8a513db013cbe7d55a331060088efd407e49fd5b05c8404700cd82e7619" dependencies = [ "async-channel", "bevy_app", @@ -1067,9 +1068,9 @@ dependencies = [ [[package]] name = "bevy_render_macros" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ddf4a96d71519c8eca3d74dabcb89a9c0d50ab5d9230638cb004145f46e9ed" +checksum = "cbc24e0e95061a38a7744218b9c7e52e4c08b53f1499f33480e2b749f3864432" dependencies = [ "bevy_macro_utils", "proc-macro2 1.0.86", @@ -1079,9 +1080,9 @@ dependencies = [ [[package]] name = "bevy_scene" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7a9f0388612a116f02ab6187aeab66e52c9e91abbc21f919b8b50230c4d83e7" +checksum = "8ec57a72d75273bdbb6154390688fd07ba79ae9f6f99476d1937f799c736c2da" dependencies = [ "bevy_app", "bevy_asset", @@ -1099,9 +1100,9 @@ dependencies = [ [[package]] name = "bevy_sprite" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d837e33ed27b9f2e5212eca4bdd5655a9ee64c52914112e6189c043cb25dd1ec" +checksum = "e045b4d8cc8e7422a4c29b1eadbe224f5cc42f170b88d43e7535892fcede3840" dependencies = [ "bevy_app", "bevy_asset", @@ -1125,9 +1126,9 @@ dependencies = [ [[package]] name = "bevy_state" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0959984092d56885fd3b320ea84fb816821bad6bfa3040b9d4ee850d3273233d" +checksum = "25335bfa58cc22371182335c3b133017293bc9b6d3308402fd4d1f978b83f937" dependencies = [ "bevy_app", "bevy_ecs", @@ -1139,9 +1140,9 @@ dependencies = [ [[package]] name = "bevy_state_macros" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "887a98bfa268258377cd073f5bb839518d3a1cd6b96ed81418145485b69378e6" +checksum = "dee600b659c739f1911f997a81611fec0a1832cf731727956e5fa4e7532b4dd5" dependencies = [ "bevy_macro_utils", "proc-macro2 1.0.86", @@ -1151,9 +1152,9 @@ dependencies = [ [[package]] name = "bevy_tasks" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a8bfb8d484bdb1e9bec3789c75202adc5e608c4244347152e50fb31668a54f9" +checksum = "77865f310b1fc48fb05b7c4adbe76607ec01d0c14f8ab4caba4d714c86439946" dependencies = [ "async-channel", "async-executor", @@ -1164,9 +1165,9 @@ dependencies = [ [[package]] name = "bevy_text" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "454fd29b7828244356b2e0ce782e6d0a6f26b47f521456accde3a7191b121727" +checksum = "b661db828fd423fc41a4ccf43aa4d1b8e50e75057ec40453317d0d761e8ad62d" dependencies = [ "ab_glyph", "bevy_app", @@ -1187,9 +1188,9 @@ dependencies = [ [[package]] name = "bevy_time" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6c3d3d14ee8b0dbe4819fd516cc75509b61946134d78e0ee89ad3d1835ffe6c" +checksum = "f4e4d53ec32a1b16492396951d04de0d2d90e924bf9adcb8d1adacab5ab6c17c" dependencies = [ "bevy_app", "bevy_ecs", @@ -1201,9 +1202,9 @@ dependencies = [ [[package]] name = "bevy_transform" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97e8aa6b16be573277c6ceda30aebf1d78af7c6ede19b448dcb052fb8601d815" +checksum = "d5493dce84427d00a9266e8e4386d738a72ee8640423b62dfcecb6dfccbfe0d2" dependencies = [ "bevy_app", "bevy_ecs", @@ -1215,9 +1216,9 @@ dependencies = [ [[package]] name = "bevy_ui" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d9f864c646f3742ff77f67bcd89a13a7ab024b68ca2f1bfbab8245bcb1c06c" +checksum = "56d2cba6603b39a3765f043212ae530e25550af168a7eec6b23b9b93c19bc5f7" dependencies = [ "bevy_a11y", "bevy_app", @@ -1245,9 +1246,9 @@ dependencies = [ [[package]] name = "bevy_utils" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fab364910e8f5839578aba9cfda00a8388e9ebe352ceb8491a742ce6af9ec6e" +checksum = "ffb0ec333b5965771153bd746f92ffd8aeeb9d008a8620ffd9ed474859381a5e" dependencies = [ "ahash", "bevy_utils_proc_macros", @@ -1260,9 +1261,9 @@ dependencies = [ [[package]] name = "bevy_utils_proc_macros" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad9db261ab33a046e1f54b35f885a44f21fcc80aa2bc9050319466b88fe58fe3" +checksum = "38f1ab8f2f6f58439d260081d89a42b02690e5fdd64f814edc9417d33fcf2857" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.36", @@ -1271,9 +1272,9 @@ dependencies = [ [[package]] name = "bevy_window" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9ea5777f933bf7ecaeb3af1a30845720ec730e007972ca7d4aba2d3512abe24" +checksum = "c89e88a20db64ea8204540afb4699295947c454738fd50293f7b32ab8be857a6" dependencies = [ "bevy_a11y", "bevy_app", @@ -1287,9 +1288,9 @@ dependencies = [ [[package]] name = "bevy_winit" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c2213bbf14debe819ec8ad4913f233c596002d087bc6f1f20d533e2ebaf8c6" +checksum = "d0bef8ec3e4b45db943ad4d1c0bf59b09e382ce0651a706e2f33a70fa955303c" dependencies = [ "accesskit_winit", "approx", @@ -1922,6 +1923,18 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +[[package]] +name = "deprecate-until" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a3767f826efbbe5a5ae093920b58b43b01734202be697e1354914e862e8e704" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.36", + "semver", + "syn 2.0.70", +] + [[package]] name = "derive_builder" version = "0.7.2" @@ -2755,6 +2768,15 @@ dependencies = [ "libc", ] +[[package]] +name = "integer-sqrt" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" +dependencies = [ + "num-traits", +] + [[package]] name = "interpolate_name" version = "0.2.4" @@ -3808,9 +3830,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "4.2.1" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ff2cf528c6c03d9ed653d6c4ce1dc0582dc4af309790ad92f07c1cd551b0be" +checksum = "44d501f1a72f71d3c063a6bbc8f7271fa73aa09fe5d6283b6571e2ed176a2537" dependencies = [ "num-traits", ] @@ -3895,6 +3917,20 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" +[[package]] +name = "pathfinding" +version = "4.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cff69f3ba9d0346c1dbe1248fc2ed4523567b683d1b6ff4144a6b3583369082" +dependencies = [ + "deprecate-until", + "indexmap", + "integer-sqrt", + "num-traits", + "rustc-hash 2.0.0", + "thiserror", +] + [[package]] name = "percent-encoding" version = "2.3.1" @@ -4538,6 +4574,12 @@ dependencies = [ "tiny-skia", ] +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + [[package]] name = "send_wrapper" version = "0.6.0" @@ -5156,6 +5198,8 @@ dependencies = [ "bevy", "bevy_asset_loader", "bevy_rapier3d", + "ordered-float", + "pathfinding", "quadtree_rs", "ron", "serde", diff --git a/engine/asset_loader/Cargo.toml b/engine/asset_loader/Cargo.toml index 31a6fff..53fd560 100644 --- a/engine/asset_loader/Cargo.toml +++ b/engine/asset_loader/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" [dependencies] serde = "1.0.204" serde_json = "1.0.120" -bevy = "0.14.0" +bevy = "0.14.2" ron = "0.8.1" diff --git a/engine/world_generation/Cargo.toml b/engine/world_generation/Cargo.toml index 33fc9f2..3e8e93d 100644 --- a/engine/world_generation/Cargo.toml +++ b/engine/world_generation/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bevy = "0.14.0" +bevy = "0.14.2" noise = "0.9.0" serde = { version = "1.0.203", features = ["derive"] } serde_json = "1.0.115" diff --git a/engine/world_generation/src/hex_utils.rs b/engine/world_generation/src/hex_utils.rs index d61209c..032ffb4 100644 --- a/engine/world_generation/src/hex_utils.rs +++ b/engine/world_generation/src/hex_utils.rs @@ -60,7 +60,7 @@ pub fn get_tile_count(radius: usize) -> usize { return 1 + 3 * (radius + 1) * radius; } -#[derive(Default, Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize)] +#[derive(Default, Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize, Hash)] pub struct HexCoord { pub hex: IVec3, } diff --git a/engine/world_generation/src/map/map.rs b/engine/world_generation/src/map/map.rs index 8130116..69987f7 100644 --- a/engine/world_generation/src/map/map.rs +++ b/engine/world_generation/src/map/map.rs @@ -20,6 +20,18 @@ pub struct Map { } impl Map { + pub fn get_tile_count(&self) -> usize { + return self.get_tile_width() * self.get_tile_height(); + } + + pub fn get_tile_width(&self) -> usize { + return self.width * Chunk::SIZE; + } + + pub fn get_tile_height(&self) -> usize { + return self.height * Chunk::SIZE; + } + pub fn get_chunk_mesh_data(&self, chunk_index: usize) -> MeshChunkData { #[cfg(feature = "tracing")] let _spawn_span = info_span!("Chunk Mesh Data").entered(); diff --git a/game/buildings/Cargo.toml b/game/buildings/Cargo.toml index 56fae66..92db7c5 100644 --- a/game/buildings/Cargo.toml +++ b/game/buildings/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bevy = "0.14.0" +bevy = "0.14.2" world_generation = { path = "../../engine/world_generation" } shared = { path = "../shared" } bevy_rapier3d = "0.27.0" diff --git a/game/main/Cargo.toml b/game/main/Cargo.toml index a2937fc..2bae1d5 100644 --- a/game/main/Cargo.toml +++ b/game/main/Cargo.toml @@ -7,7 +7,7 @@ build = "build.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bevy = { version = "0.14.0", features = ["file_watcher"] } +bevy = { version = "0.14.2", features = ["file_watcher"] } bevy-inspector-egui = "0.25.0" iyes_perf_ui = "0.3.0" noise = "0.8.2" diff --git a/game/shared/Cargo.toml b/game/shared/Cargo.toml index c394b40..e8a9e2d 100644 --- a/game/shared/Cargo.toml +++ b/game/shared/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bevy = "0.14.0" +bevy = "0.14.2" serde = { version = "1.0.204", features = ["derive"] } world_generation = { path = "../../engine/world_generation" } diff --git a/game/units/Cargo.toml b/game/units/Cargo.toml index 25c48ea..6a74cb3 100644 --- a/game/units/Cargo.toml +++ b/game/units/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -bevy = "0.14.0" +bevy = "0.14.2" world_generation = { path = "../../engine/world_generation" } shared = { path = "../shared" } bevy_rapier3d = "0.27.0" @@ -17,6 +17,8 @@ bevy_asset_loader = { version = "0.21.0", features = [ "3d", ] } quadtree_rs = "0.1.3" +pathfinding = "4.11.0" +ordered-float = "4.3.0" [features] tracing = [] diff --git a/game/units/src/components.rs b/game/units/src/components.rs index 8f82a34..2296d5e 100644 --- a/game/units/src/components.rs +++ b/game/units/src/components.rs @@ -1,5 +1,6 @@ use bevy::{ecs::world::CommandQueue, prelude::*, tasks::Task}; use serde::{Deserialize, Serialize}; +use world_generation::hex_utils::HexCoord; #[derive(Component, Debug)] pub struct Unit; @@ -19,7 +20,7 @@ pub enum UnitDomain { } #[derive(Component, Debug)] -pub struct Target(pub Vec3); +pub struct Target(pub HexCoord); #[derive(Component, Debug)] pub struct Path(pub Vec, pub usize); diff --git a/game/units/src/lib.rs b/game/units/src/lib.rs index 7c7b0a7..440c589 100644 --- a/game/units/src/lib.rs +++ b/game/units/src/lib.rs @@ -1,5 +1,8 @@ + pub mod assets; pub mod components; +pub mod nav_data; +pub mod resources; #[cfg(debug_assertions)] pub mod units_debug_plugin; pub mod units_plugin; diff --git a/game/units/src/nav_data.rs b/game/units/src/nav_data.rs new file mode 100644 index 0000000..071a413 --- /dev/null +++ b/game/units/src/nav_data.rs @@ -0,0 +1,70 @@ +use ordered_float::OrderedFloat; +use world_generation::{ + hex_utils::HexCoord, + prelude::{Chunk, Map}, +}; + +#[derive(Clone)] +pub struct NavData { + pub tiles: Vec, + pub map_height: usize, + pub map_width: usize, +} + +impl NavData { + pub fn get_neighbors(&self, coord: &HexCoord) -> Vec<(HexCoord, OrderedFloat)> { + let mut neighbors = Vec::with_capacity(6); + for i in 0..6 { + let n = coord.get_neighbor(i); + if !self.is_in_bounds(&n) { + continue; + } + neighbors.push((n, OrderedFloat(1.0))); + } + return neighbors; + } + pub fn get(&self, coord: &HexCoord) -> &NavTile { + return &self.tiles[coord.to_index(self.map_width)]; + } + + pub fn is_in_bounds(&self, pos: &HexCoord) -> bool { + return pos.is_in_bounds(self.map_height, self.map_width); + } + + pub fn build(map: &Map) -> NavData { + let mut tiles = Vec::with_capacity(map.get_tile_count()); + let h = map.get_tile_height(); + let w = map.get_tile_width(); + for y in 0..h { + for x in 0..w { + let coord = HexCoord::from_grid_pos(x, y); + let height = map.sample_height(&coord); + let tile = NavTile { + coord, + height, + move_cost: 1.0, + }; + tiles.push(tile); + } + } + + return NavData { + tiles, + map_width: w, + map_height: h, + }; + } +} + +#[derive(Clone)] +pub struct NavTile { + pub height: f32, + pub move_cost: f32, + pub coord: HexCoord, +} + +impl NavTile { + pub fn calculate_heuristic(&self, to: &HexCoord) -> OrderedFloat { + todo!(); + } +} diff --git a/game/units/src/resources.rs b/game/units/src/resources.rs new file mode 100644 index 0000000..26a6fc8 --- /dev/null +++ b/game/units/src/resources.rs @@ -0,0 +1 @@ +use bevy::prelude::*; diff --git a/game/units/src/units_debug_plugin.rs b/game/units/src/units_debug_plugin.rs index e8ad741..160cf2f 100644 --- a/game/units/src/units_debug_plugin.rs +++ b/game/units/src/units_debug_plugin.rs @@ -60,7 +60,7 @@ fn set_unit_target( for e in units.iter() { info!("Setting Target"); let mut e = commands.entity(e); - e.insert(Target(contact.surface)); + e.insert(Target(contact.tile)); } } } diff --git a/game/units/src/units_plugin.rs b/game/units/src/units_plugin.rs index 610f7de..61571ae 100644 --- a/game/units/src/units_plugin.rs +++ b/game/units/src/units_plugin.rs @@ -1,17 +1,14 @@ -use bevy::{ - ecs::world::CommandQueue, prelude::*, tasks::AsyncComputeTaskPool, transform::commands, utils::futures, - window::PrimaryWindow, -}; -use bevy_asset_loader::loading_state::{ - config::{ConfigureLoadingState, LoadingStateConfig}, - LoadingStateAppExt, -}; -use shared::{resources::TileUnderCursor, sets::GameplaySet, states::AssetLoadState}; +use std::collections::HashMap; + +use bevy::{ecs::world::CommandQueue, prelude::*, tasks::AsyncComputeTaskPool, utils::futures}; +use pathfinding::prelude::astar; +use shared::{resources::TileUnderCursor, sets::GameplaySet}; use world_generation::{hex_utils::HexCoord, prelude::Map}; use crate::{ - assets::{unit_asset::UnitAssetPlugin, unit_database::UnitDatabase}, + assets::unit_asset::UnitAssetPlugin, components::{Path, PathTask, Target, Unit}, + nav_data::{self, NavData}, units_debug_plugin::UnitsDebugPlugin, }; @@ -28,7 +25,10 @@ impl Plugin for UnitsPlugin { app.add_systems(Update, units_control.in_set(GameplaySet)); app.add_systems(Update, move_unit.in_set(GameplaySet)); - app.add_systems(FixedPreUpdate, (calculate_path, resolve_path_task).in_set(GameplaySet)); + app.add_systems( + FixedPreUpdate, + (dispatch_path_requests, resolve_path_task).in_set(GameplaySet), + ); } } @@ -60,27 +60,41 @@ fn move_unit( } } -fn calculate_path( +fn dispatch_path_requests( units: Query<(&Transform, &Target, Entity), (With, Without)>, map: Res, mut commands: Commands, ) { - let pool = AsyncComputeTaskPool::get(); + let mut groups: HashMap> = HashMap::new(); + for (transform, target, entity) in units.iter() { - let from = transform.translation; - let to = target.0; + let req = PathRequest { + entity, + to: HexCoord::from_world_pos(transform.translation), + }; + if let Some(group) = groups.get_mut(&target.0) { + group.push(req); + } else { + groups.insert(target.0, vec![req]); + } + } - let task = pool.spawn(async move { - let mut queue = CommandQueue::default(); + let nav_data = NavData::build(&map); - queue.push(move |world: &mut World| { - //todo: calculate path - world.entity_mut(entity).insert(Path(vec![from, to], 0)); + let pool = AsyncComputeTaskPool::get(); + for (from, units) in groups { + for req in units { + let d = nav_data.clone(); + let task = pool.spawn(async move { + let path = calculate_path(&from, &req.to, d); + let mut queue = CommandQueue::default(); + queue.push(move |world: &mut World| { + world.entity_mut(req.entity).insert(path); + }); + return queue; }); - return queue; - }); - - commands.entity(entity).insert(PathTask(task)).remove::(); + commands.entity(req.entity).insert(PathTask(task)).remove::(); + } } } @@ -92,3 +106,18 @@ fn resolve_path_task(mut tasks: Query<(&mut PathTask, Entity), With>, mut } } } + +fn calculate_path(from: &HexCoord, to: &HexCoord, nav: NavData) -> Path { + let path = astar( + from, + |n| nav.get_neighbors(n), + |n| nav.get(n).calculate_heuristic(to), + |n| n == to, + ); + todo!("Convert path"); +} + +struct PathRequest { + pub entity: Entity, + pub to: HexCoord, +}