Skip to content

Commit

Permalink
Fix: some shit
Browse files Browse the repository at this point in the history
  • Loading branch information
djpiper28 committed Mar 3, 2024
1 parent 4e6d48a commit 7d7a71b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion game-source/scenes/box/box.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down
6 changes: 3 additions & 3 deletions game-source/scenes/player_character/player_character.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 7d7a71b

Please sign in to comment.