summaryrefslogtreecommitdiff
path: root/test-client/main.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-08-14 21:57:23 +0200
committermetamuffin <metamuffin@disroot.org>2024-08-14 21:57:23 +0200
commit66cfc6f5a6352d65f1b198547baaebdd2366b8a4 (patch)
tree308c88d86db55831e50340a27f24a7d6ba5e0228 /test-client/main.ts
parentc44b86bcd86762dcdf1268ebfd3be9899ccf24ba (diff)
downloadhurrycurry-66cfc6f5a6352d65f1b198547baaebdd2366b8a4.tar
hurrycurry-66cfc6f5a6352d65f1b198547baaebdd2366b8a4.tar.bz2
hurrycurry-66cfc6f5a6352d65f1b198547baaebdd2366b8a4.tar.zst
small fixes and book in tc
Diffstat (limited to 'test-client/main.ts')
-rw-r--r--test-client/main.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/test-client/main.ts b/test-client/main.ts
index 78c20d72..1679ab42 100644
--- a/test-client/main.ts
+++ b/test-client/main.ts
@@ -300,6 +300,13 @@ export function get_interact_target(): V2 | undefined {
function set_interact(edge: boolean) {
if (edge) interacting = get_interact_target()
+ if (edge && interacting) {
+ const kind = tiles.get([interacting.x, interacting.y].toString())?.kind;
+ if (kind && data.tile_names[kind] == "book") {
+ open("https://s.metamuffin.org/static/hurrycurry-1.2/book.pdf")
+ return
+ }
+ }
if (interacting) send({ player: my_id, type: "interact", pos: edge ? [interacting.x, interacting.y] : undefined })
if (!edge) interacting = undefined
}