M .gitlab-ci.yml => .gitlab-ci.yml +2 -1
@@ 3,9 3,10 @@ before_script:
- apt-get update -yqq
- apt-get install -yqq --no-install-recommends build-essential
- rustup component add clippy
+ - apt-get install -yqq protobuf-compiler
check:cargo:
script:
- rustc --version && cargo --version
- cargo check --locked --bin starkingdoms-server
- - cargo clippy --workspace --verbose --locked>
\ No newline at end of file
+ - cargo clippy --workspace --verbose --locked
M client/src/index.ts => client/src/index.ts +8 -8
@@ 90,13 90,13 @@ async function client_main(server: string, username: string, texture_quality: st
global.canvas.style.setProperty("background-image", `url("/assets/final/${texture_quality}/starfield.png")`);
document.onkeydown = (e) => {
- if (e.code == "ArrowLeft") { // arrow-left
+ if (e.code == "ArrowLeft" || e.code == "KeyA") { // arrow-left
global.keys.left = true;
- } else if (e.code == "ArrowRight") { // arrow-right
+ } else if (e.code == "ArrowRight" || e.code == "KeyD") { // arrow-right
global.keys.right = true;
- } else if (e.code == "ArrowUp") { // arrow-up
+ } else if (e.code == "ArrowUp" || e.code == "KeyW") { // arrow-up
global.keys.up = true;
- } else if (e.code == "ArrowDown") { // arrow-down
+ } else if (e.code == "ArrowDown" || e.code == "KeyS") { // arrow-down
global.keys.down = true;
}
@@ 110,13 110,13 @@ async function client_main(server: string, username: string, texture_quality: st
global.client?.socket.send(encode(MessageC2SInput_packetInfo.type, msg));
}
document.onkeyup = (e) => {
- if (e.code == "ArrowLeft") { // arrow-left
+ if (e.code == "ArrowLeft" || e.code == "KeyA") { // arrow-left
global.keys.left = false;
- } else if (e.code == "ArrowRight") { // arrow-right
+ } else if (e.code == "ArrowRight" || e.code == "KeyD") { // arrow-right
global.keys.right = false;
- } else if (e.code == "ArrowUp") { // arrow-up
+ } else if (e.code == "ArrowUp" || e.code == "KeyW") { // arrow-up
global.keys.up = false;
- } else if (e.code == "ArrowDown") { // arrow-down
+ } else if (e.code == "ArrowDown" || e.code == "KeyS") { // arrow-down
global.keys.down = false;
}