Merge branch 'master' into 1.19
This commit is contained in:
commit
496a7dd427
|
@ -1,7 +0,0 @@
|
||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: cargo
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: daily
|
|
||||||
open-pull-requests-limit: 10
|
|
|
@ -11,7 +11,7 @@ jobs:
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
# TODO: refactor toolchain version
|
# TODO: refactor toolchain version
|
||||||
toolchain: 1.58.1
|
toolchain: 1.64.0
|
||||||
components: clippy, rustfmt
|
components: clippy, rustfmt
|
||||||
default: true
|
default: true
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
@ -60,7 +60,7 @@ jobs:
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.58.1
|
toolchain: 1.64.0
|
||||||
components: clippy, rustfmt
|
components: clippy, rustfmt
|
||||||
default: true
|
default: true
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
|
@ -105,7 +105,7 @@ jobs:
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.58.1
|
toolchain: 1.64.0
|
||||||
components: clippy, rustfmt
|
components: clippy, rustfmt
|
||||||
default: true
|
default: true
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
|
@ -161,7 +161,7 @@ jobs:
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
# TODO: refactor toolchain version
|
# TODO: refactor toolchain version
|
||||||
toolchain: 1.58.1
|
toolchain: 1.64.0
|
||||||
components: clippy, rustfmt
|
components: clippy, rustfmt
|
||||||
default: true
|
default: true
|
||||||
- name: Install wasm-pack
|
- name: Install wasm-pack
|
||||||
|
|
|
@ -482,6 +482,12 @@ dependencies = [
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crunchy"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cty"
|
name = "cty"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
|
@ -623,16 +629,15 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "exr"
|
name = "exr"
|
||||||
version = "1.4.2"
|
version = "1.5.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "14cc0e06fb5f67e5d6beadf3a382fec9baca1aa751c6d5368fdeee7e5932c215"
|
checksum = "8eb5f255b5980bb0c8cf676b675d1a99be40f316881444f44e0462eaf5df5ded"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bit_field",
|
"bit_field",
|
||||||
"deflate",
|
|
||||||
"flume",
|
"flume",
|
||||||
"half",
|
"half",
|
||||||
"inflate",
|
|
||||||
"lebe",
|
"lebe",
|
||||||
|
"miniz_oxide 0.6.2",
|
||||||
"smallvec 1.9.0",
|
"smallvec 1.9.0",
|
||||||
"threadpool",
|
"threadpool",
|
||||||
]
|
]
|
||||||
|
@ -653,7 +658,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6"
|
checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crc32fast",
|
"crc32fast",
|
||||||
"miniz_oxide",
|
"miniz_oxide 0.5.3",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -815,9 +820,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "getrandom"
|
name = "getrandom"
|
||||||
version = "0.2.7"
|
version = "0.2.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6"
|
checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
|
@ -878,7 +883,7 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"osmesa-sys",
|
"osmesa-sys",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"raw-window-handle",
|
"raw-window-handle 0.5.0",
|
||||||
"wayland-client",
|
"wayland-client",
|
||||||
"wayland-egl",
|
"wayland-egl",
|
||||||
"winapi",
|
"winapi",
|
||||||
|
@ -945,9 +950,12 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "half"
|
name = "half"
|
||||||
version = "1.8.2"
|
version = "2.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
|
checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554"
|
||||||
|
dependencies = [
|
||||||
|
"crunchy",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hashbrown"
|
name = "hashbrown"
|
||||||
|
@ -1069,9 +1077,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "image"
|
name = "image"
|
||||||
version = "0.24.3"
|
version = "0.24.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7e30ca2ecf7666107ff827a8e481de6a132a9b687ed3bb20bb1c144a36c00964"
|
checksum = "bd8e4fb07cf672b1642304e731ef8a6a4c7891d67bb4fd4f5ce58cd6ed86803c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
|
@ -1096,15 +1104,6 @@ dependencies = [
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "inflate"
|
|
||||||
version = "0.4.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff"
|
|
||||||
dependencies = [
|
|
||||||
"adler32",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "instant"
|
name = "instant"
|
||||||
version = "0.1.12"
|
version = "0.1.12"
|
||||||
|
@ -1146,9 +1145,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "js-sys"
|
name = "js-sys"
|
||||||
version = "0.3.59"
|
version = "0.3.60"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2"
|
checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
@ -1167,9 +1166,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lebe"
|
name = "lebe"
|
||||||
version = "0.5.1"
|
version = "0.5.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7efd1d698db0759e6ef11a7cd44407407399a910c774dd804c64c032da7826ff"
|
checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
|
@ -1272,6 +1271,15 @@ dependencies = [
|
||||||
"adler",
|
"adler",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "miniz_oxide"
|
||||||
|
version = "0.6.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
|
||||||
|
dependencies = [
|
||||||
|
"adler",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mio"
|
name = "mio"
|
||||||
version = "0.8.4"
|
version = "0.8.4"
|
||||||
|
@ -1321,7 +1329,7 @@ dependencies = [
|
||||||
"jni-sys",
|
"jni-sys",
|
||||||
"ndk-sys",
|
"ndk-sys",
|
||||||
"num_enum",
|
"num_enum",
|
||||||
"raw-window-handle",
|
"raw-window-handle 0.5.0",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1732,7 +1740,7 @@ dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"crc32fast",
|
"crc32fast",
|
||||||
"deflate",
|
"deflate",
|
||||||
"miniz_oxide",
|
"miniz_oxide 0.5.3",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1947,6 +1955,15 @@ dependencies = [
|
||||||
"rand_core 0.3.1",
|
"rand_core 0.3.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "raw-window-handle"
|
||||||
|
version = "0.4.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41"
|
||||||
|
dependencies = [
|
||||||
|
"cty",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "raw-window-handle"
|
name = "raw-window-handle"
|
||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
|
@ -2020,9 +2037,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reqwest"
|
name = "reqwest"
|
||||||
version = "0.11.11"
|
version = "0.11.12"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92"
|
checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
@ -2036,10 +2053,10 @@ dependencies = [
|
||||||
"hyper-tls",
|
"hyper-tls",
|
||||||
"ipnet",
|
"ipnet",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"lazy_static",
|
|
||||||
"log",
|
"log",
|
||||||
"mime",
|
"mime",
|
||||||
"native-tls",
|
"native-tls",
|
||||||
|
"once_cell",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"serde",
|
"serde",
|
||||||
|
@ -2146,18 +2163,18 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.142"
|
version = "1.0.147"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e590c437916fb6b221e1d00df6e3294f3fccd70ca7e92541c475d6ed6ef5fee2"
|
checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.142"
|
version = "1.0.147"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "34b5b8d809babe02f538c2cfec6f2c1ed10804c0e5a6a041a049a4f5588ccc2e"
|
checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -2166,9 +2183,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.83"
|
version = "1.0.87"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7"
|
checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa",
|
"itoa",
|
||||||
"ryu",
|
"ryu",
|
||||||
|
@ -2706,9 +2723,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen"
|
name = "wasm-bindgen"
|
||||||
version = "0.2.82"
|
version = "0.2.83"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d"
|
checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"wasm-bindgen-macro",
|
"wasm-bindgen-macro",
|
||||||
|
@ -2716,9 +2733,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-backend"
|
name = "wasm-bindgen-backend"
|
||||||
version = "0.2.82"
|
version = "0.2.83"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f"
|
checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bumpalo",
|
"bumpalo",
|
||||||
"log",
|
"log",
|
||||||
|
@ -2743,9 +2760,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-macro"
|
name = "wasm-bindgen-macro"
|
||||||
version = "0.2.82"
|
version = "0.2.83"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602"
|
checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"wasm-bindgen-macro-support",
|
"wasm-bindgen-macro-support",
|
||||||
|
@ -2753,9 +2770,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-macro-support"
|
name = "wasm-bindgen-macro-support"
|
||||||
version = "0.2.82"
|
version = "0.2.83"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da"
|
checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -2766,9 +2783,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-shared"
|
name = "wasm-bindgen-shared"
|
||||||
version = "0.2.82"
|
version = "0.2.83"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a"
|
checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wayland-client"
|
name = "wayland-client"
|
||||||
|
@ -2855,9 +2872,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "web-sys"
|
name = "web-sys"
|
||||||
version = "0.3.59"
|
version = "0.3.60"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1"
|
checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
|
@ -2936,9 +2953,9 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winit"
|
name = "winit"
|
||||||
version = "0.27.1"
|
version = "0.27.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b9b91360f15eb89d0bfee05d3c5981408320fe709f84953d3d90b276fc5962c7"
|
checksum = "37f64802920c4c35d12a53dad5e0c55bbc3004d8dc4f2e4dd64ad02c5665d7aa"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"cocoa",
|
"cocoa",
|
||||||
|
@ -2955,7 +2972,8 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"raw-window-handle",
|
"raw-window-handle 0.4.3",
|
||||||
|
"raw-window-handle 0.5.0",
|
||||||
"sctk-adwaita",
|
"sctk-adwaita",
|
||||||
"smithay-client-toolkit",
|
"smithay-client-toolkit",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
|
@ -3032,9 +3050,9 @@ checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zip"
|
name = "zip"
|
||||||
version = "0.6.2"
|
version = "0.6.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bf225bcf73bb52cbb496e70475c7bd7a3f769df699c0020f6c7bd9a96dcf0b8d"
|
checksum = "537ce7411d25e54e8ae21a7ce0b15840e7bfcff15b51d697ec3266cc76bdf080"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"crc32fast",
|
"crc32fast",
|
||||||
|
|
20
Cargo.toml
20
Cargo.toml
|
@ -3,7 +3,7 @@ name = "stevenarella"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = [ "Thinkofdeath <thinkofdeath@spigotmc.org>", "iceiix <ice_ix@protonmail.ch>" ]
|
authors = [ "Thinkofdeath <thinkofdeath@spigotmc.org>", "iceiix <ice_ix@protonmail.ch>" ]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.58.1"
|
rust-version = "1.64.0"
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
description = "Multi-protocol multi-platform Minecraft-compatible client"
|
description = "Multi-protocol multi-platform Minecraft-compatible client"
|
||||||
repository = "https://github.com/iceiix/stevenarella"
|
repository = "https://github.com/iceiix/stevenarella"
|
||||||
|
@ -29,16 +29,16 @@ opt-level = 1
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
wasm-bindgen = "0.2.81"
|
wasm-bindgen = "0.2.83"
|
||||||
winit = "0.27.0"
|
winit = "0.27.4"
|
||||||
glow = "0.11.2"
|
glow = "0.11.2"
|
||||||
byteorder = "1.4.3"
|
byteorder = "1.4.3"
|
||||||
serde = "1.0.142"
|
serde = "1.0.147"
|
||||||
serde_json = "1.0.83"
|
serde_json = "1.0.87"
|
||||||
flate2 = { version = "1.0.24", features = ["rust_backend"], default-features = false }
|
flate2 = { version = "1.0.24", features = ["rust_backend"], default-features = false }
|
||||||
zip = { version = "0.6.2", features = ["deflate"], default-features = false }
|
zip = { version = "0.6.3", features = ["deflate"], default-features = false }
|
||||||
image = "0.24.3"
|
image = "0.24.4"
|
||||||
getrandom = { version = "0.2.7", features = ["js"] }
|
getrandom = { version = "0.2.8", features = ["js"] }
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
rand_pcg = "0.3.1"
|
rand_pcg = "0.3.1"
|
||||||
base64 = "0.13.0"
|
base64 = "0.13.0"
|
||||||
|
@ -54,12 +54,12 @@ dirs = "4.0.0"
|
||||||
# clippy = "*"
|
# clippy = "*"
|
||||||
|
|
||||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
reqwest = { version = "0.11.11", features = [ "blocking" ]}
|
reqwest = { version = "0.11.12", features = [ "blocking" ]}
|
||||||
glutin = "0.29.0"
|
glutin = "0.29.0"
|
||||||
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||||
console_error_panic_hook = "0.1.7"
|
console_error_panic_hook = "0.1.7"
|
||||||
web-sys = "0.3.59"
|
web-sys = "0.3.60"
|
||||||
|
|
||||||
[dependencies.steven_resources]
|
[dependencies.steven_resources]
|
||||||
path = "./resources"
|
path = "./resources"
|
||||||
|
|
|
@ -70,7 +70,7 @@ from [GitHub Actions](https://actions-badge.atrox.dev/iceiix/stevenarella/goto?r
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
Requires Rust stable version 1.58.1 or newer.
|
Requires Rust stable version 1.64.0 or newer.
|
||||||
|
|
||||||
**Debian/Ubuntu**
|
**Debian/Ubuntu**
|
||||||
|
|
||||||
|
|
1040
blocks/src/lib.rs
1040
blocks/src/lib.rs
File diff suppressed because it is too large
Load Diff
|
@ -5,8 +5,8 @@ authors = [ "Thinkofdeath <thinkofdeath@spigotmc.org>", "iceiix <ice_ix@protonma
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = "1.0.142"
|
serde = "1.0.147"
|
||||||
serde_json = "1.0.83"
|
serde_json = "1.0.87"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
sha-1 = "0.9.7"
|
sha-1 = "0.9.7"
|
||||||
aes = "0.7.4"
|
aes = "0.7.4"
|
||||||
|
@ -14,7 +14,7 @@ cfb8 = "0.7.1"
|
||||||
byteorder = "1.4.3"
|
byteorder = "1.4.3"
|
||||||
log = { version = "0.4.17", features = ["std"] }
|
log = { version = "0.4.17", features = ["std"] }
|
||||||
flate2 = { version = "1.0.24", features = ["rust_backend"], default-features = false }
|
flate2 = { version = "1.0.24", features = ["rust_backend"], default-features = false }
|
||||||
num-traits = "0.2.14"
|
num-traits = "0.2.15"
|
||||||
instant = "0.1.12"
|
instant = "0.1.12"
|
||||||
|
|
||||||
[dependencies.steven_shared]
|
[dependencies.steven_shared]
|
||||||
|
@ -26,4 +26,4 @@ path = "../std_or_web"
|
||||||
version = "0"
|
version = "0"
|
||||||
|
|
||||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
reqwest = { version = "0.11.11", features = [ "blocking" ]}
|
reqwest = { version = "0.11.12", features = [ "blocking" ]}
|
||||||
|
|
|
@ -948,19 +948,36 @@ impl fmt::Debug for VarLong {
|
||||||
impl Serializable for Position {
|
impl Serializable for Position {
|
||||||
fn read_from<R: io::Read>(buf: &mut R) -> Result<Position, Error> {
|
fn read_from<R: io::Read>(buf: &mut R) -> Result<Position, Error> {
|
||||||
let pos = buf.read_u64::<BigEndian>()?;
|
let pos = buf.read_u64::<BigEndian>()?;
|
||||||
Ok(Position::new(
|
let protocol_version = current_protocol_version();
|
||||||
((pos as i64) >> 38) as i32,
|
if protocol_version < 477 {
|
||||||
((pos as i64) & 0xFFF) as i32,
|
Ok(Position::new(
|
||||||
((pos as i64) << 26 >> 38) as i32,
|
((pos as i64) >> 38) as i32,
|
||||||
))
|
(((pos as i64) >> 26) & 0xFFF) as i32,
|
||||||
|
((pos as i64) << 38 >> 38) as i32,
|
||||||
|
))
|
||||||
|
} else {
|
||||||
|
Ok(Position::new(
|
||||||
|
((pos as i64) >> 38) as i32,
|
||||||
|
((pos as i64) << 52 >> 52) as i32,
|
||||||
|
((pos as i64) << 26 >> 38) as i32,
|
||||||
|
))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fn write_to<W: io::Write>(&self, buf: &mut W) -> Result<(), Error> {
|
fn write_to<W: io::Write>(&self, buf: &mut W) -> Result<(), Error> {
|
||||||
let pos = (((self.x as u64) & 0x3FFFFFF) << 38)
|
let pos;
|
||||||
| ((self.y as u64) & 0xFFF)
|
let protocol_version = current_protocol_version();
|
||||||
| (((self.z as u64) & 0x3FFFFFF) << 12);
|
if protocol_version < 477 {
|
||||||
|
pos = (((self.x as u64) & 0x3FFFFFF) << 38)
|
||||||
|
| (((self.y as u64) & 0xFFF) << 26)
|
||||||
|
| ((self.z as u64) & 0x3FFFFFF);
|
||||||
|
} else {
|
||||||
|
pos = (((self.x as u64) & 0x3FFFFFF) << 38)
|
||||||
|
| ((self.y as u64) & 0xFFF)
|
||||||
|
| (((self.z as u64) & 0x3FFFFFF) << 12);
|
||||||
|
}
|
||||||
|
|
||||||
buf.write_u64::<BigEndian>(pos)?;
|
buf.write_u64::<BigEndian>(pos)?;
|
||||||
Result::Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"config:base",
|
||||||
|
"schedule:monthly"
|
||||||
|
]
|
||||||
|
}
|
|
@ -135,7 +135,7 @@ impl Var for CVar<String> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn deserialize(&self, input: &str) -> Box<dyn Any> {
|
fn deserialize(&self, input: &str) -> Box<dyn Any> {
|
||||||
Box::new((&input[1..input.len() - 1]).to_owned())
|
Box::new(input[1..input.len() - 1].to_owned())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn description(&self) -> &'static str {
|
fn description(&self) -> &'static str {
|
||||||
|
@ -370,7 +370,7 @@ impl Console {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut file = &record.file().unwrap_or("").replace("\\", "/")[..];
|
let mut file = &record.file().unwrap_or("").replace('\\', "/")[..];
|
||||||
if let Some(pos) = file.rfind("src/") {
|
if let Some(pos) = file.rfind("src/") {
|
||||||
file = &file[pos + 4..];
|
file = &file[pos + 4..];
|
||||||
}
|
}
|
||||||
|
|
|
@ -603,7 +603,7 @@ impl ComponentMem {
|
||||||
drop_func: Box::new(|data| unsafe {
|
drop_func: Box::new(|data| unsafe {
|
||||||
let mut val = mem::MaybeUninit::<T>::uninit();
|
let mut val = mem::MaybeUninit::<T>::uninit();
|
||||||
ptr::copy(data as *mut T, val.as_mut_ptr(), 1);
|
ptr::copy(data as *mut T, val.as_mut_ptr(), 1);
|
||||||
mem::drop(val);
|
val.assume_init_drop();
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
use steven_blocks as block;
|
||||||
|
use steven_protocol::protocol::packet;
|
||||||
pub mod block_entity;
|
pub mod block_entity;
|
||||||
pub mod player;
|
pub mod player;
|
||||||
|
|
||||||
|
@ -23,6 +25,8 @@ pub fn add_systems(m: &mut ecs::Manager) {
|
||||||
m.add_render_system(sys);
|
m.add_render_system(sys);
|
||||||
let sys = systems::LightEntity::new(m);
|
let sys = systems::LightEntity::new(m);
|
||||||
m.add_render_system(sys);
|
m.add_render_system(sys);
|
||||||
|
let sys = systems::ApplyDigging::new(m);
|
||||||
|
m.add_render_system(sys);
|
||||||
|
|
||||||
block_entity::add_systems(m);
|
block_entity::add_systems(m);
|
||||||
}
|
}
|
||||||
|
@ -161,3 +165,36 @@ impl Light {
|
||||||
Default::default()
|
Default::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
|
pub struct DiggingState {
|
||||||
|
pub block: block::Block,
|
||||||
|
pub position: shared::Position,
|
||||||
|
pub face: shared::Direction,
|
||||||
|
pub start: std::time::Instant,
|
||||||
|
pub finished: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
|
pub struct Digging {
|
||||||
|
pub last: Option<DiggingState>,
|
||||||
|
pub current: Option<DiggingState>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Digging {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Default::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
|
pub struct MouseButtons {
|
||||||
|
pub left: bool,
|
||||||
|
pub right: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl MouseButtons {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Default::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
use super::{
|
use super::{
|
||||||
Bounds, GameInfo, Gravity, Light, Position, Rotation, TargetPosition, TargetRotation, Velocity,
|
Bounds, Digging, GameInfo, Gravity, Light, MouseButtons, Position, Rotation, TargetPosition,
|
||||||
|
TargetRotation, Velocity,
|
||||||
};
|
};
|
||||||
use crate::ecs;
|
use crate::ecs;
|
||||||
use crate::format;
|
use crate::format;
|
||||||
|
@ -43,6 +44,8 @@ pub fn create_local(m: &mut ecs::Manager) -> ecs::Entity {
|
||||||
);
|
);
|
||||||
m.add_component_direct(entity, PlayerModel::new("", false, false, true));
|
m.add_component_direct(entity, PlayerModel::new("", false, false, true));
|
||||||
m.add_component_direct(entity, Light::new());
|
m.add_component_direct(entity, Light::new());
|
||||||
|
m.add_component_direct(entity, Digging::new());
|
||||||
|
m.add_component_direct(entity, MouseButtons::new());
|
||||||
entity
|
entity
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
|
use std::sync::Arc;
|
||||||
|
use std::sync::RwLock;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::ecs;
|
use crate::ecs;
|
||||||
use crate::render;
|
use crate::render;
|
||||||
use crate::shared::Position as BPos;
|
use crate::shared::Position as BPos;
|
||||||
use crate::world;
|
use crate::world;
|
||||||
use cgmath::InnerSpace;
|
use cgmath::InnerSpace;
|
||||||
|
use log::debug;
|
||||||
|
use steven_protocol::protocol;
|
||||||
|
use steven_protocol::protocol::Conn;
|
||||||
|
|
||||||
pub struct ApplyVelocity {
|
pub struct ApplyVelocity {
|
||||||
filter: ecs::Filter,
|
filter: ecs::Filter,
|
||||||
|
@ -285,3 +291,186 @@ impl ecs::System for LightEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub struct ApplyDigging {
|
||||||
|
filter: ecs::Filter,
|
||||||
|
mouse_buttons: ecs::Key<MouseButtons>,
|
||||||
|
digging: ecs::Key<Digging>,
|
||||||
|
conn: ecs::Key<Arc<RwLock<Option<Conn>>>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ApplyDigging {
|
||||||
|
pub fn new(m: &mut ecs::Manager) -> Self {
|
||||||
|
let mouse_buttons = m.get_key();
|
||||||
|
let digging = m.get_key();
|
||||||
|
Self {
|
||||||
|
filter: ecs::Filter::new().with(mouse_buttons).with(digging),
|
||||||
|
mouse_buttons,
|
||||||
|
digging,
|
||||||
|
conn: m.get_key(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn send_packet(&self, conn: &mut Conn, target: &DiggingState, state: i32) {
|
||||||
|
match state {
|
||||||
|
0 => debug!("Send start dig packet {:?}", target),
|
||||||
|
1 => debug!("Send cancel dig packet {:?}", target),
|
||||||
|
2 => debug!("Send finish dig packet {:?}", target),
|
||||||
|
n => panic!("Invalid dig state {}", n),
|
||||||
|
}
|
||||||
|
|
||||||
|
match conn.protocol_version {
|
||||||
|
// 1.7.10
|
||||||
|
5 => conn
|
||||||
|
.write_packet(packet::play::serverbound::PlayerDigging_u8_u8y {
|
||||||
|
status: state as u8,
|
||||||
|
x: target.position.x,
|
||||||
|
y: target.position.y as u8,
|
||||||
|
z: target.position.z,
|
||||||
|
face: target.face.index() as u8,
|
||||||
|
})
|
||||||
|
.unwrap(),
|
||||||
|
// 1.8.9 or v15w39c
|
||||||
|
47 | 74 => conn
|
||||||
|
.write_packet(packet::play::serverbound::PlayerDigging_u8 {
|
||||||
|
status: state as u8,
|
||||||
|
location: target.position,
|
||||||
|
face: target.face.index() as u8,
|
||||||
|
})
|
||||||
|
.unwrap(),
|
||||||
|
// 1.9+
|
||||||
|
_ => conn
|
||||||
|
.write_packet(packet::play::serverbound::PlayerDigging {
|
||||||
|
status: protocol::VarInt(state),
|
||||||
|
location: target.position,
|
||||||
|
face: target.face.index() as u8,
|
||||||
|
})
|
||||||
|
.unwrap(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn next_state(
|
||||||
|
&self,
|
||||||
|
last: &Option<DiggingState>,
|
||||||
|
mouse_buttons: &MouseButtons,
|
||||||
|
target: Option<(
|
||||||
|
shared::Position,
|
||||||
|
block::Block,
|
||||||
|
shared::Direction,
|
||||||
|
Vector3<f64>,
|
||||||
|
)>,
|
||||||
|
) -> Option<DiggingState> {
|
||||||
|
// Figure out the next state
|
||||||
|
if !mouse_buttons.left {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
|
||||||
|
match (last, target) {
|
||||||
|
// Started digging
|
||||||
|
(None, Some((position, block, face, _))) => Some(DiggingState {
|
||||||
|
block,
|
||||||
|
face,
|
||||||
|
position,
|
||||||
|
start: std::time::Instant::now(),
|
||||||
|
finished: false,
|
||||||
|
}),
|
||||||
|
(Some(current), Some((position, block, face, _))) => {
|
||||||
|
// Continue digging
|
||||||
|
if position == current.position {
|
||||||
|
return last.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start digging a different block.
|
||||||
|
Some(DiggingState {
|
||||||
|
block,
|
||||||
|
face,
|
||||||
|
position,
|
||||||
|
start: std::time::Instant::now(),
|
||||||
|
finished: false,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// Not pointing at any target
|
||||||
|
(_, None) => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn is_finished(&self, state: &DiggingState) -> bool {
|
||||||
|
let mining_time = state.block.get_mining_time(&None);
|
||||||
|
match mining_time {
|
||||||
|
Some(mining_time) => {
|
||||||
|
let finish_time = state.start + mining_time;
|
||||||
|
finish_time > std::time::Instant::now()
|
||||||
|
}
|
||||||
|
None => false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ecs::System for ApplyDigging {
|
||||||
|
fn filter(&self) -> &ecs::Filter {
|
||||||
|
&self.filter
|
||||||
|
}
|
||||||
|
|
||||||
|
fn update(
|
||||||
|
&mut self,
|
||||||
|
m: &mut ecs::Manager,
|
||||||
|
world: &mut world::World,
|
||||||
|
renderer: &mut render::Renderer,
|
||||||
|
) {
|
||||||
|
use crate::server::target::{test_block, trace_ray};
|
||||||
|
use cgmath::EuclideanSpace;
|
||||||
|
|
||||||
|
let world_entity = m.get_world();
|
||||||
|
let mut conn = m
|
||||||
|
.get_component(world_entity, self.conn)
|
||||||
|
.unwrap()
|
||||||
|
.write()
|
||||||
|
.unwrap();
|
||||||
|
let conn = match conn.as_mut() {
|
||||||
|
Some(conn) => conn,
|
||||||
|
// Don't keep processing digging operations if the connection was
|
||||||
|
// closed.
|
||||||
|
None => return,
|
||||||
|
};
|
||||||
|
|
||||||
|
let target = trace_ray(
|
||||||
|
world,
|
||||||
|
4.0,
|
||||||
|
renderer.camera.pos.to_vec(),
|
||||||
|
renderer.view_vector.cast().unwrap(),
|
||||||
|
test_block,
|
||||||
|
);
|
||||||
|
|
||||||
|
for e in m.find(&self.filter) {
|
||||||
|
let mouse_buttons = m.get_component(e, self.mouse_buttons).unwrap();
|
||||||
|
let digging = m.get_component_mut(e, self.digging).unwrap();
|
||||||
|
|
||||||
|
// Update last and current state
|
||||||
|
std::mem::swap(&mut digging.last, &mut digging.current);
|
||||||
|
digging.current = self.next_state(&digging.last, mouse_buttons, target);
|
||||||
|
|
||||||
|
// Handle digging packets
|
||||||
|
match (&digging.last, &mut digging.current) {
|
||||||
|
// Start the new digging operation.
|
||||||
|
(None, Some(current)) => self.send_packet(conn, current, 0),
|
||||||
|
// Cancel the previous digging operation.
|
||||||
|
(Some(last), None) if !last.finished => self.send_packet(conn, last, 1),
|
||||||
|
// Move to digging a new block
|
||||||
|
(Some(last), Some(current)) if last.position != current.position => {
|
||||||
|
// Cancel the previous digging operation.
|
||||||
|
if !current.finished {
|
||||||
|
self.send_packet(conn, last, 1);
|
||||||
|
}
|
||||||
|
// Start the new digging operation.
|
||||||
|
self.send_packet(conn, current, 0);
|
||||||
|
}
|
||||||
|
// Finish the new digging operation.
|
||||||
|
(Some(_), Some(current)) if !self.is_finished(current) && !current.finished => {
|
||||||
|
self.send_packet(conn, current, 2);
|
||||||
|
current.finished = true;
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
36
src/main.rs
36
src/main.rs
|
@ -369,8 +369,7 @@ fn main2() {
|
||||||
|
|
||||||
let textures = renderer.get_textures();
|
let textures = renderer.get_textures();
|
||||||
let default_protocol_version = protocol::versions::protocol_name_to_protocol_version(
|
let default_protocol_version = protocol::versions::protocol_name_to_protocol_version(
|
||||||
opt.default_protocol_version
|
opt.default_protocol_version.unwrap_or_default(),
|
||||||
.unwrap_or_else(|| "".to_string()),
|
|
||||||
);
|
);
|
||||||
let mut game = Game {
|
let mut game = Game {
|
||||||
server: server::Server::dummy_server(resource_manager.clone()),
|
server: server::Server::dummy_server(resource_manager.clone()),
|
||||||
|
@ -630,6 +629,11 @@ fn handle_window_event<T>(
|
||||||
event: winit::event::Event<T>,
|
event: winit::event::Event<T>,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
use winit::event::*;
|
use winit::event::*;
|
||||||
|
let cursor_grab_mode = if cfg!(target_os = "macos") {
|
||||||
|
winit::window::CursorGrabMode::Locked
|
||||||
|
} else {
|
||||||
|
winit::window::CursorGrabMode::Confined
|
||||||
|
};
|
||||||
match event {
|
match event {
|
||||||
Event::MainEventsCleared => return true,
|
Event::MainEventsCleared => return true,
|
||||||
Event::DeviceEvent {
|
Event::DeviceEvent {
|
||||||
|
@ -659,9 +663,7 @@ fn handle_window_event<T>(
|
||||||
use std::f64::consts::PI;
|
use std::f64::consts::PI;
|
||||||
|
|
||||||
if game.focused {
|
if game.focused {
|
||||||
window
|
window.set_cursor_grab(cursor_grab_mode).unwrap();
|
||||||
.set_cursor_grab(winit::window::CursorGrabMode::Locked)
|
|
||||||
.unwrap();
|
|
||||||
window.set_cursor_visible(false);
|
window.set_cursor_visible(false);
|
||||||
if let Some(player) = game.server.player {
|
if let Some(player) = game.server.player {
|
||||||
let rotation = game
|
let rotation = game
|
||||||
|
@ -719,9 +721,7 @@ fn handle_window_event<T>(
|
||||||
&& !game.screen_sys.is_current_closable()
|
&& !game.screen_sys.is_current_closable()
|
||||||
{
|
{
|
||||||
game.focused = true;
|
game.focused = true;
|
||||||
window
|
window.set_cursor_grab(cursor_grab_mode).unwrap();
|
||||||
.set_cursor_grab(winit::window::CursorGrabMode::Locked)
|
|
||||||
.unwrap();
|
|
||||||
window.set_cursor_visible(false);
|
window.set_cursor_visible(false);
|
||||||
} else if !game.focused {
|
} else if !game.focused {
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
|
@ -738,9 +738,25 @@ fn handle_window_event<T>(
|
||||||
height,
|
height,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if game.focused {
|
||||||
|
game.server.on_left_mouse_button(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
(ElementState::Pressed, MouseButton::Left) => {
|
||||||
|
if game.focused {
|
||||||
|
game.server.on_left_mouse_button(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
(ElementState::Released, MouseButton::Right) => {
|
||||||
|
if game.focused {
|
||||||
|
game.server.on_right_mouse_button(false);
|
||||||
|
game.server.on_right_click(&mut game.renderer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
(ElementState::Pressed, MouseButton::Right) => {
|
(ElementState::Pressed, MouseButton::Right) => {
|
||||||
if game.focused {
|
if game.focused {
|
||||||
|
game.server.on_right_mouse_button(true);
|
||||||
game.server.on_right_click(&mut game.renderer);
|
game.server.on_right_click(&mut game.renderer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -783,9 +799,7 @@ fn handle_window_event<T>(
|
||||||
screen::SettingsMenu::new(game.vars.clone(), true),
|
screen::SettingsMenu::new(game.vars.clone(), true),
|
||||||
));
|
));
|
||||||
} else if game.screen_sys.is_current_closable() {
|
} else if game.screen_sys.is_current_closable() {
|
||||||
window
|
window.set_cursor_grab(cursor_grab_mode).unwrap();
|
||||||
.set_cursor_grab(winit::window::CursorGrabMode::Locked)
|
|
||||||
.unwrap();
|
|
||||||
window.set_cursor_visible(false);
|
window.set_cursor_visible(false);
|
||||||
game.focused = true;
|
game.focused = true;
|
||||||
game.screen_sys.pop_screen();
|
game.screen_sys.pop_screen();
|
||||||
|
|
|
@ -42,7 +42,7 @@ pub mod target;
|
||||||
|
|
||||||
pub struct Server {
|
pub struct Server {
|
||||||
uuid: protocol::UUID,
|
uuid: protocol::UUID,
|
||||||
conn: Option<protocol::Conn>,
|
conn: Arc<RwLock<Option<protocol::Conn>>>,
|
||||||
protocol_version: i32,
|
protocol_version: i32,
|
||||||
forge_mods: Vec<forge::ForgeMod>,
|
forge_mods: Vec<forge::ForgeMod>,
|
||||||
read_queue: Option<mpsc::Receiver<Result<packet::Packet, protocol::Error>>>,
|
read_queue: Option<mpsc::Receiver<Result<packet::Packet, protocol::Error>>>,
|
||||||
|
@ -62,6 +62,7 @@ pub struct Server {
|
||||||
// Entity accessors
|
// Entity accessors
|
||||||
game_info: ecs::Key<entity::GameInfo>,
|
game_info: ecs::Key<entity::GameInfo>,
|
||||||
player_movement: ecs::Key<entity::player::PlayerMovement>,
|
player_movement: ecs::Key<entity::player::PlayerMovement>,
|
||||||
|
mouse_buttons: ecs::Key<entity::MouseButtons>,
|
||||||
gravity: ecs::Key<entity::Gravity>,
|
gravity: ecs::Key<entity::Gravity>,
|
||||||
position: ecs::Key<entity::Position>,
|
position: ecs::Key<entity::Position>,
|
||||||
target_position: ecs::Key<entity::TargetPosition>,
|
target_position: ecs::Key<entity::TargetPosition>,
|
||||||
|
@ -179,7 +180,7 @@ impl Server {
|
||||||
forge_mods,
|
forge_mods,
|
||||||
protocol::UUID::from_str(&val.uuid).unwrap(),
|
protocol::UUID::from_str(&val.uuid).unwrap(),
|
||||||
resources,
|
resources,
|
||||||
Some(write),
|
Arc::new(RwLock::new(Some(write))),
|
||||||
Some(rx),
|
Some(rx),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -196,7 +197,7 @@ impl Server {
|
||||||
forge_mods,
|
forge_mods,
|
||||||
val.uuid,
|
val.uuid,
|
||||||
resources,
|
resources,
|
||||||
Some(write),
|
Arc::new(RwLock::new(Some(write))),
|
||||||
Some(rx),
|
Some(rx),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -216,7 +217,7 @@ impl Server {
|
||||||
forge_mods,
|
forge_mods,
|
||||||
val.uuid,
|
val.uuid,
|
||||||
resources,
|
resources,
|
||||||
Some(write),
|
Arc::new(RwLock::new(Some(write))),
|
||||||
Some(rx),
|
Some(rx),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -380,7 +381,7 @@ impl Server {
|
||||||
forge_mods,
|
forge_mods,
|
||||||
uuid,
|
uuid,
|
||||||
resources,
|
resources,
|
||||||
Some(write),
|
Arc::new(RwLock::new(Some(write))),
|
||||||
Some(rx),
|
Some(rx),
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
@ -408,7 +409,7 @@ impl Server {
|
||||||
vec![],
|
vec![],
|
||||||
protocol::UUID::default(),
|
protocol::UUID::default(),
|
||||||
resources,
|
resources,
|
||||||
None,
|
Arc::new(RwLock::new(None)),
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::thread_rng();
|
||||||
|
@ -496,7 +497,7 @@ impl Server {
|
||||||
forge_mods: Vec<forge::ForgeMod>,
|
forge_mods: Vec<forge::ForgeMod>,
|
||||||
uuid: protocol::UUID,
|
uuid: protocol::UUID,
|
||||||
resources: Arc<RwLock<resources::Manager>>,
|
resources: Arc<RwLock<resources::Manager>>,
|
||||||
conn: Option<protocol::Conn>,
|
conn: Arc<RwLock<Option<protocol::Conn>>>,
|
||||||
read_queue: Option<mpsc::Receiver<Result<packet::Packet, protocol::Error>>>,
|
read_queue: Option<mpsc::Receiver<Result<packet::Packet, protocol::Error>>>,
|
||||||
) -> Server {
|
) -> Server {
|
||||||
let mut entities = ecs::Manager::new();
|
let mut entities = ecs::Manager::new();
|
||||||
|
@ -505,6 +506,7 @@ impl Server {
|
||||||
let world_entity = entities.get_world();
|
let world_entity = entities.get_world();
|
||||||
let game_info = entities.get_key();
|
let game_info = entities.get_key();
|
||||||
entities.add_component(world_entity, game_info, entity::GameInfo::new());
|
entities.add_component(world_entity, game_info, entity::GameInfo::new());
|
||||||
|
entities.add_component(world_entity, entities.get_key(), conn.clone());
|
||||||
|
|
||||||
let version = resources.read().unwrap().version();
|
let version = resources.read().unwrap().version();
|
||||||
Server {
|
Server {
|
||||||
|
@ -528,6 +530,7 @@ impl Server {
|
||||||
// Entity accessors
|
// Entity accessors
|
||||||
game_info,
|
game_info,
|
||||||
player_movement: entities.get_key(),
|
player_movement: entities.get_key(),
|
||||||
|
mouse_buttons: entities.get_key(),
|
||||||
gravity: entities.get_key(),
|
gravity: entities.get_key(),
|
||||||
position: entities.get_key(),
|
position: entities.get_key(),
|
||||||
target_position: entities.get_key(),
|
target_position: entities.get_key(),
|
||||||
|
@ -551,7 +554,7 @@ impl Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn disconnect(&mut self, reason: Option<format::Component>) {
|
pub fn disconnect(&mut self, reason: Option<format::Component>) {
|
||||||
self.conn = None;
|
self.conn.write().unwrap().take();
|
||||||
self.disconnect_reason = reason;
|
self.disconnect_reason = reason;
|
||||||
if let Some(player) = self.player.take() {
|
if let Some(player) = self.player.take() {
|
||||||
self.entities.remove_entity(player);
|
self.entities.remove_entity(player);
|
||||||
|
@ -560,7 +563,7 @@ impl Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_connected(&self) -> bool {
|
pub fn is_connected(&self) -> bool {
|
||||||
self.conn.is_some()
|
self.conn.read().unwrap().is_some()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn tick(&mut self, renderer: &mut render::Renderer, delta: f64) {
|
pub fn tick(&mut self, renderer: &mut render::Renderer, delta: f64) {
|
||||||
|
@ -676,6 +679,7 @@ impl Server {
|
||||||
UpdateBlockEntity_VarInt => on_block_entity_update_varint,
|
UpdateBlockEntity_VarInt => on_block_entity_update_varint,
|
||||||
UpdateBlockEntity_u8 => on_block_entity_update_u8,
|
UpdateBlockEntity_u8 => on_block_entity_update_u8,
|
||||||
UpdateBlockEntity_Data => on_block_entity_update_data,
|
UpdateBlockEntity_Data => on_block_entity_update_data,
|
||||||
|
UpdateLight_Arrays => on_update_light_arrays,
|
||||||
UpdateSign => on_sign_update,
|
UpdateSign => on_sign_update,
|
||||||
UpdateSign_u16 => on_sign_update_u16,
|
UpdateSign_u16 => on_sign_update_u16,
|
||||||
PlayerInfo => on_player_info,
|
PlayerInfo => on_player_info,
|
||||||
|
@ -709,12 +713,12 @@ impl Server {
|
||||||
Err(err) => panic!("Err: {:?}", err),
|
Err(err) => panic!("Err: {:?}", err),
|
||||||
}
|
}
|
||||||
// Disconnected
|
// Disconnected
|
||||||
if self.conn.is_none() {
|
if self.conn.read().unwrap().is_none() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.conn.is_some() {
|
if self.conn.read().unwrap().is_some() {
|
||||||
self.read_queue = Some(rx);
|
self.read_queue = Some(rx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -846,6 +850,24 @@ impl Server {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn on_left_mouse_button(&mut self, pressed: bool) {
|
||||||
|
if let Some(player) = self.player {
|
||||||
|
if let Some(mouse_buttons) = self.entities.get_component_mut(player, self.mouse_buttons)
|
||||||
|
{
|
||||||
|
mouse_buttons.left = pressed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn on_right_mouse_button(&mut self, pressed: bool) {
|
||||||
|
if let Some(player) = self.player {
|
||||||
|
if let Some(mouse_buttons) = self.entities.get_component_mut(player, self.mouse_buttons)
|
||||||
|
{
|
||||||
|
mouse_buttons.right = pressed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn on_right_click(&mut self, renderer: &mut render::Renderer) {
|
pub fn on_right_click(&mut self, renderer: &mut render::Renderer) {
|
||||||
use crate::shared::Direction;
|
use crate::shared::Direction;
|
||||||
if self.player.is_some() {
|
if self.player.is_some() {
|
||||||
|
@ -953,8 +975,9 @@ impl Server {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn write_packet<T: protocol::PacketType>(&mut self, p: T) {
|
pub fn write_packet<T: protocol::PacketType>(&self, p: T) {
|
||||||
let _ = self.conn.as_mut().unwrap().write_packet(p); // TODO handle errors
|
let mut conn = self.conn.write().unwrap();
|
||||||
|
let _ = conn.as_mut().unwrap().write_packet(p); // TODO handle errors
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_keep_alive_i64(
|
fn on_keep_alive_i64(
|
||||||
|
@ -1101,15 +1124,13 @@ impl Server {
|
||||||
|
|
||||||
// TODO: remove wrappers and directly call on Conn
|
// TODO: remove wrappers and directly call on Conn
|
||||||
fn write_fmlhs_plugin_message(&mut self, msg: &forge::FmlHs) {
|
fn write_fmlhs_plugin_message(&mut self, msg: &forge::FmlHs) {
|
||||||
let _ = self.conn.as_mut().unwrap().write_fmlhs_plugin_message(msg); // TODO handle errors
|
let mut conn = self.conn.write().unwrap();
|
||||||
|
let _ = conn.as_mut().unwrap().write_fmlhs_plugin_message(msg); // TODO handle errors
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_plugin_message(&mut self, channel: &str, data: &[u8]) {
|
fn write_plugin_message(&mut self, channel: &str, data: &[u8]) {
|
||||||
let _ = self
|
let mut conn = self.conn.write().unwrap();
|
||||||
.conn
|
let _ = conn.as_mut().unwrap().write_plugin_message(channel, data); // TODO handle errors
|
||||||
.as_mut()
|
|
||||||
.unwrap()
|
|
||||||
.write_plugin_message(channel, data); // TODO handle errors
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_game_join_worldnames_ishard_simdist_hasdeath(
|
fn on_game_join_worldnames_ishard_simdist_hasdeath(
|
||||||
|
@ -2055,13 +2076,12 @@ impl Server {
|
||||||
let z = block_entity.1.get("z").unwrap().as_int().unwrap();
|
let z = block_entity.1.get("z").unwrap().as_int().unwrap();
|
||||||
if let Some(tile_id) = block_entity.1.get("id") {
|
if let Some(tile_id) = block_entity.1.get("id") {
|
||||||
let tile_id = tile_id.as_str().unwrap();
|
let tile_id = tile_id.as_str().unwrap();
|
||||||
let action;
|
let action = match tile_id {
|
||||||
match tile_id {
|
|
||||||
// Fake a sign update
|
// Fake a sign update
|
||||||
"Sign" => action = 9,
|
"Sign" => 9,
|
||||||
// Not something we care about, so break the loop
|
// Not something we care about, so break the loop
|
||||||
_ => continue,
|
_ => continue,
|
||||||
}
|
};
|
||||||
self.on_block_entity_update_u8(packet::play::clientbound::UpdateBlockEntity_u8 {
|
self.on_block_entity_update_u8(packet::play::clientbound::UpdateBlockEntity_u8 {
|
||||||
location: Position::new(x, y, z),
|
location: Position::new(x, y, z),
|
||||||
action,
|
action,
|
||||||
|
@ -2081,17 +2101,48 @@ impl Server {
|
||||||
chunk_data: packet::play::clientbound::ChunkData_AndLight,
|
chunk_data: packet::play::clientbound::ChunkData_AndLight,
|
||||||
) {
|
) {
|
||||||
self.world
|
self.world
|
||||||
.load_chunk117(
|
.load_chunk118(
|
||||||
chunk_data.chunk_x,
|
chunk_data.chunk_x,
|
||||||
chunk_data.chunk_z,
|
chunk_data.chunk_z,
|
||||||
true,
|
true,
|
||||||
0xffff, // world height/16 (256/16 = 16) bits
|
|
||||||
16, // TODO: get all bitmasks
|
|
||||||
chunk_data.data.data,
|
chunk_data.data.data,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
//self.load_block_entities(chunk_data.block_entities.data); // TODO: load entities
|
//self.load_block_entities(chunk_data.block_entities.data); // TODO: load entities
|
||||||
// TODO: update light
|
|
||||||
|
// Set block light data
|
||||||
|
self.world.set_light_data(
|
||||||
|
chunk_data.chunk_x,
|
||||||
|
chunk_data.chunk_z,
|
||||||
|
world::LightType::Block,
|
||||||
|
chunk_data.block_light_mask.data,
|
||||||
|
chunk_data.block_light_arrays.data,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Set sky light data
|
||||||
|
self.world.set_light_data(
|
||||||
|
chunk_data.chunk_x,
|
||||||
|
chunk_data.chunk_z,
|
||||||
|
world::LightType::Sky,
|
||||||
|
chunk_data.sky_light_mask.data,
|
||||||
|
chunk_data.sky_light_arrays.data,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Clear block light data
|
||||||
|
self.world.clear_light_data(
|
||||||
|
chunk_data.chunk_x,
|
||||||
|
chunk_data.chunk_z,
|
||||||
|
world::LightType::Block,
|
||||||
|
chunk_data.empty_block_light_mask.data,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Clear sky light data
|
||||||
|
self.world.clear_light_data(
|
||||||
|
chunk_data.chunk_x,
|
||||||
|
chunk_data.chunk_z,
|
||||||
|
world::LightType::Sky,
|
||||||
|
chunk_data.empty_sky_light_mask.data,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_chunk_data_biomes3d_bitmasks(
|
fn on_chunk_data_biomes3d_bitmasks(
|
||||||
|
@ -2104,7 +2155,6 @@ impl Server {
|
||||||
chunk_data.chunk_z,
|
chunk_data.chunk_z,
|
||||||
true,
|
true,
|
||||||
chunk_data.bitmasks.data[0] as u64, // TODO: get all bitmasks
|
chunk_data.bitmasks.data[0] as u64, // TODO: get all bitmasks
|
||||||
16, // TODO: get all bitmasks
|
|
||||||
chunk_data.data.data,
|
chunk_data.data.data,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
@ -2352,6 +2402,45 @@ impl Server {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn on_update_light_arrays(
|
||||||
|
&mut self,
|
||||||
|
light_update: packet::play::clientbound::UpdateLight_Arrays,
|
||||||
|
) {
|
||||||
|
// Clear block light data
|
||||||
|
self.world.clear_light_data(
|
||||||
|
light_update.chunk_x.0,
|
||||||
|
light_update.chunk_z.0,
|
||||||
|
world::LightType::Block,
|
||||||
|
light_update.empty_block_light_mask.data,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Clear sky light data
|
||||||
|
self.world.clear_light_data(
|
||||||
|
light_update.chunk_x.0,
|
||||||
|
light_update.chunk_z.0,
|
||||||
|
world::LightType::Sky,
|
||||||
|
light_update.empty_sky_light_mask.data,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Set block light data
|
||||||
|
self.world.set_light_data(
|
||||||
|
light_update.chunk_x.0,
|
||||||
|
light_update.chunk_z.0,
|
||||||
|
world::LightType::Block,
|
||||||
|
light_update.block_light_mask.data,
|
||||||
|
light_update.block_light_arrays.data,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Set sky light data
|
||||||
|
self.world.set_light_data(
|
||||||
|
light_update.chunk_x.0,
|
||||||
|
light_update.chunk_z.0,
|
||||||
|
world::LightType::Sky,
|
||||||
|
light_update.sky_light_mask.data,
|
||||||
|
light_update.sky_light_arrays.data,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::enum_variant_names)]
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
|
|
@ -115,12 +115,9 @@ impl Stevenkey {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_by_keycode(keycode: VirtualKeyCode, vars: &console::Vars) -> Option<Stevenkey> {
|
pub fn get_by_keycode(keycode: VirtualKeyCode, vars: &console::Vars) -> Option<Stevenkey> {
|
||||||
for steven_key in Stevenkey::values() {
|
Stevenkey::values()
|
||||||
if keycode as i64 == *vars.get(steven_key.get_cvar()) {
|
.into_iter()
|
||||||
return Some(steven_key);
|
.find(|steven_key| keycode as i64 == *vars.get(steven_key.get_cvar()))
|
||||||
}
|
|
||||||
}
|
|
||||||
None
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_cvar(&self) -> console::CVar<i64> {
|
pub fn get_cvar(&self) -> console::CVar<i64> {
|
||||||
|
|
|
@ -99,7 +99,7 @@ impl Logo {
|
||||||
let mut texts = String::new();
|
let mut texts = String::new();
|
||||||
file.read_to_string(&mut texts).unwrap();
|
file.read_to_string(&mut texts).unwrap();
|
||||||
for line in texts.lines() {
|
for line in texts.lines() {
|
||||||
text_strings.push(line.to_owned().replace("\r", ""));
|
text_strings.push(line.to_owned().replace('\r', ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let mut r: rand_pcg::Pcg32 =
|
let mut r: rand_pcg::Pcg32 =
|
||||||
|
|
|
@ -1494,6 +1494,8 @@ impl Button {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SubmitFunc = dyn Fn(&mut TextBox, &mut crate::Game);
|
||||||
|
|
||||||
element! {
|
element! {
|
||||||
ref TextBoxRef
|
ref TextBoxRef
|
||||||
pub struct TextBox {
|
pub struct TextBox {
|
||||||
|
@ -1505,7 +1507,7 @@ element! {
|
||||||
priv text: Option<TextRef>,
|
priv text: Option<TextRef>,
|
||||||
priv was_focused: bool,
|
priv was_focused: bool,
|
||||||
priv cursor_tick: f64,
|
priv cursor_tick: f64,
|
||||||
priv submit_funcs: Vec<Box<dyn Fn(&mut TextBox, &mut crate::Game)>>,
|
priv submit_funcs: Vec<Box<SubmitFunc>>,
|
||||||
}
|
}
|
||||||
builder TextBoxBuilder {
|
builder TextBoxBuilder {
|
||||||
hardcode button = None,
|
hardcode button = None,
|
||||||
|
|
723
src/world/mod.rs
723
src/world/mod.rs
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue