Refine bundle/push scripts, remove death

master
Louis Pearson 2022-08-01 16:37:44 -06:00
parent 05bc57f74e
commit 29870c61b5
5 changed files with 26 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/zig-cache
/zig-out
/src/zig-cache/
/bundle/

10
bundle.sh Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
zig build opt -Drelease-small
mkdir -p bundle/html
mkdir -p bundle/linux
mkdir -p bundle/windows
mkdir -p bundle/mac
mkdir -p bundle/cart
npx wasm4 bundle --html bundle/html/index.html --linux bundle/linux/wired --windows bundle/windows/wired.exe --mac bundle/mac/wired zig-out/lib/opt.wasm
cp zig-out/lib/opt.wasm bundle/cart/cart.wasm

View File

@ -18,6 +18,7 @@
buildInputs = [
zig.packages.${system}.master.latest
pkgs.butler
pkgs.binaryen
];
};

7
push.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
butler push bundle/windows/ desttinghim/wired:windows --userversion $1
butler push bundle/linux/ desttinghim/wired:linux --userversion $1
butler push bundle/mac/ desttinghim/wired:mac --userversion $1
butler push bundle/html/ desttinghim/wired:html --userversion $1
butler push bundle/cart/ desttinghim/wired:cart --userversion $1

View File

@ -313,11 +313,13 @@ pub fn update(time: usize) !State {
{
const pos = player.pos.pos;
if (getNearestWireInteraction(pos, 8)) |i| {
const wire = wires.get(i.details.wire.id);
const node = wire.nodes.get(i.details.wire.which);
if (i.active and !node.pinned) {
try start();
}
_ = i;
// Uncomment for death
// const wire = wires.get(i.details.wire.id);
// const node = wire.nodes.get(i.details.wire.which);
// if (i.active and !node.pinned) {
// try start();
// }
}
}