mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-26 09:06:22 +03:00
Prepare feature: add cards mentioned in the description
This commit is contained in:
parent
f0383eb393
commit
a7495ce054
@ -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})
|
||||
|
6
main.gd
6
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 = {}
|
||||
|
Loading…
Reference in New Issue
Block a user