Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternate solution to command api. #446

Merged
merged 71 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
b50dcfc
Sync commands to players based on command visibility scope.
JackCrumpLeys Aug 5, 2023
c0cfc83
Rebase from main
JackCrumpLeys Aug 11, 2023
8180992
Merge branch 'main' into command_api
JackCrumpLeys Aug 11, 2023
703ab58
WIP
JackCrumpLeys Aug 11, 2023
1945b3a
Merge remote-tracking branch 'origin/command_api' into command_api
JackCrumpLeys Aug 11, 2023
667e5ae
WIP
JackCrumpLeys Aug 14, 2023
520acd1
DERIVE MACRO WORKS :tada: WOOO
JackCrumpLeys Aug 16, 2023
e578038
WIP
JackCrumpLeys Aug 17, 2023
def9123
Overhaul of parsing
JackCrumpLeys Aug 19, 2023
a5f2c52
I forgot to git add the derive macro lmao
JackCrumpLeys Aug 20, 2023
971def4
cleanup
JackCrumpLeys Aug 20, 2023
a57174d
Merge branch 'main' into command_api
JackCrumpLeys Aug 20, 2023
15e29b7
post merge cleanup
JackCrumpLeys Aug 20, 2023
9706540
WIP // cleanup
JackCrumpLeys Aug 24, 2023
441853a
complete rewire of command handler
JackCrumpLeys Aug 26, 2023
1b035f5
some modifications ;) (implement modifiers)
JackCrumpLeys Aug 28, 2023
b6c6f2f
Merge branch 'main' into command_api
JackCrumpLeys Aug 28, 2023
a7a5f04
fix
JackCrumpLeys Aug 28, 2023
6cbeb5a
big refactor - some optimisations - also a special type for modifiers…
JackCrumpLeys Sep 5, 2023
1459a07
Merge branch 'main' into command_api
JackCrumpLeys Sep 5, 2023
7a18888
big daddy clippy is now satiated
JackCrumpLeys Sep 5, 2023
47ea290
big daddy clippy is further satiated
JackCrumpLeys Sep 5, 2023
6216e50
some improvements and cleaning
JackCrumpLeys Sep 11, 2023
4433a10
fix lol
JackCrumpLeys Sep 11, 2023
4d1edc6
more cleanup and fixes
JackCrumpLeys Sep 11, 2023
1c46726
some typo and other fixes
JackCrumpLeys Sep 12, 2023
255a74d
Merge branch 'main' into command_api
JackCrumpLeys Sep 12, 2023
cf415ef
some comment fixes.
JackCrumpLeys Sep 12, 2023
482e276
some fixes.
JackCrumpLeys Sep 12, 2023
46941d8
ignore bool case
JackCrumpLeys Sep 12, 2023
a806787
remove unused dep
JackCrumpLeys Sep 12, 2023
86f0580
better readme for derive macro crate
JackCrumpLeys Sep 12, 2023
f598204
fix
JackCrumpLeys Sep 12, 2023
c7b4fec
put valence behind feture flag + remove debug printing.
JackCrumpLeys Sep 12, 2023
dc4a233
bye timers
JackCrumpLeys Sep 12, 2023
006a609
update depgaph
JackCrumpLeys Sep 12, 2023
68f4197
fixes
JackCrumpLeys Sep 12, 2023
b32f43f
fix broken
JackCrumpLeys Sep 12, 2023
db89fe2
remove useless bool tests
JackCrumpLeys Sep 12, 2023
44e788b
small improvements to entity selctor
JackCrumpLeys Sep 12, 2023
6eba927
fix typo
JackCrumpLeys Sep 12, 2023
33e5f42
Update crates/valence_command_derive/README.md
JackCrumpLeys Sep 13, 2023
ff10efe
fix
JackCrumpLeys Sep 13, 2023
5fb0d83
Merge remote-tracking branch 'origin/command_api' into command_api
JackCrumpLeys Sep 13, 2023
4f32dfb
fix bool
JackCrumpLeys Sep 13, 2023
e7e39f0
Update crates/valence_command/src/parsers/mod.rs
JackCrumpLeys Sep 16, 2023
e586c17
remove valence feature
JackCrumpLeys Sep 16, 2023
ec42eec
fixes
JackCrumpLeys Sep 16, 2023
fed7d5b
git add parsers
JackCrumpLeys Sep 16, 2023
2b452e4
spans for errors
JackCrumpLeys Sep 16, 2023
d4c7821
depgraph update
JackCrumpLeys Sep 16, 2023
2c76ecc
fmt
JackCrumpLeys Sep 16, 2023
01fbccf
use `valence::command` instead of `valence_command` in macro.
JackCrumpLeys Sep 18, 2023
a47cbba
fixes
JackCrumpLeys Sep 24, 2023
df51f5b
wip
JackCrumpLeys Sep 25, 2023
28e4259
overhaul on command tree among other things
JackCrumpLeys Sep 25, 2023
2a93546
bug swatting
JackCrumpLeys Sep 25, 2023
bffcbc1
fmt
JackCrumpLeys Sep 25, 2023
8bf60b7
Merge branch 'main' into command_api
JackCrumpLeys Sep 25, 2023
8af3d10
overhaul gamemode and teleport command in example
JackCrumpLeys Sep 25, 2023
5461332
fix 'n fmt
JackCrumpLeys Sep 25, 2023
624d864
Merge remote-tracking branch 'origin/command_api' into command_api
JackCrumpLeys Sep 25, 2023
3d4140c
fix
JackCrumpLeys Oct 1, 2023
6969463
fix
JackCrumpLeys Oct 1, 2023
5920525
fix
JackCrumpLeys Oct 1, 2023
3f1923a
fmt
JackCrumpLeys Oct 1, 2023
1e58711
opt for "safer" str slicing over manual memory management.
JackCrumpLeys Oct 4, 2023
7a3af5d
fmt
JackCrumpLeys Oct 25, 2023
fc225d6
Merge branch 'main' into command_api
JackCrumpLeys Oct 25, 2023
ac1f514
depgraph
JackCrumpLeys Oct 25, 2023
cc0302c
Merge branch 'main' into command_api
rj00a Oct 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ default = [
"player_list",
"scoreboard",
"world_border",
"command",
"weather",
"testing",
]
Expand All @@ -34,6 +35,7 @@ network = ["dep:valence_network"]
player_list = ["dep:valence_player_list"]
scoreboard = ["dep:valence_scoreboard"]
world_border = ["dep:valence_world_border"]
command = ["dep:valence_command", "dep:valence_command_macros"]
weather = ["dep:valence_weather"]
testing = []

