documents the public facing function:
This commit is contained in:
parent
05cdcf83cc
commit
5fc67ab5e5
11
card.gd
11
card.gd
@ -25,9 +25,9 @@ func _init(id) -> void:
|
||||
card_id = id
|
||||
|
||||
func _ready() -> void:
|
||||
await do_cache_grab()
|
||||
await _do_cache_grab()
|
||||
|
||||
func do_cache_grab() -> void:
|
||||
func _do_cache_grab() -> void:
|
||||
await _do_http_request_card()
|
||||
await _do_http_request_imgs(png_path, true)
|
||||
await _do_http_request_imgs(jpg_path, false)
|
||||
@ -97,9 +97,14 @@ func _do_http_request_card() -> void:
|
||||
png_path = image_uris["png"]
|
||||
jpg_path = image_uris["normal"]
|
||||
|
||||
## load_card
|
||||
##
|
||||
## Loads the card, returns false, and triggers
|
||||
## a cache fetch if the card is not in the cache,
|
||||
## otherwise sets the cards variables if the cache is present.
|
||||
func load_card() -> bool:
|
||||
if !_check_cache(card_id):
|
||||
await do_cache_grab()
|
||||
await _do_cache_grab()
|
||||
push_error(_card_error("CACHE_FAIL") + "Cache wasn't ready, this card will need to be reinitialized")
|
||||
return false
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user