updated to 4.4, fixed levelup

This commit is contained in:
Luca 2024-11-15 22:27:10 +01:00
parent ce5d12df95
commit cd62e12389
64 changed files with 178 additions and 60 deletions

View file

@ -5,6 +5,9 @@ class_name MonsterList
@onready var monster_list_entry: PackedScene = preload("res://ui/ingame_menu/party_list_entry.tscn")
func _ready() -> void:
# INFO: Add debug heal function for the "Party" button
%PartyButton.pressed.connect(debug_heal)
visible = false
for i: int in range(6):
var entry: Node = monster_list_entry.instantiate()
@ -14,12 +17,20 @@ func _on_close_button_pressed() -> void:
visible = false
func update() -> void:
for i: int in SaveManager.current_save.party.size():
var monster: MonsterData = SaveManager.current_save.party[i]
for i: int in range(6):
var entry: Node = monster_list_entry_container.get_child(i)
entry.update(monster)
if SaveManager.current_save.party.size() >= i+1:
var monster: MonsterData = SaveManager.current_save.party[i]
entry.update(monster)
else:
entry.hide_entry()
func _update_player_info() -> void:
#%PlayerName.text =
pass
func debug_heal() -> void:
Utils.heal_all()
UI.ingame_menu.update()