From 61304803bcc95fd575cecc6c7995bce67e3b2c23 Mon Sep 17 00:00:00 2001 From: Sebastian Morr Date: Mon, 26 Oct 2020 19:15:47 +0100 Subject: [PATCH] Move all .tscn and .gd files into scenes/ directory --- README.md | 2 +- project.godot | 16 +++++----- arrow.gd => scenes/arrow.gd | 0 arrow.tscn => scenes/arrow.tscn | 11 +++---- card.gd => scenes/card.gd | 2 +- card.tscn => scenes/card.tscn | 29 ++++++++++--------- .../card_particles.tscn | 0 cardgame.gd => scenes/cardgame.gd | 2 +- cardgame.tscn => scenes/cardgame.tscn | 7 +++-- cards.tscn => scenes/cards.tscn | 3 +- chapter.gd => scenes/chapter.gd | 0 drop_area.gd => scenes/drop_area.gd | 0 drop_area.tscn => scenes/drop_area.tscn | 3 +- file_browser.gd => scenes/file_browser.gd | 6 ++-- file_browser.tscn => scenes/file_browser.tscn | 3 +- .../file_browser_item.gd | 0 .../file_browser_item.tscn | 9 +++--- game.gd => scenes/game.gd | 0 helpers.gd => scenes/helpers.gd | 0 level.gd => scenes/level.gd | 0 level_repo.gd => scenes/level_repo.gd | 0 levels.gd => scenes/levels.gd | 0 main.gd => scenes/main.gd | 4 +-- main.tscn => scenes/main.tscn | 6 ++-- node.gd => scenes/node.gd | 2 +- node.tscn => scenes/node.tscn | 23 ++++++++------- player.tscn => scenes/player.tscn | 0 repository.gd => scenes/repository.gd | 2 +- repository.tscn => scenes/repository.tscn | 4 +-- sandbox.gd => scenes/sandbox.gd | 0 sandbox.tscn => scenes/sandbox.tscn | 5 ++-- shell.gd => scenes/shell.gd | 0 tcp_server.gd => scenes/tcp_server.gd | 0 tcp_server.tscn => scenes/tcp_server.tscn | 2 +- terminal.gd => scenes/terminal.gd | 0 terminal.tscn => scenes/terminal.tscn | 21 +++++++------- text_editor.gd => scenes/text_editor.gd | 0 text_editor.tscn => scenes/text_editor.tscn | 3 +- 38 files changed, 88 insertions(+), 77 deletions(-) rename arrow.gd => scenes/arrow.gd (100%) rename arrow.tscn => scenes/arrow.tscn (90%) rename card.gd => scenes/card.gd (97%) rename card.tscn => scenes/card.tscn (91%) rename card_particles.tscn => scenes/card_particles.tscn (100%) rename cardgame.gd => scenes/cardgame.gd (98%) rename cardgame.tscn => scenes/cardgame.tscn (88%) rename cards.tscn => scenes/cards.tscn (93%) rename chapter.gd => scenes/chapter.gd (100%) rename drop_area.gd => scenes/drop_area.gd (100%) rename drop_area.tscn => scenes/drop_area.tscn (88%) rename file_browser.gd => scenes/file_browser.gd (94%) rename file_browser.tscn => scenes/file_browser.tscn (97%) rename file_browser_item.gd => scenes/file_browser_item.gd (100%) rename file_browser_item.tscn => scenes/file_browser_item.tscn (88%) rename game.gd => scenes/game.gd (100%) rename helpers.gd => scenes/helpers.gd (100%) rename level.gd => scenes/level.gd (100%) rename level_repo.gd => scenes/level_repo.gd (100%) rename levels.gd => scenes/levels.gd (100%) rename main.gd => scenes/main.gd (96%) rename main.tscn => scenes/main.tscn (96%) rename node.gd => scenes/node.gd (98%) rename node.tscn => scenes/node.tscn (81%) rename player.tscn => scenes/player.tscn (100%) rename repository.gd => scenes/repository.gd (99%) rename repository.tscn => scenes/repository.tscn (95%) rename sandbox.gd => scenes/sandbox.gd (100%) rename sandbox.tscn => scenes/sandbox.tscn (89%) rename shell.gd => scenes/shell.gd (100%) rename tcp_server.gd => scenes/tcp_server.gd (100%) rename tcp_server.tscn => scenes/tcp_server.tscn (61%) rename terminal.gd => scenes/terminal.gd (100%) rename terminal.tscn => scenes/terminal.tscn (90%) rename text_editor.gd => scenes/text_editor.gd (100%) rename text_editor.tscn => scenes/text_editor.tscn (94%) diff --git a/README.md b/README.md index 2db1a1c..f24a2d0 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Wanna build your own level? Great! Here's how to do it: 1. Download the latest version of the [Godot game engine](https://godotengine.org). 1. Clone this repository. -1. Run the game – the easiest way to do so is to run `godot main.tscn` from the project directory. +1. Run the game – the easiest way to do so is to run `godot scenes/main.tscn` from the project directory. 1. Get a bit familiar with the levels which are currently there. 1. Take a look into the `levels` directory. It's split into chapters, and each level is a file. 1. Make a copy of an existing level or start writing your own. See the documention of the format below. Put your level in the `contrib` chapter. diff --git a/project.godot b/project.godot index 2430475..ef5d2c6 100644 --- a/project.godot +++ b/project.godot @@ -12,22 +12,22 @@ _global_script_classes=[ { "base": "Node", "class": "Chapter", "language": "GDScript", -"path": "res://chapter.gd" +"path": "res://scenes/chapter.gd" }, { "base": "Node", "class": "Level", "language": "GDScript", -"path": "res://level.gd" +"path": "res://scenes/level.gd" }, { "base": "Node", "class": "LevelRepo", "language": "GDScript", -"path": "res://level_repo.gd" +"path": "res://scenes/level_repo.gd" }, { "base": "Node", "class": "Shell", "language": "GDScript", -"path": "res://shell.gd" +"path": "res://scenes/shell.gd" } ] _global_script_class_icons={ "Chapter": "", @@ -39,14 +39,14 @@ _global_script_class_icons={ [application] config/name="git-hydra" -run/main_scene="res://main.tscn" +run/main_scene="res://scenes/main.tscn" config/use_custom_user_dir=true [autoload] -game="*res://game.gd" -helpers="*res://helpers.gd" -levels="*res://levels.gd" +game="*res://scenes/game.gd" +helpers="*res://scenes/helpers.gd" +levels="*res://scenes/levels.gd" [display] diff --git a/arrow.gd b/scenes/arrow.gd similarity index 100% rename from arrow.gd rename to scenes/arrow.gd diff --git a/arrow.tscn b/scenes/arrow.tscn similarity index 90% rename from arrow.tscn rename to scenes/arrow.tscn index 07cfdb5..ff684da 100644 --- a/arrow.tscn +++ b/scenes/arrow.tscn @@ -1,11 +1,12 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://arrow.gd" type="Script" id=1] -[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=2] +[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=1] +[ext_resource path="res://scenes/arrow.gd" type="Script" id=2] + [node name="Arrow" type="Node2D"] show_behind_parent = true -script = ExtResource( 1 ) +script = ExtResource( 2 ) [node name="Line" type="Line2D" parent="."] points = PoolVector2Array( -0.480499, -0.11055, 158.301, 0.581757 ) @@ -37,7 +38,7 @@ margin_left = -19.374 margin_top = -5.93085 margin_right = 20.626 margin_bottom = 8.06915 -custom_fonts/font = ExtResource( 2 ) +custom_fonts/font = ExtResource( 1 ) custom_colors/font_color = Color( 1, 1, 1, 1 ) text = "label" align = 1 @@ -50,7 +51,7 @@ margin_left = -230.84 margin_top = 42.1225 margin_right = 231.16 margin_bottom = 68.1225 -custom_fonts/font = ExtResource( 2 ) +custom_fonts/font = ExtResource( 1 ) custom_colors/font_color = Color( 0.356863, 0.356863, 0.356863, 1 ) text = "label" align = 1 diff --git a/card.gd b/scenes/card.gd similarity index 97% rename from card.gd rename to scenes/card.gd index ab948e2..98161d5 100644 --- a/card.gd +++ b/scenes/card.gd @@ -110,7 +110,7 @@ func dropped_on(other): func try_play(command): if game.energy >= energy: $PlaySound.play() - var particles = preload("res://card_particles.tscn").instance() + var particles = preload("res://scenes/card_particles.tscn").instance() particles.position = position get_parent().add_child(particles) $"../../..".terminal.send_command(command) diff --git a/card.tscn b/scenes/card.tscn similarity index 91% rename from card.tscn rename to scenes/card.tscn index 6700441..9284a2d 100644 --- a/card.tscn +++ b/scenes/card.tscn @@ -1,11 +1,12 @@ [gd_scene load_steps=10 format=2] -[ext_resource path="res://card.gd" type="Script" id=1] -[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=2] -[ext_resource path="res://nodes/blob.svg" type="Texture" id=3] -[ext_resource path="res://sounds/poof.wav" type="AudioStream" id=4] -[ext_resource path="res://sounds/swish.wav" type="AudioStream" id=5] -[ext_resource path="res://sounds/swoosh.wav" type="AudioStream" id=6] +[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=1] +[ext_resource path="res://nodes/blob.svg" type="Texture" id=2] +[ext_resource path="res://scenes/card.gd" type="Script" id=3] +[ext_resource path="res://sounds/swish.wav" type="AudioStream" id=4] +[ext_resource path="res://sounds/swoosh.wav" type="AudioStream" id=5] +[ext_resource path="res://sounds/poof.wav" type="AudioStream" id=6] + [sub_resource type="StyleBoxFlat" id=1] bg_color = Color( 0.45098, 0.584314, 0.843137, 1 ) @@ -31,7 +32,7 @@ corner_radius_bottom_left = 10 [node name="Card" type="Node2D" groups=[ "cards", ]] -script = ExtResource( 1 ) +script = ExtResource( 3 ) [node name="Panel" type="Panel" parent="."] margin_left = -105.0 @@ -68,7 +69,7 @@ margin_left = -89.0 margin_top = -276.0 margin_right = 85.0 margin_bottom = -185.0 -custom_fonts/font = ExtResource( 2 ) +custom_fonts/font = ExtResource( 1 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) text = "Name" autowrap = true @@ -93,7 +94,7 @@ margin_top = -164.0 margin_right = 133.0 margin_bottom = 23.0 rect_scale = Vector2( 0.75, 0.75 ) -custom_fonts/font = ExtResource( 2 ) +custom_fonts/font = ExtResource( 1 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) text = "Description" autowrap = true @@ -105,7 +106,7 @@ __meta__ = { visible = false position = Vector2( -103.288, -287.778 ) scale = Vector2( 0.542341, 0.542341 ) -texture = ExtResource( 3 ) +texture = ExtResource( 2 ) [node name="Energy" type="Label" parent="Sprite"] margin_left = -51.1637 @@ -113,7 +114,7 @@ margin_top = -47.4558 margin_right = -17.1637 margin_bottom = -16.4558 rect_scale = Vector2( 3, 3 ) -custom_fonts/font = ExtResource( 2 ) +custom_fonts/font = ExtResource( 1 ) text = "0" align = 1 valign = 1 @@ -122,14 +123,14 @@ __meta__ = { } [node name="PickupSound" type="AudioStreamPlayer" parent="."] -stream = ExtResource( 5 ) +stream = ExtResource( 4 ) [node name="PlaySound" type="AudioStreamPlayer" parent="."] -stream = ExtResource( 4 ) +stream = ExtResource( 6 ) volume_db = -6.848 [node name="ReturnSound" type="AudioStreamPlayer" parent="."] -stream = ExtResource( 6 ) +stream = ExtResource( 5 ) volume_db = -6.848 [connection signal="mouse_entered" from="Area2D" to="." method="_mouse_entered"] [connection signal="mouse_exited" from="Area2D" to="." method="_mouse_exited"] diff --git a/card_particles.tscn b/scenes/card_particles.tscn similarity index 100% rename from card_particles.tscn rename to scenes/card_particles.tscn diff --git a/cardgame.gd b/scenes/cardgame.gd similarity index 98% rename from cardgame.gd rename to scenes/cardgame.gd index 89774b4..88e0618 100644 --- a/cardgame.gd +++ b/scenes/cardgame.gd @@ -172,7 +172,7 @@ func draw_rand_card(): draw_card(card) func draw_card(card): - var new_card = preload("res://card.tscn").instance() + var new_card = preload("res://scenes/card.tscn").instance() new_card.command = card.command new_card.arg_number = card.arg_number diff --git a/cardgame.tscn b/scenes/cardgame.tscn similarity index 88% rename from cardgame.tscn rename to scenes/cardgame.tscn index be03722..7dc69d0 100644 --- a/cardgame.tscn +++ b/scenes/cardgame.tscn @@ -1,11 +1,12 @@ [gd_scene load_steps=6 format=2] [ext_resource path="res://fonts/default.tres" type="DynamicFont" id=1] -[ext_resource path="res://repository.tscn" type="PackedScene" id=3] -[ext_resource path="res://cardgame.gd" type="Script" id=4] -[ext_resource path="res://terminal.tscn" type="PackedScene" id=5] +[ext_resource path="res://scenes/repository.tscn" type="PackedScene" id=3] +[ext_resource path="res://scenes/cardgame.gd" type="Script" id=4] +[ext_resource path="res://scenes/terminal.tscn" type="PackedScene" id=5] [ext_resource path="res://fonts/big.tres" type="DynamicFont" id=6] + [node name="Cardgame" type="Node2D"] script = ExtResource( 4 ) diff --git a/cards.tscn b/scenes/cards.tscn similarity index 93% rename from cards.tscn rename to scenes/cards.tscn index 08b3248..6179203 100644 --- a/cards.tscn +++ b/scenes/cards.tscn @@ -2,7 +2,8 @@ [ext_resource path="res://fonts/default.tres" type="DynamicFont" id=1] [ext_resource path="res://fonts/big.tres" type="DynamicFont" id=2] -[ext_resource path="res://cardgame.gd" type="Script" id=3] +[ext_resource path="res://scenes/cardgame.gd" type="Script" id=3] + [node name="Cards" type="Control"] anchor_right = 1.0 diff --git a/chapter.gd b/scenes/chapter.gd similarity index 100% rename from chapter.gd rename to scenes/chapter.gd diff --git a/drop_area.gd b/scenes/drop_area.gd similarity index 100% rename from drop_area.gd rename to scenes/drop_area.gd diff --git a/drop_area.tscn b/scenes/drop_area.tscn similarity index 88% rename from drop_area.tscn rename to scenes/drop_area.tscn index fc24c71..1ee8eb4 100644 --- a/drop_area.tscn +++ b/scenes/drop_area.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://drop_area.gd" type="Script" id=1] +[ext_resource path="res://scenes/drop_area.gd" type="Script" id=1] + [sub_resource type="CircleShape2D" id=1] radius = 23.5871 diff --git a/file_browser.gd b/scenes/file_browser.gd similarity index 94% rename from file_browser.gd rename to scenes/file_browser.gd index a4643cc..6776e3d 100644 --- a/file_browser.gd +++ b/scenes/file_browser.gd @@ -50,7 +50,7 @@ func update(): file_path = file_path.substr(2) if file_path.substr(0, 5) == ".git/": continue - var item = preload("res://file_browser_item.tscn").instance() + var item = preload("res://scenes/file_browser_item.tscn").instance() item.label = file_path item.connect("clicked", self, "item_clicked") grid.add_child(item) @@ -60,7 +60,7 @@ func update(): # The last entry is an empty string, remove it. files.pop_back() for file_path in files: - var item = preload("res://file_browser_item.tscn").instance() + var item = preload("res://scenes/file_browser_item.tscn").instance() item.label = file_path item.connect("clicked", self, "item_clicked") grid.add_child(item) @@ -70,7 +70,7 @@ func update(): # The last entry is an empty string, remove it. files.pop_back() for file_path in files: - var item = preload("res://file_browser_item.tscn").instance() + var item = preload("res://scenes/file_browser_item.tscn").instance() item.label = file_path item.connect("clicked", self, "item_clicked") grid.add_child(item) diff --git a/file_browser.tscn b/scenes/file_browser.tscn similarity index 97% rename from file_browser.tscn rename to scenes/file_browser.tscn index 5b832b4..34f63ae 100644 --- a/file_browser.tscn +++ b/scenes/file_browser.tscn @@ -1,9 +1,10 @@ [gd_scene load_steps=4 format=2] -[ext_resource path="res://file_browser.gd" type="Script" id=1] +[ext_resource path="res://scenes/file_browser.gd" type="Script" id=1] [ext_resource path="res://fonts/default.tres" type="DynamicFont" id=2] [ext_resource path="res://styles/theme.tres" type="Theme" id=3] + [node name="FileBrowser" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 diff --git a/file_browser_item.gd b/scenes/file_browser_item.gd similarity index 100% rename from file_browser_item.gd rename to scenes/file_browser_item.gd diff --git a/file_browser_item.tscn b/scenes/file_browser_item.tscn similarity index 88% rename from file_browser_item.tscn rename to scenes/file_browser_item.tscn index 5fcec84..5991c1e 100644 --- a/file_browser_item.tscn +++ b/scenes/file_browser_item.tscn @@ -1,7 +1,8 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=1] -[ext_resource path="res://file_browser_item.gd" type="Script" id=2] +[ext_resource path="res://scenes/file_browser_item.gd" type="Script" id=1] +[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=2] + [node name="Control" type="Control"] anchor_right = 0.052 @@ -9,7 +10,7 @@ anchor_bottom = 0.093 margin_right = 100.16 margin_bottom = -0.439995 rect_min_size = Vector2( 150, 100 ) -script = ExtResource( 2 ) +script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false } @@ -47,6 +48,6 @@ __meta__ = { margin_top = 75.0 margin_right = 200.0 margin_bottom = 100.0 -custom_fonts/font = ExtResource( 1 ) +custom_fonts/font = ExtResource( 2 ) text = "filename" align = 1 diff --git a/game.gd b/scenes/game.gd similarity index 100% rename from game.gd rename to scenes/game.gd diff --git a/helpers.gd b/scenes/helpers.gd similarity index 100% rename from helpers.gd rename to scenes/helpers.gd diff --git a/level.gd b/scenes/level.gd similarity index 100% rename from level.gd rename to scenes/level.gd diff --git a/level_repo.gd b/scenes/level_repo.gd similarity index 100% rename from level_repo.gd rename to scenes/level_repo.gd diff --git a/levels.gd b/scenes/levels.gd similarity index 100% rename from levels.gd rename to scenes/levels.gd diff --git a/main.gd b/scenes/main.gd similarity index 96% rename from main.gd rename to scenes/main.gd index 6e3e65a..ec7df2b 100644 --- a/main.gd +++ b/scenes/main.gd @@ -22,7 +22,7 @@ func _ready(): var args = helpers.parse_args() if args.has("sandbox"): - var err = get_tree().change_scene("res://sandbox.tscn") + var err = get_tree().change_scene("res://scenes/sandbox.tscn") if err != OK: helpers.crash("Could not change to sandbox scene") return @@ -73,7 +73,7 @@ func load_level(level_id): for r in repo_names: var repo = level.repos[r] - var new_repo = preload("res://repository.tscn").instance() + var new_repo = preload("res://scenes/repository.tscn").instance() new_repo.path = repo.path new_repo.label = repo.slug new_repo.size_flags_horizontal = SIZE_EXPAND_FILL diff --git a/main.tscn b/scenes/main.tscn similarity index 96% rename from main.tscn rename to scenes/main.tscn index 4a6624b..594deb5 100644 --- a/main.tscn +++ b/scenes/main.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=9 format=2] -[ext_resource path="res://terminal.tscn" type="PackedScene" id=1] -[ext_resource path="res://main.gd" type="Script" id=2] -[ext_resource path="res://cards.tscn" type="PackedScene" id=3] +[ext_resource path="res://scenes/terminal.tscn" type="PackedScene" id=1] +[ext_resource path="res://scenes/main.gd" type="Script" id=2] +[ext_resource path="res://scenes/cards.tscn" type="PackedScene" id=3] [ext_resource path="res://styles/alert_button.tres" type="StyleBox" id=4] [ext_resource path="res://styles/theme.tres" type="Theme" id=6] [ext_resource path="res://fonts/big.tres" type="DynamicFont" id=7] diff --git a/node.gd b/scenes/node.gd similarity index 98% rename from node.gd rename to scenes/node.gd index 2527d8e..1a5a382 100644 --- a/node.gd +++ b/scenes/node.gd @@ -13,7 +13,7 @@ var id_always_visible = false var held = false var hovered = false -var arrow = preload("res://arrow.tscn") +var arrow = preload("res://scenes/arrow.tscn") func _ready(): content_set(content) diff --git a/node.tscn b/scenes/node.tscn similarity index 81% rename from node.tscn rename to scenes/node.tscn index e09bc3f..5a47c6e 100644 --- a/node.tscn +++ b/scenes/node.tscn @@ -1,11 +1,12 @@ [gd_scene load_steps=9 format=2] -[ext_resource path="res://node.gd" type="Script" id=1] -[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=2] +[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=1] +[ext_resource path="res://scenes/node.gd" type="Script" id=2] [ext_resource path="res://nodes/blob.svg" type="Texture" id=3] -[ext_resource path="res://nodes/pop.wav" type="AudioStream" id=4] -[ext_resource path="res://drop_area.tscn" type="PackedScene" id=5] -[ext_resource path="res://file_browser.tscn" type="PackedScene" id=6] +[ext_resource path="res://scenes/file_browser.tscn" type="PackedScene" id=4] +[ext_resource path="res://nodes/pop.wav" type="AudioStream" id=5] +[ext_resource path="res://scenes/drop_area.tscn" type="PackedScene" id=6] + [sub_resource type="CircleShape2D" id=1] radius = 23.6295 @@ -22,7 +23,7 @@ corner_radius_bottom_right = 5 corner_radius_bottom_left = 5 [node name="Node" type="Node2D"] -script = ExtResource( 1 ) +script = ExtResource( 2 ) [node name="Arrows" type="Node2D" parent="."] @@ -48,7 +49,7 @@ margin_left = -19.9265 margin_top = -12.0097 margin_right = 129.073 margin_bottom = 40.9903 -custom_fonts/font = ExtResource( 2 ) +custom_fonts/font = ExtResource( 1 ) custom_colors/font_color = Color( 1, 1, 1, 1 ) text = "object_id" __meta__ = { @@ -56,9 +57,9 @@ __meta__ = { } [node name="Pop" type="AudioStreamPlayer2D" parent="."] -stream = ExtResource( 4 ) +stream = ExtResource( 5 ) -[node name="DropArea" parent="." instance=ExtResource( 5 )] +[node name="DropArea" parent="." instance=ExtResource( 6 )] [node name="Area2D" type="Area2D" parent="."] @@ -75,7 +76,7 @@ margin_top = -22.8078 margin_right = 41.3944 margin_bottom = 12.1922 custom_styles/normal = SubResource( 2 ) -custom_fonts/font = ExtResource( 2 ) +custom_fonts/font = ExtResource( 1 ) custom_colors/font_color = Color( 1, 1, 1, 1 ) __meta__ = { "_edit_use_anchors_": false @@ -84,7 +85,7 @@ __meta__ = { [node name="OnTop" type="Node2D" parent="."] z_index = 2 -[node name="FileBrowser" parent="OnTop" instance=ExtResource( 6 )] +[node name="FileBrowser" parent="OnTop" instance=ExtResource( 4 )] visible = false anchor_right = 0.0 anchor_bottom = 0.0 diff --git a/player.tscn b/scenes/player.tscn similarity index 100% rename from player.tscn rename to scenes/player.tscn diff --git a/repository.gd b/scenes/repository.gd similarity index 99% rename from repository.gd rename to scenes/repository.gd index 7c1d869..4180213 100644 --- a/repository.gd +++ b/scenes/repository.gd @@ -13,7 +13,7 @@ export var file_browser_active = true setget set_file_browser_active export var simplified_view = false setget set_simplified_view export var editable_path = false setget set_editable_path -var node = preload("res://node.tscn") +var node = preload("res://scenes/node.tscn") var shell = Shell.new() var objects = {} diff --git a/repository.tscn b/scenes/repository.tscn similarity index 95% rename from repository.tscn rename to scenes/repository.tscn index 4d8c079..2df5d72 100644 --- a/repository.tscn +++ b/scenes/repository.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=5 format=2] -[ext_resource path="res://repository.gd" type="Script" id=1] +[ext_resource path="res://scenes/repository.gd" type="Script" id=1] [ext_resource path="res://styles/theme.tres" type="Theme" id=2] [ext_resource path="res://fonts/big.tres" type="DynamicFont" id=3] -[ext_resource path="res://file_browser.tscn" type="PackedScene" id=4] +[ext_resource path="res://scenes/file_browser.tscn" type="PackedScene" id=4] [node name="Repository" type="Control"] anchor_right = 1.0 diff --git a/sandbox.gd b/scenes/sandbox.gd similarity index 100% rename from sandbox.gd rename to scenes/sandbox.gd diff --git a/sandbox.tscn b/scenes/sandbox.tscn similarity index 89% rename from sandbox.tscn rename to scenes/sandbox.tscn index a6d25d5..719d96c 100644 --- a/sandbox.tscn +++ b/scenes/sandbox.tscn @@ -1,10 +1,11 @@ [gd_scene load_steps=5 format=2] -[ext_resource path="res://terminal.tscn" type="PackedScene" id=1] -[ext_resource path="res://repository.tscn" type="PackedScene" id=2] +[ext_resource path="res://scenes/terminal.tscn" type="PackedScene" id=1] +[ext_resource path="res://scenes/repository.tscn" type="PackedScene" id=2] [ext_resource path="res://styles/theme.tres" type="Theme" id=3] [ext_resource path="res://sandbox.gd" type="Script" id=4] + [node name="Sandbox" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 diff --git a/shell.gd b/scenes/shell.gd similarity index 100% rename from shell.gd rename to scenes/shell.gd diff --git a/tcp_server.gd b/scenes/tcp_server.gd similarity index 100% rename from tcp_server.gd rename to scenes/tcp_server.gd diff --git a/tcp_server.tscn b/scenes/tcp_server.tscn similarity index 61% rename from tcp_server.tscn rename to scenes/tcp_server.tscn index ad994e6..b33cb3b 100644 --- a/tcp_server.tscn +++ b/scenes/tcp_server.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://tcp_server.gd" type="Script" id=1] +[ext_resource path="res://scenes/tcp_server.gd" type="Script" id=1] [node name="TCPServer" type="Node"] script = ExtResource( 1 ) diff --git a/terminal.gd b/scenes/terminal.gd similarity index 100% rename from terminal.gd rename to scenes/terminal.gd diff --git a/terminal.tscn b/scenes/terminal.tscn similarity index 90% rename from terminal.tscn rename to scenes/terminal.tscn index b524ec7..b3f53e9 100644 --- a/terminal.tscn +++ b/scenes/terminal.tscn @@ -1,12 +1,13 @@ [gd_scene load_steps=10 format=2] [ext_resource path="res://fonts/default.tres" type="DynamicFont" id=1] -[ext_resource path="res://terminal.gd" type="Script" id=2] -[ext_resource path="res://tcp_server.tscn" type="PackedScene" id=3] -[ext_resource path="res://fonts/monospace.tres" type="DynamicFont" id=4] -[ext_resource path="res://text_editor.tscn" type="PackedScene" id=5] +[ext_resource path="res://sounds/typewriter_ding.wav" type="AudioStream" id=2] +[ext_resource path="res://fonts/monospace.tres" type="DynamicFont" id=3] +[ext_resource path="res://scenes/terminal.gd" type="Script" id=4] +[ext_resource path="res://scenes/text_editor.tscn" type="PackedScene" id=5] +[ext_resource path="res://scenes/tcp_server.tscn" type="PackedScene" id=6] [ext_resource path="res://sounds/buzzer.wav" type="AudioStream" id=7] -[ext_resource path="res://sounds/typewriter_ding.wav" type="AudioStream" id=8] + [sub_resource type="StyleBoxFlat" id=1] content_margin_left = 5.0 @@ -34,7 +35,7 @@ func pressed(): anchor_right = 1.0 anchor_bottom = 1.0 mouse_filter = 1 -script = ExtResource( 2 ) +script = ExtResource( 4 ) __meta__ = { "_edit_use_anchors_": false } @@ -58,7 +59,7 @@ margin_top = -1.92206 margin_bottom = -1.92212 size_flags_vertical = 3 custom_styles/normal = SubResource( 1 ) -custom_fonts/normal_font = ExtResource( 4 ) +custom_fonts/normal_font = ExtResource( 3 ) scroll_following = true __meta__ = { "_edit_use_anchors_": false @@ -135,7 +136,7 @@ visible = false mouse_filter = 1 syntax_highlighting = false -[node name="TCPServer" parent="." instance=ExtResource( 3 )] +[node name="TCPServer" parent="." instance=ExtResource( 6 )] [node name="Pager" type="WindowDialog" parent="."] anchor_right = 1.0 @@ -151,7 +152,7 @@ __meta__ = { [node name="Text" type="RichTextLabel" parent="Pager"] anchor_right = 1.0 anchor_bottom = 1.0 -custom_fonts/normal_font = ExtResource( 4 ) +custom_fonts/normal_font = ExtResource( 3 ) __meta__ = { "_edit_use_anchors_": false } @@ -160,7 +161,7 @@ __meta__ = { stream = ExtResource( 7 ) [node name="OkSound" type="AudioStreamPlayer" parent="."] -stream = ExtResource( 8 ) +stream = ExtResource( 2 ) [connection signal="item_selected" from="Rows/TopHalf/Completions" to="." method="_completion_selected"] [connection signal="pressed" from="Rows/VBoxContainer/Button" to="Rows/VBoxContainer/Button" method="pressed"] [connection signal="pressed" from="Rows/VBoxContainer/Button2" to="Rows/VBoxContainer/Button2" method="pressed"] diff --git a/text_editor.gd b/scenes/text_editor.gd similarity index 100% rename from text_editor.gd rename to scenes/text_editor.gd diff --git a/text_editor.tscn b/scenes/text_editor.tscn similarity index 94% rename from text_editor.tscn rename to scenes/text_editor.tscn index 37ad8fc..d94a5b4 100644 --- a/text_editor.tscn +++ b/scenes/text_editor.tscn @@ -1,7 +1,8 @@ [gd_scene load_steps=3 format=2] [ext_resource path="res://fonts/default.tres" type="DynamicFont" id=1] -[ext_resource path="res://text_editor.gd" type="Script" id=2] +[ext_resource path="res://scenes/text_editor.gd" type="Script" id=2] + [node name="TextEditor" type="TextEdit"] anchor_right = 1.0