inventory bug fixes, multiplayer pickup sync

This commit is contained in:
N0ble 2025-07-22 00:50:08 -06:00
parent 04a9a299d7
commit 000269875a
14 changed files with 88 additions and 43 deletions

View file

@ -24,10 +24,11 @@ func toggle_inventory() -> bool:
func update_inventory():
for i in inventory.items:
var match_found : bool = false
var new_item = item_scene.instantiate()
# new_item.set_values(i.item.name, i.item.value, i.item.weight)
item_list.add_child(new_item)
new_item.set_values(i.item.name, 10, 10)
print(i.item.name)
print(i)
pass
for j in item_list.get_children():
if j.id.text != str(i.item.id):
match_found = true
if !match_found || item_list.get_children().size() == 1:
item_list.add_child(new_item)
new_item.set_values(i.item.id, i.item.name, 10, 10)