From 5031009dd5ecc39daa314c37d2c862154ea68f5f Mon Sep 17 00:00:00 2001 From: Sebastian Morr Date: Tue, 22 Sep 2020 16:12:03 +0200 Subject: [PATCH] Allow multiple level sets, pull out default order into "sequence" file --- levels/{ => bottom-up}/basics/congrats | 0 levels/{ => bottom-up}/basics/description | 0 levels/{ => bottom-up}/basics/start | 0 levels/{ => bottom-up}/basics/win | 0 levels/{ => bottom-up}/blob-create/congrats | 0 .../{ => bottom-up}/blob-create/description | 0 levels/{ => bottom-up}/blob-create/goal | 0 levels/{ => bottom-up}/blob-create/start | 0 levels/{ => bottom-up}/blob-create/win | 0 levels/{ => bottom-up}/blob-remove/congrats | 0 .../{ => bottom-up}/blob-remove/description | 0 levels/{ => bottom-up}/blob-remove/goal | 0 levels/{ => bottom-up}/blob-remove/start | 0 levels/{ => bottom-up}/blob-remove/win | 0 .../{ => bottom-up}/commit-create/description | 0 levels/{ => bottom-up}/commit-create/goal | 0 levels/{ => bottom-up}/commit-create/start | 0 levels/{ => bottom-up}/commit-create/win | 0 .../commit-parents/description | 0 levels/{ => bottom-up}/commit-parents/goal | 0 levels/{ => bottom-up}/commit-parents/start | 0 levels/{ => bottom-up}/commit-parents/win | 0 .../commit-rhombus/description | 0 levels/{ => bottom-up}/commit-rhombus/goal | 0 levels/{ => bottom-up}/commit-rhombus/start | 0 levels/{ => bottom-up}/commit-rhombus/win | 0 levels/{ => bottom-up}/conflict/description | 0 levels/{ => bottom-up}/conflict/goal | 0 levels/{ => bottom-up}/conflict/start | 0 levels/{ => bottom-up}/index-add/congrats | 0 levels/{ => bottom-up}/index-add/description | 0 levels/{ => bottom-up}/index-add/goal | 0 levels/{ => bottom-up}/index-add/start | 0 levels/{ => bottom-up}/index-add/win | 0 .../{ => bottom-up}/index-remove/description | 0 levels/{ => bottom-up}/index-remove/goal | 0 levels/{ => bottom-up}/index-remove/start | 0 levels/{ => bottom-up}/index-remove/win | 0 .../{ => bottom-up}/index-update/description | 0 levels/{ => bottom-up}/index-update/goal | 0 levels/{ => bottom-up}/index-update/start | 0 levels/{ => bottom-up}/index-update/win | 0 .../puzzle-apocalypse/description | 0 levels/{ => bottom-up}/puzzle-apocalypse/goal | 0 .../{ => bottom-up}/puzzle-apocalypse/start | 0 levels/{ => bottom-up}/puzzle-apocalypse/win | 0 .../puzzle-precious-blob/description | 0 .../{ => bottom-up}/puzzle-precious-blob/goal | 0 .../{ => bottom-up}/puzzle-precious-blob/win | 0 .../puzzle-trees-all-the-way-down/description | 0 .../puzzle-trees-all-the-way-down/goal | 0 .../puzzle-trees-all-the-way-down/win | 0 levels/{ => bottom-up}/ref-create/description | 0 levels/{ => bottom-up}/ref-create/goal | 0 levels/{ => bottom-up}/ref-create/start | 0 levels/{ => bottom-up}/ref-create/win | 0 levels/{ => bottom-up}/ref-move/description | 0 levels/{ => bottom-up}/ref-move/goal | 0 levels/{ => bottom-up}/ref-move/start | 0 levels/{ => bottom-up}/ref-move/win | 0 levels/{ => bottom-up}/ref-remove/description | 0 levels/{ => bottom-up}/ref-remove/goal | 0 levels/{ => bottom-up}/ref-remove/start | 0 levels/{ => bottom-up}/ref-remove/win | 0 levels/bottom-up/sequence | 18 +++++++++ .../{ => bottom-up}/symref-create/description | 0 levels/{ => bottom-up}/symref-create/goal | 0 levels/{ => bottom-up}/symref-create/start | 0 levels/{ => bottom-up}/symref-create/win | 0 .../{ => bottom-up}/symref-no-deref/congrats | 0 .../symref-no-deref/description | 0 levels/{ => bottom-up}/symref-no-deref/goal | 0 levels/{ => bottom-up}/symref-no-deref/start | 0 levels/{ => bottom-up}/symref-no-deref/win | 0 levels/{ => bottom-up}/tree-create/congrats | 0 .../{ => bottom-up}/tree-create/description | 0 levels/{ => bottom-up}/tree-create/goal | 0 levels/{ => bottom-up}/tree-create/start | 0 levels/{ => bottom-up}/tree-create/win | 0 .../{ => bottom-up}/tree-nested/description | 0 levels/{ => bottom-up}/tree-nested/goal | 0 levels/{ => bottom-up}/tree-nested/start | 0 levels/{ => bottom-up}/tree-nested/win | 0 levels/{ => bottom-up}/tree-read/description | 0 levels/{ => bottom-up}/tree-read/goal | 0 levels/{ => bottom-up}/tree-read/start | 0 levels/{ => bottom-up}/tree-read/win | 0 levels/{ => bottom-up}/welcome/congrats | 0 levels/{ => bottom-up}/welcome/description | 0 levels/{ => bottom-up}/welcome/goal | 0 levels/{ => bottom-up}/welcome/start | 0 levels/{ => bottom-up}/welcome/win | 0 levels/top-down/sequence | 1 + levels/top-down/welcome/description | 1 + main.gd | 38 +++++++------------ text_editor.tscn | 8 ++-- 96 files changed, 37 insertions(+), 29 deletions(-) rename levels/{ => bottom-up}/basics/congrats (100%) rename levels/{ => bottom-up}/basics/description (100%) rename levels/{ => bottom-up}/basics/start (100%) rename levels/{ => bottom-up}/basics/win (100%) rename levels/{ => bottom-up}/blob-create/congrats (100%) rename levels/{ => bottom-up}/blob-create/description (100%) rename levels/{ => bottom-up}/blob-create/goal (100%) rename levels/{ => bottom-up}/blob-create/start (100%) rename levels/{ => bottom-up}/blob-create/win (100%) rename levels/{ => bottom-up}/blob-remove/congrats (100%) rename levels/{ => bottom-up}/blob-remove/description (100%) rename levels/{ => bottom-up}/blob-remove/goal (100%) rename levels/{ => bottom-up}/blob-remove/start (100%) rename levels/{ => bottom-up}/blob-remove/win (100%) rename levels/{ => bottom-up}/commit-create/description (100%) rename levels/{ => bottom-up}/commit-create/goal (100%) rename levels/{ => bottom-up}/commit-create/start (100%) rename levels/{ => bottom-up}/commit-create/win (100%) rename levels/{ => bottom-up}/commit-parents/description (100%) rename levels/{ => bottom-up}/commit-parents/goal (100%) rename levels/{ => bottom-up}/commit-parents/start (100%) rename levels/{ => bottom-up}/commit-parents/win (100%) rename levels/{ => bottom-up}/commit-rhombus/description (100%) rename levels/{ => bottom-up}/commit-rhombus/goal (100%) rename levels/{ => bottom-up}/commit-rhombus/start (100%) rename levels/{ => bottom-up}/commit-rhombus/win (100%) rename levels/{ => bottom-up}/conflict/description (100%) rename levels/{ => bottom-up}/conflict/goal (100%) rename levels/{ => bottom-up}/conflict/start (100%) rename levels/{ => bottom-up}/index-add/congrats (100%) rename levels/{ => bottom-up}/index-add/description (100%) rename levels/{ => bottom-up}/index-add/goal (100%) rename levels/{ => bottom-up}/index-add/start (100%) rename levels/{ => bottom-up}/index-add/win (100%) rename levels/{ => bottom-up}/index-remove/description (100%) rename levels/{ => bottom-up}/index-remove/goal (100%) rename levels/{ => bottom-up}/index-remove/start (100%) rename levels/{ => bottom-up}/index-remove/win (100%) rename levels/{ => bottom-up}/index-update/description (100%) rename levels/{ => bottom-up}/index-update/goal (100%) rename levels/{ => bottom-up}/index-update/start (100%) rename levels/{ => bottom-up}/index-update/win (100%) rename levels/{ => bottom-up}/puzzle-apocalypse/description (100%) rename levels/{ => bottom-up}/puzzle-apocalypse/goal (100%) rename levels/{ => bottom-up}/puzzle-apocalypse/start (100%) rename levels/{ => bottom-up}/puzzle-apocalypse/win (100%) rename levels/{ => bottom-up}/puzzle-precious-blob/description (100%) rename levels/{ => bottom-up}/puzzle-precious-blob/goal (100%) rename levels/{ => bottom-up}/puzzle-precious-blob/win (100%) rename levels/{ => bottom-up}/puzzle-trees-all-the-way-down/description (100%) rename levels/{ => bottom-up}/puzzle-trees-all-the-way-down/goal (100%) rename levels/{ => bottom-up}/puzzle-trees-all-the-way-down/win (100%) rename levels/{ => bottom-up}/ref-create/description (100%) rename levels/{ => bottom-up}/ref-create/goal (100%) rename levels/{ => bottom-up}/ref-create/start (100%) rename levels/{ => bottom-up}/ref-create/win (100%) rename levels/{ => bottom-up}/ref-move/description (100%) rename levels/{ => bottom-up}/ref-move/goal (100%) rename levels/{ => bottom-up}/ref-move/start (100%) rename levels/{ => bottom-up}/ref-move/win (100%) rename levels/{ => bottom-up}/ref-remove/description (100%) rename levels/{ => bottom-up}/ref-remove/goal (100%) rename levels/{ => bottom-up}/ref-remove/start (100%) rename levels/{ => bottom-up}/ref-remove/win (100%) create mode 100644 levels/bottom-up/sequence rename levels/{ => bottom-up}/symref-create/description (100%) rename levels/{ => bottom-up}/symref-create/goal (100%) rename levels/{ => bottom-up}/symref-create/start (100%) rename levels/{ => bottom-up}/symref-create/win (100%) rename levels/{ => bottom-up}/symref-no-deref/congrats (100%) rename levels/{ => bottom-up}/symref-no-deref/description (100%) rename levels/{ => bottom-up}/symref-no-deref/goal (100%) rename levels/{ => bottom-up}/symref-no-deref/start (100%) rename levels/{ => bottom-up}/symref-no-deref/win (100%) rename levels/{ => bottom-up}/tree-create/congrats (100%) rename levels/{ => bottom-up}/tree-create/description (100%) rename levels/{ => bottom-up}/tree-create/goal (100%) rename levels/{ => bottom-up}/tree-create/start (100%) rename levels/{ => bottom-up}/tree-create/win (100%) rename levels/{ => bottom-up}/tree-nested/description (100%) rename levels/{ => bottom-up}/tree-nested/goal (100%) rename levels/{ => bottom-up}/tree-nested/start (100%) rename levels/{ => bottom-up}/tree-nested/win (100%) rename levels/{ => bottom-up}/tree-read/description (100%) rename levels/{ => bottom-up}/tree-read/goal (100%) rename levels/{ => bottom-up}/tree-read/start (100%) rename levels/{ => bottom-up}/tree-read/win (100%) rename levels/{ => bottom-up}/welcome/congrats (100%) rename levels/{ => bottom-up}/welcome/description (100%) rename levels/{ => bottom-up}/welcome/goal (100%) rename levels/{ => bottom-up}/welcome/start (100%) rename levels/{ => bottom-up}/welcome/win (100%) create mode 100644 levels/top-down/sequence create mode 100644 levels/top-down/welcome/description diff --git a/levels/basics/congrats b/levels/bottom-up/basics/congrats similarity index 100% rename from levels/basics/congrats rename to levels/bottom-up/basics/congrats diff --git a/levels/basics/description b/levels/bottom-up/basics/description similarity index 100% rename from levels/basics/description rename to levels/bottom-up/basics/description diff --git a/levels/basics/start b/levels/bottom-up/basics/start similarity index 100% rename from levels/basics/start rename to levels/bottom-up/basics/start diff --git a/levels/basics/win b/levels/bottom-up/basics/win similarity index 100% rename from levels/basics/win rename to levels/bottom-up/basics/win diff --git a/levels/blob-create/congrats b/levels/bottom-up/blob-create/congrats similarity index 100% rename from levels/blob-create/congrats rename to levels/bottom-up/blob-create/congrats diff --git a/levels/blob-create/description b/levels/bottom-up/blob-create/description similarity index 100% rename from levels/blob-create/description rename to levels/bottom-up/blob-create/description diff --git a/levels/blob-create/goal b/levels/bottom-up/blob-create/goal similarity index 100% rename from levels/blob-create/goal rename to levels/bottom-up/blob-create/goal diff --git a/levels/blob-create/start b/levels/bottom-up/blob-create/start similarity index 100% rename from levels/blob-create/start rename to levels/bottom-up/blob-create/start diff --git a/levels/blob-create/win b/levels/bottom-up/blob-create/win similarity index 100% rename from levels/blob-create/win rename to levels/bottom-up/blob-create/win diff --git a/levels/blob-remove/congrats b/levels/bottom-up/blob-remove/congrats similarity index 100% rename from levels/blob-remove/congrats rename to levels/bottom-up/blob-remove/congrats diff --git a/levels/blob-remove/description b/levels/bottom-up/blob-remove/description similarity index 100% rename from levels/blob-remove/description rename to levels/bottom-up/blob-remove/description diff --git a/levels/blob-remove/goal b/levels/bottom-up/blob-remove/goal similarity index 100% rename from levels/blob-remove/goal rename to levels/bottom-up/blob-remove/goal diff --git a/levels/blob-remove/start b/levels/bottom-up/blob-remove/start similarity index 100% rename from levels/blob-remove/start rename to levels/bottom-up/blob-remove/start diff --git a/levels/blob-remove/win b/levels/bottom-up/blob-remove/win similarity index 100% rename from levels/blob-remove/win rename to levels/bottom-up/blob-remove/win diff --git a/levels/commit-create/description b/levels/bottom-up/commit-create/description similarity index 100% rename from levels/commit-create/description rename to levels/bottom-up/commit-create/description diff --git a/levels/commit-create/goal b/levels/bottom-up/commit-create/goal similarity index 100% rename from levels/commit-create/goal rename to levels/bottom-up/commit-create/goal diff --git a/levels/commit-create/start b/levels/bottom-up/commit-create/start similarity index 100% rename from levels/commit-create/start rename to levels/bottom-up/commit-create/start diff --git a/levels/commit-create/win b/levels/bottom-up/commit-create/win similarity index 100% rename from levels/commit-create/win rename to levels/bottom-up/commit-create/win diff --git a/levels/commit-parents/description b/levels/bottom-up/commit-parents/description similarity index 100% rename from levels/commit-parents/description rename to levels/bottom-up/commit-parents/description diff --git a/levels/commit-parents/goal b/levels/bottom-up/commit-parents/goal similarity index 100% rename from levels/commit-parents/goal rename to levels/bottom-up/commit-parents/goal diff --git a/levels/commit-parents/start b/levels/bottom-up/commit-parents/start similarity index 100% rename from levels/commit-parents/start rename to levels/bottom-up/commit-parents/start diff --git a/levels/commit-parents/win b/levels/bottom-up/commit-parents/win similarity index 100% rename from levels/commit-parents/win rename to levels/bottom-up/commit-parents/win diff --git a/levels/commit-rhombus/description b/levels/bottom-up/commit-rhombus/description similarity index 100% rename from levels/commit-rhombus/description rename to levels/bottom-up/commit-rhombus/description diff --git a/levels/commit-rhombus/goal b/levels/bottom-up/commit-rhombus/goal similarity index 100% rename from levels/commit-rhombus/goal rename to levels/bottom-up/commit-rhombus/goal diff --git a/levels/commit-rhombus/start b/levels/bottom-up/commit-rhombus/start similarity index 100% rename from levels/commit-rhombus/start rename to levels/bottom-up/commit-rhombus/start diff --git a/levels/commit-rhombus/win b/levels/bottom-up/commit-rhombus/win similarity index 100% rename from levels/commit-rhombus/win rename to levels/bottom-up/commit-rhombus/win diff --git a/levels/conflict/description b/levels/bottom-up/conflict/description similarity index 100% rename from levels/conflict/description rename to levels/bottom-up/conflict/description diff --git a/levels/conflict/goal b/levels/bottom-up/conflict/goal similarity index 100% rename from levels/conflict/goal rename to levels/bottom-up/conflict/goal diff --git a/levels/conflict/start b/levels/bottom-up/conflict/start similarity index 100% rename from levels/conflict/start rename to levels/bottom-up/conflict/start diff --git a/levels/index-add/congrats b/levels/bottom-up/index-add/congrats similarity index 100% rename from levels/index-add/congrats rename to levels/bottom-up/index-add/congrats diff --git a/levels/index-add/description b/levels/bottom-up/index-add/description similarity index 100% rename from levels/index-add/description rename to levels/bottom-up/index-add/description diff --git a/levels/index-add/goal b/levels/bottom-up/index-add/goal similarity index 100% rename from levels/index-add/goal rename to levels/bottom-up/index-add/goal diff --git a/levels/index-add/start b/levels/bottom-up/index-add/start similarity index 100% rename from levels/index-add/start rename to levels/bottom-up/index-add/start diff --git a/levels/index-add/win b/levels/bottom-up/index-add/win similarity index 100% rename from levels/index-add/win rename to levels/bottom-up/index-add/win diff --git a/levels/index-remove/description b/levels/bottom-up/index-remove/description similarity index 100% rename from levels/index-remove/description rename to levels/bottom-up/index-remove/description diff --git a/levels/index-remove/goal b/levels/bottom-up/index-remove/goal similarity index 100% rename from levels/index-remove/goal rename to levels/bottom-up/index-remove/goal diff --git a/levels/index-remove/start b/levels/bottom-up/index-remove/start similarity index 100% rename from levels/index-remove/start rename to levels/bottom-up/index-remove/start diff --git a/levels/index-remove/win b/levels/bottom-up/index-remove/win similarity index 100% rename from levels/index-remove/win rename to levels/bottom-up/index-remove/win diff --git a/levels/index-update/description b/levels/bottom-up/index-update/description similarity index 100% rename from levels/index-update/description rename to levels/bottom-up/index-update/description diff --git a/levels/index-update/goal b/levels/bottom-up/index-update/goal similarity index 100% rename from levels/index-update/goal rename to levels/bottom-up/index-update/goal diff --git a/levels/index-update/start b/levels/bottom-up/index-update/start similarity index 100% rename from levels/index-update/start rename to levels/bottom-up/index-update/start diff --git a/levels/index-update/win b/levels/bottom-up/index-update/win similarity index 100% rename from levels/index-update/win rename to levels/bottom-up/index-update/win diff --git a/levels/puzzle-apocalypse/description b/levels/bottom-up/puzzle-apocalypse/description similarity index 100% rename from levels/puzzle-apocalypse/description rename to levels/bottom-up/puzzle-apocalypse/description diff --git a/levels/puzzle-apocalypse/goal b/levels/bottom-up/puzzle-apocalypse/goal similarity index 100% rename from levels/puzzle-apocalypse/goal rename to levels/bottom-up/puzzle-apocalypse/goal diff --git a/levels/puzzle-apocalypse/start b/levels/bottom-up/puzzle-apocalypse/start similarity index 100% rename from levels/puzzle-apocalypse/start rename to levels/bottom-up/puzzle-apocalypse/start diff --git a/levels/puzzle-apocalypse/win b/levels/bottom-up/puzzle-apocalypse/win similarity index 100% rename from levels/puzzle-apocalypse/win rename to levels/bottom-up/puzzle-apocalypse/win diff --git a/levels/puzzle-precious-blob/description b/levels/bottom-up/puzzle-precious-blob/description similarity index 100% rename from levels/puzzle-precious-blob/description rename to levels/bottom-up/puzzle-precious-blob/description diff --git a/levels/puzzle-precious-blob/goal b/levels/bottom-up/puzzle-precious-blob/goal similarity index 100% rename from levels/puzzle-precious-blob/goal rename to levels/bottom-up/puzzle-precious-blob/goal diff --git a/levels/puzzle-precious-blob/win b/levels/bottom-up/puzzle-precious-blob/win similarity index 100% rename from levels/puzzle-precious-blob/win rename to levels/bottom-up/puzzle-precious-blob/win diff --git a/levels/puzzle-trees-all-the-way-down/description b/levels/bottom-up/puzzle-trees-all-the-way-down/description similarity index 100% rename from levels/puzzle-trees-all-the-way-down/description rename to levels/bottom-up/puzzle-trees-all-the-way-down/description diff --git a/levels/puzzle-trees-all-the-way-down/goal b/levels/bottom-up/puzzle-trees-all-the-way-down/goal similarity index 100% rename from levels/puzzle-trees-all-the-way-down/goal rename to levels/bottom-up/puzzle-trees-all-the-way-down/goal diff --git a/levels/puzzle-trees-all-the-way-down/win b/levels/bottom-up/puzzle-trees-all-the-way-down/win similarity index 100% rename from levels/puzzle-trees-all-the-way-down/win rename to levels/bottom-up/puzzle-trees-all-the-way-down/win diff --git a/levels/ref-create/description b/levels/bottom-up/ref-create/description similarity index 100% rename from levels/ref-create/description rename to levels/bottom-up/ref-create/description diff --git a/levels/ref-create/goal b/levels/bottom-up/ref-create/goal similarity index 100% rename from levels/ref-create/goal rename to levels/bottom-up/ref-create/goal diff --git a/levels/ref-create/start b/levels/bottom-up/ref-create/start similarity index 100% rename from levels/ref-create/start rename to levels/bottom-up/ref-create/start diff --git a/levels/ref-create/win b/levels/bottom-up/ref-create/win similarity index 100% rename from levels/ref-create/win rename to levels/bottom-up/ref-create/win diff --git a/levels/ref-move/description b/levels/bottom-up/ref-move/description similarity index 100% rename from levels/ref-move/description rename to levels/bottom-up/ref-move/description diff --git a/levels/ref-move/goal b/levels/bottom-up/ref-move/goal similarity index 100% rename from levels/ref-move/goal rename to levels/bottom-up/ref-move/goal diff --git a/levels/ref-move/start b/levels/bottom-up/ref-move/start similarity index 100% rename from levels/ref-move/start rename to levels/bottom-up/ref-move/start diff --git a/levels/ref-move/win b/levels/bottom-up/ref-move/win similarity index 100% rename from levels/ref-move/win rename to levels/bottom-up/ref-move/win diff --git a/levels/ref-remove/description b/levels/bottom-up/ref-remove/description similarity index 100% rename from levels/ref-remove/description rename to levels/bottom-up/ref-remove/description diff --git a/levels/ref-remove/goal b/levels/bottom-up/ref-remove/goal similarity index 100% rename from levels/ref-remove/goal rename to levels/bottom-up/ref-remove/goal diff --git a/levels/ref-remove/start b/levels/bottom-up/ref-remove/start similarity index 100% rename from levels/ref-remove/start rename to levels/bottom-up/ref-remove/start diff --git a/levels/ref-remove/win b/levels/bottom-up/ref-remove/win similarity index 100% rename from levels/ref-remove/win rename to levels/bottom-up/ref-remove/win diff --git a/levels/bottom-up/sequence b/levels/bottom-up/sequence new file mode 100644 index 0000000..5feb0c8 --- /dev/null +++ b/levels/bottom-up/sequence @@ -0,0 +1,18 @@ +welcome +basics +blob-create +blob-remove +index-add +index-remove +index-update +tree-create +tree-read +tree-nested +commit-create +commit-parents +commit-rhombus +ref-create +ref-move +ref-remove +symref-create +symref-no-deref diff --git a/levels/symref-create/description b/levels/bottom-up/symref-create/description similarity index 100% rename from levels/symref-create/description rename to levels/bottom-up/symref-create/description diff --git a/levels/symref-create/goal b/levels/bottom-up/symref-create/goal similarity index 100% rename from levels/symref-create/goal rename to levels/bottom-up/symref-create/goal diff --git a/levels/symref-create/start b/levels/bottom-up/symref-create/start similarity index 100% rename from levels/symref-create/start rename to levels/bottom-up/symref-create/start diff --git a/levels/symref-create/win b/levels/bottom-up/symref-create/win similarity index 100% rename from levels/symref-create/win rename to levels/bottom-up/symref-create/win diff --git a/levels/symref-no-deref/congrats b/levels/bottom-up/symref-no-deref/congrats similarity index 100% rename from levels/symref-no-deref/congrats rename to levels/bottom-up/symref-no-deref/congrats diff --git a/levels/symref-no-deref/description b/levels/bottom-up/symref-no-deref/description similarity index 100% rename from levels/symref-no-deref/description rename to levels/bottom-up/symref-no-deref/description diff --git a/levels/symref-no-deref/goal b/levels/bottom-up/symref-no-deref/goal similarity index 100% rename from levels/symref-no-deref/goal rename to levels/bottom-up/symref-no-deref/goal diff --git a/levels/symref-no-deref/start b/levels/bottom-up/symref-no-deref/start similarity index 100% rename from levels/symref-no-deref/start rename to levels/bottom-up/symref-no-deref/start diff --git a/levels/symref-no-deref/win b/levels/bottom-up/symref-no-deref/win similarity index 100% rename from levels/symref-no-deref/win rename to levels/bottom-up/symref-no-deref/win diff --git a/levels/tree-create/congrats b/levels/bottom-up/tree-create/congrats similarity index 100% rename from levels/tree-create/congrats rename to levels/bottom-up/tree-create/congrats diff --git a/levels/tree-create/description b/levels/bottom-up/tree-create/description similarity index 100% rename from levels/tree-create/description rename to levels/bottom-up/tree-create/description diff --git a/levels/tree-create/goal b/levels/bottom-up/tree-create/goal similarity index 100% rename from levels/tree-create/goal rename to levels/bottom-up/tree-create/goal diff --git a/levels/tree-create/start b/levels/bottom-up/tree-create/start similarity index 100% rename from levels/tree-create/start rename to levels/bottom-up/tree-create/start diff --git a/levels/tree-create/win b/levels/bottom-up/tree-create/win similarity index 100% rename from levels/tree-create/win rename to levels/bottom-up/tree-create/win diff --git a/levels/tree-nested/description b/levels/bottom-up/tree-nested/description similarity index 100% rename from levels/tree-nested/description rename to levels/bottom-up/tree-nested/description diff --git a/levels/tree-nested/goal b/levels/bottom-up/tree-nested/goal similarity index 100% rename from levels/tree-nested/goal rename to levels/bottom-up/tree-nested/goal diff --git a/levels/tree-nested/start b/levels/bottom-up/tree-nested/start similarity index 100% rename from levels/tree-nested/start rename to levels/bottom-up/tree-nested/start diff --git a/levels/tree-nested/win b/levels/bottom-up/tree-nested/win similarity index 100% rename from levels/tree-nested/win rename to levels/bottom-up/tree-nested/win diff --git a/levels/tree-read/description b/levels/bottom-up/tree-read/description similarity index 100% rename from levels/tree-read/description rename to levels/bottom-up/tree-read/description diff --git a/levels/tree-read/goal b/levels/bottom-up/tree-read/goal similarity index 100% rename from levels/tree-read/goal rename to levels/bottom-up/tree-read/goal diff --git a/levels/tree-read/start b/levels/bottom-up/tree-read/start similarity index 100% rename from levels/tree-read/start rename to levels/bottom-up/tree-read/start diff --git a/levels/tree-read/win b/levels/bottom-up/tree-read/win similarity index 100% rename from levels/tree-read/win rename to levels/bottom-up/tree-read/win diff --git a/levels/welcome/congrats b/levels/bottom-up/welcome/congrats similarity index 100% rename from levels/welcome/congrats rename to levels/bottom-up/welcome/congrats diff --git a/levels/welcome/description b/levels/bottom-up/welcome/description similarity index 100% rename from levels/welcome/description rename to levels/bottom-up/welcome/description diff --git a/levels/welcome/goal b/levels/bottom-up/welcome/goal similarity index 100% rename from levels/welcome/goal rename to levels/bottom-up/welcome/goal diff --git a/levels/welcome/start b/levels/bottom-up/welcome/start similarity index 100% rename from levels/welcome/start rename to levels/bottom-up/welcome/start diff --git a/levels/welcome/win b/levels/bottom-up/welcome/win similarity index 100% rename from levels/welcome/win rename to levels/bottom-up/welcome/win diff --git a/levels/top-down/sequence b/levels/top-down/sequence new file mode 100644 index 0000000..97ce6cb --- /dev/null +++ b/levels/top-down/sequence @@ -0,0 +1 @@ +welcome diff --git a/levels/top-down/welcome/description b/levels/top-down/welcome/description new file mode 100644 index 0000000..5a6f52f --- /dev/null +++ b/levels/top-down/welcome/description @@ -0,0 +1 @@ +Hiiii! diff --git a/main.gd b/main.gd index e052a42..2ba1333 100644 --- a/main.gd +++ b/main.gd @@ -2,6 +2,8 @@ extends Control var dragged = null +var level_set = "top-down" +#var level_set = "bottom-up" var current_level = 0 export(NodePath) var terminal_path @@ -42,48 +44,34 @@ func _ready(): func list_levels(): var levels = [] var dir = Directory.new() - dir.open("res://levels") + dir.open("res://levels/%s" % level_set) dir.list_dir_begin() while true: var file = dir.get_next() if file == "": break - elif not file.begins_with("."): + elif not file.begins_with(".") and file != "sequence": levels.append(file) dir.list_dir_end() levels.sort() - var level_sequence = [ - "welcome", - "basics", - "blob-create", - "blob-remove", - "index-add", - "index-remove", - "index-update", - "tree-create", - "tree-read", - "tree-nested", - "commit-create", - "commit-parents", - "commit-rhombus", - "ref-create", - "ref-move", - "ref-remove", - "symref-create", - "symref-no-deref", - ] + var final_level_sequence = [] + + var level_sequence = Array(game.read_file("res://levels/%s/sequence" % level_set, "").split("\n")) for level in level_sequence: + if level == "": + continue if not levels.has(level): push_error("Level '%s' is specified in the sequence, but could not be found" % level) levels.erase(level) + final_level_sequence.push_back(level) - level_sequence += levels + final_level_sequence += levels - return level_sequence + return final_level_sequence func load_level(id): next_level_button.hide() @@ -94,7 +82,7 @@ func load_level(id): var levels = list_levels() var level = levels[id] - var level_prefix = "res://levels/" + var level_prefix = "res://levels/%s/" % level_set var goal_repository_path = "/tmp/goal/" var active_repository_path = "/tmp/active/" diff --git a/text_editor.tscn b/text_editor.tscn index 740122c..37ad8fc 100644 --- a/text_editor.tscn +++ b/text_editor.tscn @@ -19,9 +19,9 @@ anchor_left = 1.0 anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = -117.279 +margin_left = -114.396 margin_top = -59.399 -margin_right = -17.2788 +margin_right = -14.3955 margin_bottom = -14.399 focus_mode = 0 custom_fonts/font = ExtResource( 1 ) @@ -34,9 +34,9 @@ __meta__ = { [node name="CloseButton" type="Button" parent="."] anchor_left = 1.0 anchor_right = 1.0 -margin_left = -50.0 +margin_left = -54.3247 margin_top = 12.0 -margin_right = -10.0 +margin_right = -14.3247 margin_bottom = 52.0 focus_mode = 0 custom_fonts/font = ExtResource( 1 )