Add more levels in the new format

This commit is contained in:
Sebastian Morr 2020-09-30 22:20:42 +02:00
parent 065ca2a233
commit aec32e115c
10 changed files with 22 additions and 16 deletions

View file

@ -97,10 +97,12 @@ func construct():
func check_win():
var won = true
var any_checked = false
for r in repos:
var repo = repos[r]
if repo.win_commands != "":
any_checked = true
game.global_shell.cd(repo.path)
if not game.global_shell.run("function win { %s\n}; win 2>/dev/null >/dev/null && echo yes || echo no" % repo.win_commands) == "yes\n":
won = false
return won
return won and any_checked

View file

@ -1,3 +1,7 @@
description = Rebase all branches on top of the main branch, so that the commits are in alphabetical order, and then point the main branch to the top commit.
[setup]
git commit --allow-empty -m A
git commit --allow-empty -m B
git commit --allow-empty -m C
@ -10,3 +14,7 @@ git switch -c side2 main~2
git commit --allow-empty -m F
git checkout main
[win]
diff <(git log --pretty=%s main) <(echo -e "F\nE\nD\nC\nB\nA")

View file

@ -1 +0,0 @@
Rebase all branches on top of the main branch, so that the commits are in alphabetical order, and then point the main branch to the top commit.

View file

@ -1,9 +0,0 @@
git switch side1
git rebase main
git switch side2
git rebase side1
git switch main
git merge side2
git reflog expire --expire=all --all
git prune

View file

@ -1 +0,0 @@
diff <(git log --pretty=%s main) <(echo -e "F\nE\nD\nC\nB\nA")

8
levels/top-down/sandbox Normal file
View file

@ -0,0 +1,8 @@
[setup local]
git commit --allow-empty -m "1"
git commit --allow-empty -m "2"
git commit --allow-empty -m "3"
git push
[setup origin]

View file

@ -1 +1 @@
welcome
sandbox

View file

@ -1 +0,0 @@
Hiiii!

View file

@ -40,7 +40,7 @@ func _ready():
chapter_select.select(0)
# Load first chapter.
load_chapter(0)
load_chapter(1)
input.grab_focus()
func load_chapter(id):

View file

@ -155,7 +155,7 @@ func apply_forces():
var center_of_gravity = nodes.rect_size/2
var d = o.position.distance_to(center_of_gravity)
var dir = (o.position - center_of_gravity).normalized()
var f = (d+0.00001)*Vector2(0.03, 0.01)
var f = (d+0.00001)*(Vector2(nodes.rect_size.y, nodes.rect_size.x).normalized()/30)
o.position -= dir*f
func find_position(n):