From 380895523730bba0acc70c7fdfa91eeee6b4b21e Mon Sep 17 00:00:00 2001 From: Nathan Singer Date: Tue, 22 Apr 2025 13:48:21 -0400 Subject: [PATCH] adds quick comment and some code for the images --- card.gd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/card.gd b/card.gd index c811a4a..21227a8 100644 --- a/card.gd +++ b/card.gd @@ -10,6 +10,7 @@ var card_id = "placedholder_id" var card_name = "placeholder_name" var card_type = "placeholder_card_type" var oracle_text = "placeholder_oracle_text" +var image_path = "placeholder_image_path" func _check_cache(id) -> bool: if (FileAccess.file_exists("user://card_cache/" + id + ".json")): @@ -28,6 +29,7 @@ func _do_scryfall_get(id) -> void: var card_cache = FileAccess.open("user://card_cache/" + id + ".json", FileAccess.WRITE) card_cache.store_string(card_content) card_cache = null # closes the file + # store image at the same spot ("user://card_cache/id.png") func load_card(id) -> void: @@ -40,6 +42,7 @@ func load_card(id) -> void: card_name = "loaded_cardname" card_type = "loaded_type" oracle_text = "loaded_oracletext" + image_path = "loaded_image_path" ondisk_card = null pass