18 lines
384 B
GDScript
18 lines
384 B
GDScript
extends Node
|
|
|
|
|
|
func convert_mtgo_to_http(decklist: String) -> Dictionary:
|
|
var links = {}
|
|
var lines = decklist.split("\n")
|
|
for line in lines:
|
|
var words = line.split(" ", false, 1)
|
|
if words.size() != 2:
|
|
continue
|
|
|
|
words[1] = words[1].replace(" ", "+")
|
|
links["https://api.scryfall.com/cards/named?exact=" + words[1]] = words[0]
|
|
return links
|
|
|
|
func _ready() -> void:
|
|
pass
|