diff --git a/cardgame.gd b/cardgame.gd index 48f6105..d3d86b5 100644 --- a/cardgame.gd +++ b/cardgame.gd @@ -92,6 +92,7 @@ func _ready(): redraw_all_cards() arrange_cards() + pass func _process(delta): if $Energy: @@ -165,3 +166,6 @@ func redraw_all_cards(): # draw_rand_card() for card in cards: draw_card(card) + +func add_card(command): + draw_card({"command": command, "description": "", "arg_number": 0, "energy": 0}) diff --git a/main.gd b/main.gd index 25e1aec..af15e1b 100644 --- a/main.gd +++ b/main.gd @@ -64,6 +64,12 @@ func load_level(level_id): level_congrats.bbcode_text = level.congrats level_name.text = level.title +# var code_regex = RegEx.new() +# code_regex.compile("\\[code\\]([^\\[]*)\\[/code\\]") +# var matches = code_regex.search_all(level.description) +# for m in matches: +# cards.add_card(m.get_string(1)) + for r in repositories_node.get_children(): r.queue_free() repositories = {}