mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-20 16:20:18 +01:00
Prepare feature: add cards mentioned in the description
This commit is contained in:
parent
f0383eb393
commit
a7495ce054
2 changed files with 10 additions and 0 deletions
|
@ -92,6 +92,7 @@ func _ready():
|
||||||
|
|
||||||
redraw_all_cards()
|
redraw_all_cards()
|
||||||
arrange_cards()
|
arrange_cards()
|
||||||
|
pass
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if $Energy:
|
if $Energy:
|
||||||
|
@ -165,3 +166,6 @@ func redraw_all_cards():
|
||||||
# draw_rand_card()
|
# draw_rand_card()
|
||||||
for card in cards:
|
for card in cards:
|
||||||
draw_card(card)
|
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_congrats.bbcode_text = level.congrats
|
||||||
level_name.text = level.title
|
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():
|
for r in repositories_node.get_children():
|
||||||
r.queue_free()
|
r.queue_free()
|
||||||
repositories = {}
|
repositories = {}
|
||||||
|
|
Loading…
Reference in a new issue