adds quick comment and some code for the images

This commit is contained in:
Nathan Singer 2025-04-22 13:48:21 -04:00
parent fcf736af92
commit 3808955237

View File

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