Skip to content

Commit 29870c6

Browse files
committed
Refine bundle/push scripts, remove death
1 parent 05bc57f commit 29870c6

File tree

5 files changed

+26
-5
lines changed

5 files changed

+26
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/zig-cache
22
/zig-out
33
/src/zig-cache/
4+
/bundle/

bundle.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
zig build opt -Drelease-small
4+
mkdir -p bundle/html
5+
mkdir -p bundle/linux
6+
mkdir -p bundle/windows
7+
mkdir -p bundle/mac
8+
mkdir -p bundle/cart
9+
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
10+
cp zig-out/lib/opt.wasm bundle/cart/cart.wasm

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
buildInputs = [
1919
zig.packages.${system}.master.latest
2020
pkgs.butler
21+
pkgs.binaryen
2122
];
2223
};
2324

push.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
butler push bundle/windows/ desttinghim/wired:windows --userversion $1
4+
butler push bundle/linux/ desttinghim/wired:linux --userversion $1
5+
butler push bundle/mac/ desttinghim/wired:mac --userversion $1
6+
butler push bundle/html/ desttinghim/wired:html --userversion $1
7+
butler push bundle/cart/ desttinghim/wired:cart --userversion $1

src/game.zig

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,11 +313,13 @@ pub fn update(time: usize) !State {
313313
{
314314
const pos = player.pos.pos;
315315
if (getNearestWireInteraction(pos, 8)) |i| {
316-
const wire = wires.get(i.details.wire.id);
317-
const node = wire.nodes.get(i.details.wire.which);
318-
if (i.active and !node.pinned) {
319-
try start();
320-
}
316+
_ = i;
317+
// Uncomment for death
318+
// const wire = wires.get(i.details.wire.id);
319+
// const node = wire.nodes.get(i.details.wire.which);
320+
// if (i.active and !node.pinned) {
321+
// try start();
322+
// }
321323
}
322324
}
323325

0 commit comments

Comments
 (0)