formatting
This commit is contained in:
parent
709859abad
commit
45919dc5ae
@ -86,6 +86,7 @@ func get_card_data_from_id(id: String) -> Dictionary:
|
||||
|
||||
return _get_card_data_from_bulk(_search_results_generic("id", id))
|
||||
|
||||
|
||||
func _search_results_name(search_query: String) -> Dictionary:
|
||||
var selected_entry = null
|
||||
for entry in _bulk_data:
|
||||
@ -120,7 +121,9 @@ func _get_card_data_from_bulk(dict_entry: Dictionary) -> Dictionary:
|
||||
dir.make_dir_recursive("user://card_cache/" + dict_entry["id"] + "/")
|
||||
dir = null
|
||||
|
||||
var file = FileAccess.open("user://card_cache/" + dict_entry["id"] + "/card.json", FileAccess.WRITE)
|
||||
var file = FileAccess.open(
|
||||
"user://card_cache/" + dict_entry["id"] + "/card.json", FileAccess.WRITE
|
||||
)
|
||||
file.store_line(JSON.stringify(dict_entry, "\t"))
|
||||
file.close()
|
||||
|
||||
|
@ -17,6 +17,7 @@ func _write_to_decks(_decks: Array) -> void:
|
||||
file.store_line(JSON.stringify(_decks))
|
||||
file.close()
|
||||
|
||||
|
||||
func load_decks() -> Array:
|
||||
if !FileAccess.file_exists("user://decks.json"):
|
||||
return []
|
||||
@ -25,6 +26,7 @@ func load_decks() -> Array:
|
||||
file.close()
|
||||
return JSON.parse_string(file_text)
|
||||
|
||||
|
||||
func _convert_mtgo_to_cache_lookup(decklist: String) -> Dictionary:
|
||||
var _cards = {}
|
||||
var lines = decklist.split("\n")
|
||||
|
Loading…
x
Reference in New Issue
Block a user