From 7d7a71be3591ff4f5ab7be3bc23646c6f5416b7b Mon Sep 17 00:00:00 2001 From: Danny Piper Date: Sun, 3 Mar 2024 14:52:04 +0000 Subject: [PATCH] Fix: some shit --- game-source/scenes/box/box.gd | 2 +- game-source/scenes/player_character/player_character.gd | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/game-source/scenes/box/box.gd b/game-source/scenes/box/box.gd index c6e5c41..7b2966c 100644 --- a/game-source/scenes/box/box.gd +++ b/game-source/scenes/box/box.gd @@ -21,7 +21,7 @@ func _http_request_completed(result, response_code, headers, body): push_error("Image couldn't be downloaded. Try a different image.") var image = Image.new() - var error = image.load_png_from_buffer(body) + var error = image.load_jpg_from_buffer(body) if error != OK: push_error("Couldn't load the image.") diff --git a/game-source/scenes/player_character/player_character.gd b/game-source/scenes/player_character/player_character.gd index f7531eb..04315b5 100644 --- a/game-source/scenes/player_character/player_character.gd +++ b/game-source/scenes/player_character/player_character.gd @@ -147,10 +147,10 @@ func _input(event): selectedItem = { } else: inventory[selectedItem.id].amount -= 1 + redrawInventory() var ser_res = JSON.parse_string(await wsClient.message_received) print("Response from move: " + JSON.stringify(ser_res)) - redrawInventory() if vec.length() == 1: @@ -178,13 +178,13 @@ func _on_player_did_move(new_pos): for i in ser_res["grid"]["spaces"]: if i["contains"].has("Player"): var obj = PlayerObject.instantiate() - obj.transform.origin = Vector2(i["contains"]["coordinate"][0], i["contains"]["coordinate"][1]) + obj.transform.origin = Vector2(i["coordinate"][0], i["coordinate"][1]) OtherObjects.add_child(obj) pass elif i["contains"].has("Kube"): var obj = BoxObject.instance() obj.transform.origin = Vector2(i["contains"]["coordinate"][0], i["contains"]["coordinate"][1]) - obj.fetch_url = "https://hack.djpiper28.co.uk/cache/kubeImageById/" + i["contains"]["Kube"]["uuid"] + obj.fetch_url = "https://hack.djpiper28.co.uk/cache/kubeImageById/" + i["contains"]["Kube"]["id"] OtherObjects.add_child(obj) pass