diff --git a/scenes/cards.gd b/scenes/cards.gd index c9273be..f960431 100644 --- a/scenes/cards.gd +++ b/scenes/cards.gd @@ -15,6 +15,7 @@ func _process(_delta): $Energy.text = str(game.energy) func load_card_store(): + card_store = {} var cards_json = JSON.parse(helpers.read_file("res://resources/cards.json")).result for card in cards_json: card_store[card["id"]] = card diff --git a/scenes/main.gd b/scenes/main.gd index 75ea368..3dda941 100644 --- a/scenes/main.gd +++ b/scenes/main.gd @@ -121,6 +121,7 @@ func load_level(level_id): func reload_level(): + cards.load_card_store() levels.reload() load_level(game.current_level)