mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-06-01 19:19:31 +02:00
some adjustaments and code refactor
This commit is contained in:
parent
b54abd298d
commit
f8530a58c7
14 changed files with 23 additions and 15 deletions
|
@ -55,7 +55,7 @@ func draw(ids):
|
|||
arrange_cards()
|
||||
|
||||
if ids.size() > 0:
|
||||
game.notify("These are your cards! Drag them to highlighted areas to play them!", self, "cards")
|
||||
game.notify(tr("YOUR_CARDS"), self, "cards")
|
||||
|
||||
func arrange_cards():
|
||||
var t = Timer.new()
|
||||
|
|
|
@ -82,7 +82,7 @@ func update():
|
|||
grid.add_child(item)
|
||||
|
||||
if files.size() > 0:
|
||||
game.notify("Click on these files to edit them!", self, "file-browser")
|
||||
game.notify("EDIT_FILE", self, "file-browser")
|
||||
|
||||
if false:
|
||||
match mode:
|
||||
|
|
|
@ -126,7 +126,7 @@ func notify(text, target=null, hint_slug=null):
|
|||
return
|
||||
|
||||
var notification = preload("res://scenes/notification.tscn").instance()
|
||||
notification.text = text
|
||||
notification.text = tr(text)
|
||||
if not target:
|
||||
target = get_tree().root
|
||||
target.call_deferred("add_child", notification)
|
||||
|
|
|
@ -42,7 +42,7 @@ func load(path):
|
|||
if cli_hints != "":
|
||||
description[0] = description[0] + "\n\n[color=#787878]"+cli_hints+"[/color]"
|
||||
|
||||
congrats = config.get("congrats", "Good job, you solved the level!\n\nFeel free to try a few more things or click 'Next level'.")
|
||||
congrats = config.get("congrats", "GOOD_JOB")
|
||||
cards = Array(config.get("cards", "").split(" "))
|
||||
if cards == [""]:
|
||||
cards = []
|
||||
|
@ -78,7 +78,7 @@ func load(path):
|
|||
else:
|
||||
repo = "yours"
|
||||
|
||||
var desc = "Complete the goal of this level"
|
||||
var desc = tr("COMPLETE_GOAL")
|
||||
for line in Array(config[k].split("\n")):
|
||||
if line.length() > 0 and line[0] == "#":
|
||||
desc = line.substr(1).strip_edges(true, true)
|
||||
|
|
|
@ -57,7 +57,7 @@ func reload():
|
|||
level_list.add_child(hb)
|
||||
|
||||
if badge.active:
|
||||
game.notify("You get a golden badge for each level you solve without using the playing cards! Can you solve them all using the command line?", badge, "cli-badge")
|
||||
game.notify("GOLDEN_BADGE", badge, "cli-badge")
|
||||
level_id += 1
|
||||
|
||||
chapter_id += 1
|
||||
|
|
|
@ -80,7 +80,7 @@ func type_set(new_type):
|
|||
$Sprite.texture = preload("res://nodes/tree.svg")
|
||||
"commit":
|
||||
$Sprite.texture = preload("res://nodes/commit.svg")
|
||||
game.notify("You can drag these around with your mouse!", self, "drag-nodes")
|
||||
game.notify("DRAG_AROUND", self, "drag-nodes")
|
||||
"tag":
|
||||
$Sprite.texture = preload("res://nodes/blob.svg")
|
||||
"ref":
|
||||
|
|
|
@ -89,7 +89,7 @@ func set_label(new_label):
|
|||
$Rows/RepoVis/SeparatorLine/DropArea.queue_free()
|
||||
$Rows/RepoVis/SeparatorLine.hide()
|
||||
else:
|
||||
game.notify("This is the time machine of another person! To interact with it, you need special commands!", self, "remote")
|
||||
game.notify("INTERACT", self, "remote")
|
||||
label_node.text = new_label
|
||||
|
||||
func random_position():
|
||||
|
|
|
@ -113,6 +113,7 @@ margin_bottom = 61.0
|
|||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
|
||||
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
|
||||
[connection signal="pressed" from="Rows/RepoVis/Button" to="." method="update_everything"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue