diff options
| author | tpart <tpart120@proton.me> | 2025-10-20 21:09:08 +0200 |
|---|---|---|
| committer | tpart <tpart120@proton.me> | 2025-10-20 21:09:16 +0200 |
| commit | a3b0879a98bf5a0881b426913d7dd4cb9010e327 (patch) | |
| tree | 7495d5c208cd3454ae14c26f42f72629df60496d /client/multiplayer.gd | |
| parent | a52785f4869a09e05417f97aff1c0d5b19587463 (diff) | |
| download | hurrycurry-a3b0879a98bf5a0881b426913d7dd4cb9010e327.tar hurrycurry-a3b0879a98bf5a0881b426913d7dd4cb9010e327.tar.bz2 hurrycurry-a3b0879a98bf5a0881b426913d7dd4cb9010e327.tar.zst | |
Refactor interact system; Implement new player interact logic
Diffstat (limited to 'client/multiplayer.gd')
| -rw-r--r-- | client/multiplayer.gd | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/client/multiplayer.gd b/client/multiplayer.gd index d635db41..d5221b15 100644 --- a/client/multiplayer.gd +++ b/client/multiplayer.gd @@ -110,12 +110,18 @@ func send_tile_interact(player, pos: Vector2i, edge: bool, hand: int): send_packet({ "type": "interact", "player": player, + "target": {"tile": [pos.x, pos.y]} if edge else null, "hand": hand, - "pos": [pos.x, pos.y] if edge else null, }) -func send_player_interact(_player, _edge: bool): - push_error("not yet implemented") +func send_player_interact(player, target_player, target_hand: int, edge: bool, hand: int): + @warning_ignore("incompatible_ternary") + send_packet({ + "type": "interact", + "player": player, + "target": {"player": [target_player, target_hand]} if edge else null, + "hand": hand, + }) func send_chat(player, message: String): send_packet({ |