Expand All @@ -42,25 +44,28 @@ anyhow.workspace = true
bevy_app.workspace = true
bevy_ecs.workspace = true
bevy_log = { workspace = true, optional = true }
uuid.workspace = true
bytes.workspace = true
rand.workspace = true
uuid.workspace = true
valence_advancement = { workspace = true, optional = true }
valence_anvil = { workspace = true, optional = true, features = [
"bevy_plugin",
] }
valence_boss_bar = { workspace = true, optional = true }
valence_server.workspace = true
valence_command = { workspace = true, optional = true }
valence_command_macros = { workspace = true, optional = true }
valence_ident_macros.workspace = true
valence_ident.workspace = true
valence_inventory = { workspace = true, optional = true }
valence_lang.workspace = true
valence_network = { workspace = true, optional = true }
valence_player_list = { workspace = true, optional = true }
valence_registry.workspace = true
valence_scoreboard = { workspace = true, optional = true }
valence_server.workspace = true
valence_text.workspace = true
valence_weather = { workspace = true, optional = true }
valence_world_border = { workspace = true, optional = true }
valence_lang.workspace = true
valence_text.workspace = true
valence_ident.workspace = true

[dev-dependencies]
anyhow.workspace = true
Expand Down Expand Up @@ -106,6 +111,7 @@ async-trait = "0.1.60"
atty = "0.2.14"
base64 = "0.21.0"
bevy_app = { version = "0.11", default-features = false }
bevy_derive = "0.11.2"
bevy_ecs = { version = "0.11", default-features = false, features = [
"multi-threaded",
] }
Expand Down Expand Up @@ -141,8 +147,10 @@ noise = "0.8.2"
num = "0.4.0"
num-bigint = "0.4.3"
owo-colors = "3.5.0"
ordered-float = "3.7.0"
parking_lot = "0.12.1"
paste = "1.0.11"
petgraph = "0.6.3"
pretty_assertions = "1.3.0"
proc-macro2 = "1.0.56"
quote = "1.0.26"
Expand All @@ -155,6 +163,7 @@ rsa = "0.9.2"
rsa-der = "0.3.0"
rustc-hash = "1.1.0"
serde = "1.0.160"
serde-value = "0.7.0"
serde_json = "1.0.96"
sha1 = "0.10.5"
sha2 = "0.10.6"
Expand All @@ -174,6 +183,8 @@ valence_advancement = { path = "crates/valence_advancement", version = "0.2.0-al
valence_anvil = { path = "crates/valence_anvil", version = "0.1.0" }
valence_boss_bar = { path = "crates/valence_boss_bar", version = "0.2.0-alpha.1" }
valence_build_utils = { path = "crates/valence_build_utils", version = "0.2.0-alpha.1" }
valence_command = { path = "crates/valence_command", version = "0.2.0-alpha.1" }
valence_command_macros = { path = "crates/valence_command_macros", version = "0.2.0-alpha.1" }
valence_entity = { path = "crates/valence_entity", version = "0.2.0-alpha.1" }
valence_generated = { path = "crates/valence_generated", version = "0.2.0-alpha.1" }
valence_ident = { path = "crates/valence_ident", version = "0.2.0-alpha.1" }
Expand Down
352 changes: 185 additions & 167 deletions assets/depgraph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions crates/valence_command/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
name = "valence_command"
description = "Command management for Valence"
readme = "README.md"
version.workspace = true
edition.workspace = true
repository.workspace = true
documentation.workspace = true
license.workspace = true

[dependencies]
anyhow.workspace = true
bevy_app.workspace = true
bevy_derive.workspace = true
bevy_ecs.workspace = true
byteorder.workspace = true
ordered-float.workspace = true
petgraph.workspace = true
thiserror.workspace = true
tracing.workspace = true

valence_server.workspace = true
valence_text.workspace = true
13 changes: 13 additions & 0 deletions crates/valence_command/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Valence Command

This plugin manages the command system for a valence server. It is responsible for parsing, storing, managing and
dispatching commands.

#### This plugin manages the following:

- Registering commands to a Command Graph which is used parse commands.
- Receiving commands from the client and turning them into events.
- Parsing commands and dispatching them in the registered executable format.
- Sending the command graph to clients.

See the module level documentation for more information.
Loading
Loading