Refine bundle/push scripts, remove death
parent
05bc57f74e
commit
29870c61b5
|
@ -1,3 +1,4 @@
|
|||
/zig-cache
|
||||
/zig-out
|
||||
/src/zig-cache/
|
||||
/bundle/
|
||||
|
|
|
@ -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
|
|
@ -18,6 +18,7 @@
|
|||
buildInputs = [
|
||||
zig.packages.${system}.master.latest
|
||||
pkgs.butler
|
||||
pkgs.binaryen
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
12
src/game.zig
12
src/game.zig
|
@ -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();
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue