mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-20 16:20:18 +01:00
Add a "create files" level
This commit is contained in:
parent
5311e1d469
commit
f742085fd1
4 changed files with 34 additions and 6 deletions
23
levels/time-machine/files-add
Normal file
23
levels/time-machine/files-add
Normal file
|
@ -0,0 +1,23 @@
|
|||
title = Interior design
|
||||
cards = checkout commit-auto reset-hard file-new file-delete
|
||||
|
||||
[description]
|
||||
|
||||
Our client want some new furniture! You'll discover that they have a very special taste - please add some more furniture that matches this style and make a commit!
|
||||
|
||||
[setup]
|
||||
|
||||
echo A yellow cupboard with lots of drawers. > cupboard
|
||||
echo A really big yellow shelf. > shelf
|
||||
git add .
|
||||
git commit -m "A cupboard and a shelf"
|
||||
|
||||
[win]
|
||||
|
||||
NUM_FILES="$(git ls-tree --name-only -r HEAD | wc -l)"
|
||||
YELLOW_FILES="$(git grep -l yellow HEAD | wc -l)"
|
||||
test "$NUM_FILES" -ge 5 && test "$YELLOW_FILES" = "$NUM_FILES"
|
||||
|
||||
[congrats]
|
||||
|
||||
Thanks! Our clients says that they really like what you picked!
|
|
@ -98,5 +98,10 @@
|
|||
"id": "file-new",
|
||||
"command": "touch [string]",
|
||||
"description": "Create a new file."
|
||||
},
|
||||
{
|
||||
"id": "file-delete",
|
||||
"command": "rm [file]",
|
||||
"description": "Delete a new file."
|
||||
}
|
||||
]
|
||||
|
|
|
@ -46,7 +46,7 @@ __meta__ = {
|
|||
|
||||
[node name="Title" type="Label" parent="Panel/Margin/Rows"]
|
||||
margin_right = 1904.0
|
||||
margin_bottom = 32.0
|
||||
margin_bottom = 29.0
|
||||
text = "title"
|
||||
align = 1
|
||||
|
||||
|
@ -69,7 +69,7 @@ margin_bottom = 50.0
|
|||
text = "dir"
|
||||
|
||||
[node name="Scroll" type="ScrollContainer" parent="Panel/Margin/Rows"]
|
||||
margin_top = 32.0
|
||||
margin_top = 29.0
|
||||
margin_right = 1904.0
|
||||
margin_bottom = 1064.0
|
||||
size_flags_horizontal = 3
|
||||
|
@ -77,7 +77,7 @@ size_flags_vertical = 3
|
|||
|
||||
[node name="Grid" type="GridContainer" parent="Panel/Margin/Rows/Scroll"]
|
||||
margin_right = 1904.0
|
||||
margin_bottom = 1032.0
|
||||
margin_bottom = 1035.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_constants/vseparation = 16
|
||||
|
|
|
@ -7,7 +7,7 @@ onready var simplify_checkbox = $Rows/RepoVis/SimplifyCheckbox
|
|||
|
||||
export var label: String setget set_label
|
||||
export var path: String setget set_path, get_path
|
||||
export var simplified_view = false setget set_simplified_view
|
||||
export var simplified_view = true setget set_simplified_view
|
||||
export var editable_path = false setget set_editable_path
|
||||
|
||||
var node = preload("res://scenes/node.tscn")
|
||||
|
@ -109,8 +109,8 @@ func update_objects():
|
|||
n.children = c
|
||||
|
||||
_commit_count += 1
|
||||
if _commit_count >= 3 and not simplified_view:
|
||||
set_simplified_view(true)
|
||||
# if _commit_count >= 3 and not simplified_view:
|
||||
# set_simplified_view(true)
|
||||
"tag":
|
||||
n.children = tag_target(o)
|
||||
|
||||
|
|
Loading…
Reference in a new issue