some adjustaments and code refactor

This commit is contained in:
Luca Canali 2021-09-15 18:15:10 +02:00
parent b54abd298d
commit f8530a58c7
14 changed files with 23 additions and 15 deletions

View file

@ -31,11 +31,11 @@ git branch -D main
[win] [win]
# Crea un ramo chiamato 'birthday questo punta alla linea temporale del compleanno # Crea un ramo chiamato 'birthday' questo punta alla linea temporale del compleanno
git show birthday | grep 'al compleanno' git show birthday | grep 'birthday'
# Create a branch called 'concert' that points to the concert timeline. # Crea un ramo chiamato 'concert' questo punta alla linea temporale del compleanno
git show concert | grep 'al concerto' git show concert | grep 'concert'
[congrats] [congrats]

View file

@ -20,7 +20,7 @@ echo Salti in un tombino nel marciapiede e arrivi in orario a scuola. >> you
git commit -am "Salto" git commit -am "Salto"
git checkout HEAD^ -b friend git checkout HEAD^ -b friend
echo All'improvviso cadi in una pozzanghera puzzolente e vieni mangiato da degli alligatori. >> you echo "All'improvviso cadi in una pozzanghera puzzolente e vieni mangiato da degli alligatori." >> you
git commit -am "Un nuovo amico" git commit -am "Un nuovo amico"
git checkout HEAD~2 -b music git checkout HEAD~2 -b music

View file

@ -15,7 +15,7 @@ All'improvviso, il tuo gatto salta sul tavolo, strappa via il modulo, e scappa v
Devi trovare una buona soluzione. Devi trovare una buona soluzione.
(Premi "Next Level" appena sei pronto!) (Premi "Prossimo livello" appena sei pronto!)
[setup] [setup]

View file

@ -28,4 +28,11 @@ WHATEVER,"Whatever...","Ad ogni costo..."
OKAY,"Okay!","Ok!" OKAY,"Okay!","Ok!"
YAY,"Yay!","Yay!" YAY,"Yay!","Yay!"
AWESOME,"Awesome!","Eccezionale!" AWESOME,"Awesome!","Eccezionale!"
YOUR_TERMINAL,"This is your terminal! All commands are executed here, and you can see their output. You can also type your own commands here!","Questo è il tuo terminale! Tutti i comandi sono eseguiti qui e puoi vedere il loro output. Puoi anche digitare i tuoi comndi qui!" YOUR_TERMINAL,"This is your terminal! All commands are executed here, and you can see their output. You can also type your own commands here!","Questo è il tuo terminale! Tutti i comandi sono eseguiti qui e puoi vedere il loro output. Puoi anche digitare i tuoi comandi qui!"
INTERACT,"This is the time machine of another person! To interact with it, you need special commands!","Questa è la macchina del tempo di u'altra persona! Per interagirci hai bisogno di comandi speciali!"
GOLDEN_BADGE,"You get a golden badge for each level you solve without using the playing cards! Can you solve them all using the command line?","Ti aggiudicherai un badge d'oro per ogni livello che risolverai senza usare le cards! Puoi risolverli usando solo la linea di comando?"
GOOD_JOB,"Good job, you solved the level!\n\nFeel free to try a few more things or click 'Next level'.","Ottimo lavoro hai risolto il livello!\n\nSentiti libero di provare altro o clicca su 'Prossimo livello'"
COMPLETE_GOAL,"Complete the goal of this level","Completa l'obbiettivo di questo ivello!"
DRAG_AROUND,"You can drag these around with your mouse!","Puoi trascinarli in giro con il mouse!"
EDIT_FILE,"Click on these files to edit them!","Clicca su questi files per modificarli!"
YOUR_CARDS,"These are your cards! Drag them to highlighted areas to play them!","Queste sono le tue carte! Spostale nell'area evidenziata per usarle!"
Can't render this file because it contains an unexpected character in line 10 and column 86.

View file

@ -55,7 +55,7 @@ func draw(ids):
arrange_cards() arrange_cards()
if ids.size() > 0: 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(): func arrange_cards():
var t = Timer.new() var t = Timer.new()

View file

@ -82,7 +82,7 @@ func update():
grid.add_child(item) grid.add_child(item)
if files.size() > 0: 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: if false:
match mode: match mode:

View file

@ -126,7 +126,7 @@ func notify(text, target=null, hint_slug=null):
return return
var notification = preload("res://scenes/notification.tscn").instance() var notification = preload("res://scenes/notification.tscn").instance()
notification.text = text notification.text = tr(text)
if not target: if not target:
target = get_tree().root target = get_tree().root
target.call_deferred("add_child", notification) target.call_deferred("add_child", notification)

View file

@ -42,7 +42,7 @@ func load(path):
if cli_hints != "": if cli_hints != "":
description[0] = description[0] + "\n\n[color=#787878]"+cli_hints+"[/color]" 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(" ")) cards = Array(config.get("cards", "").split(" "))
if cards == [""]: if cards == [""]:
cards = [] cards = []
@ -78,7 +78,7 @@ func load(path):
else: else:
repo = "yours" repo = "yours"
var desc = "Complete the goal of this level" var desc = tr("COMPLETE_GOAL")
for line in Array(config[k].split("\n")): for line in Array(config[k].split("\n")):
if line.length() > 0 and line[0] == "#": if line.length() > 0 and line[0] == "#":
desc = line.substr(1).strip_edges(true, true) desc = line.substr(1).strip_edges(true, true)

View file

@ -57,7 +57,7 @@ func reload():
level_list.add_child(hb) level_list.add_child(hb)
if badge.active: 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 level_id += 1
chapter_id += 1 chapter_id += 1

View file

@ -80,7 +80,7 @@ func type_set(new_type):
$Sprite.texture = preload("res://nodes/tree.svg") $Sprite.texture = preload("res://nodes/tree.svg")
"commit": "commit":
$Sprite.texture = preload("res://nodes/commit.svg") $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": "tag":
$Sprite.texture = preload("res://nodes/blob.svg") $Sprite.texture = preload("res://nodes/blob.svg")
"ref": "ref":

View file

@ -89,7 +89,7 @@ func set_label(new_label):
$Rows/RepoVis/SeparatorLine/DropArea.queue_free() $Rows/RepoVis/SeparatorLine/DropArea.queue_free()
$Rows/RepoVis/SeparatorLine.hide() $Rows/RepoVis/SeparatorLine.hide()
else: 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 label_node.text = new_label
func random_position(): func random_position():

View file

@ -113,6 +113,7 @@ margin_bottom = 61.0
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"] [connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"] [connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
[connection signal="pressed" from="Rows/RepoVis/Button" to="." method="update_everything"] [connection signal="pressed" from="Rows/RepoVis/Button" to="." method="update_everything"]