Reload card store when reloading a level

This commit is contained in:
blinry 2021-01-05 13:08:43 +01:00
parent 7c96367d72
commit 00ec6f6700
2 changed files with 2 additions and 0 deletions

View file

@ -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

View file

@ -121,6 +121,7 @@ func load_level(level_id):
func reload_level():
cards.load_card_store()
levels.reload()
load_level(game.current_level)