From 970d7064eda7560d7929708c54efeb22a3d3490e Mon Sep 17 00:00:00 2001 From: Nathan Singer Date: Tue, 22 Apr 2025 14:09:16 -0400 Subject: [PATCH] adds some documentation --- card.gd | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/card.gd b/card.gd index 21227a8..f7dfbc6 100644 --- a/card.gd +++ b/card.gd @@ -1,4 +1,9 @@ extends Node +## The card class [br][br] +## +## +## Contains helper text for the text, the cards ID, and the image path. +## The goal of this class is to make card management easier. # we want to use this to convert the mana cost into text # in the helper text box, but thats for the future @@ -12,11 +17,19 @@ var card_type = "placeholder_card_type" var oracle_text = "placeholder_oracle_text" var image_path = "placeholder_image_path" +## _check_cache +## id - String containing the card's ID [br] +## Checks if the card has already been cached func _check_cache(id) -> bool: if (FileAccess.file_exists("user://card_cache/" + id + ".json")): return true return false +## _do_scryfall_get +## id - String containing the card's ID [br] +## Using the scryfall API, fetches JSON information about the card +## caches this data to the disk at user://card_cache/[id].json, and +## the image of the card at user://card_cache/[id].png func _do_scryfall_get(id) -> void: # TODO: fetch the card here...