From 99b28ecfa33a2e7c359cf97dffc6101e950f7671 Mon Sep 17 00:00:00 2001 From: Antti Hakkarainen Date: Sat, 18 Feb 2023 10:45:19 +0200 Subject: [PATCH] move source files to separate folders --- project.godot | 2 +- scenes/Building.tscn | 2 +- scenes/Camera.tscn | 4 +- scenes/Main.tscn | 56 ++++++++++----------- scenes/MainMenu.tscn | 4 +- {scripts => source}/Building.gd | 0 {scripts => source}/EventBus.gd | 0 {scripts => source}/Globals.gd | 0 {scripts => source}/Main.gd | 0 {scripts => source}/WorldGenerator.gd | 0 {scripts => source/camera}/Camera.gd | 0 {scripts => source/game}/Chunk.gd | 0 {scripts => source/game}/ChunkHandler.gd | 0 {scripts => source/game}/Game.gd | 0 {scripts => source/game}/MapBackground.gd | 0 {scripts => source/game}/Simulation.gd | 0 {scripts => source/infolayer}/InfoLayer.gd | 0 {scripts => source/mainmenu}/MainMenu.gd | 0 {scripts => source/uilayer}/CameraMarker.gd | 0 {scripts => source/uilayer}/Control.gd | 0 {scripts => source/uilayer}/EntityPlacer.gd | 0 {scripts => source/uilayer}/Minimap.gd | 0 {scripts => source/uilayer}/UILayer.gd | 0 23 files changed, 34 insertions(+), 34 deletions(-) rename {scripts => source}/Building.gd (100%) rename {scripts => source}/EventBus.gd (100%) rename {scripts => source}/Globals.gd (100%) rename {scripts => source}/Main.gd (100%) rename {scripts => source}/WorldGenerator.gd (100%) rename {scripts => source/camera}/Camera.gd (100%) rename {scripts => source/game}/Chunk.gd (100%) rename {scripts => source/game}/ChunkHandler.gd (100%) rename {scripts => source/game}/Game.gd (100%) rename {scripts => source/game}/MapBackground.gd (100%) rename {scripts => source/game}/Simulation.gd (100%) rename {scripts => source/infolayer}/InfoLayer.gd (100%) rename {scripts => source/mainmenu}/MainMenu.gd (100%) rename {scripts => source/uilayer}/CameraMarker.gd (100%) rename {scripts => source/uilayer}/Control.gd (100%) rename {scripts => source/uilayer}/EntityPlacer.gd (100%) rename {scripts => source/uilayer}/Minimap.gd (100%) rename {scripts => source/uilayer}/UILayer.gd (100%) diff --git a/project.godot b/project.godot index 395b135..9bf1a01 100644 --- a/project.godot +++ b/project.godot @@ -17,7 +17,7 @@ config/icon="res://icon.svg" [autoload] -Globals="*res://scripts/Globals.gd" +Globals="*res://source/Globals.gd" [debug] diff --git a/scenes/Building.tscn b/scenes/Building.tscn index 73e804e..fb05471 100644 --- a/scenes/Building.tscn +++ b/scenes/Building.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3] [ext_resource type="Texture2D" uid="uid://cxn2fno1j7vf5" path="res://icon.svg" id="1_pe5ue"] -[ext_resource type="Script" path="res://scripts/Building.gd" id="1_uqlnt"] +[ext_resource type="Script" path="res://source/Building.gd" id="1_uqlnt"] [node name="Building" type="Sprite2D"] texture = ExtResource("1_pe5ue") diff --git a/scenes/Camera.tscn b/scenes/Camera.tscn index 02a90c9..b57cf39 100644 --- a/scenes/Camera.tscn +++ b/scenes/Camera.tscn @@ -1,6 +1,6 @@ -[gd_scene load_steps=2 format=3 uid="uid://bwki262totuo4"] +[gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://scripts/Camera.gd" id="1_ttsl2"] +[ext_resource type="Script" path="res://source/camera/Camera.gd" id="1_ttsl2"] [node name="Camera" type="Camera2D"] position = Vector2(1288, 720) diff --git a/scenes/Main.tscn b/scenes/Main.tscn index eb72337..b628a79 100644 --- a/scenes/Main.tscn +++ b/scenes/Main.tscn @@ -1,66 +1,66 @@ -[gd_scene load_steps=15 format=3 uid="uid://c5deq5s55q0ii"] +[gd_scene load_steps=15 format=3 uid="uid://b2jnn81mmg5wt"] -[ext_resource type="Script" path="res://scripts/Main.gd" id="1_ysxum"] -[ext_resource type="Script" path="res://scripts/EventBus.gd" id="2_0j1ud"] -[ext_resource type="Script" path="res://scripts/ChunkHandler.gd" id="2_6cequ"] -[ext_resource type="PackedScene" uid="uid://dq7jmiqon170p" path="res://scenes/MainMenu.tscn" id="2_wfpe2"] -[ext_resource type="Script" path="res://scripts/Control.gd" id="3_1t1c8"] -[ext_resource type="Script" path="res://scripts/Camera.gd" id="3_15x8g"] -[ext_resource type="Script" path="res://scripts/Game.gd" id="4_4tr6y"] -[ext_resource type="Script" path="res://scripts/Simulation.gd" id="5_0dxab"] -[ext_resource type="Script" path="res://scripts/EntityPlacer.gd" id="5_8jju5"] -[ext_resource type="Script" path="res://scripts/Minimap.gd" id="5_rg28x"] -[ext_resource type="Script" path="res://scripts/CameraMarker.gd" id="7_6krn1"] -[ext_resource type="Script" path="res://scripts/MapBackground.gd" id="8_ron2j"] -[ext_resource type="Script" path="res://scripts/UILayer.gd" id="9_ebec0"] -[ext_resource type="Script" path="res://scripts/InfoLayer.gd" id="14_hbedy"] +[ext_resource type="Script" path="res://source/Main.gd" id="1_vnd1v"] +[ext_resource type="Script" path="res://source/EventBus.gd" id="2_qhcs8"] +[ext_resource type="PackedScene" path="res://scenes/MainMenu.tscn" id="2_wfpe2"] +[ext_resource type="Script" path="res://source/camera/Camera.gd" id="3_4khcd"] +[ext_resource type="Script" path="res://source/game/Game.gd" id="4_3cif6"] +[ext_resource type="Script" path="res://source/game/Simulation.gd" id="5_hkn6c"] +[ext_resource type="Script" path="res://source/game/ChunkHandler.gd" id="6_bwq3e"] +[ext_resource type="Script" path="res://source/game/MapBackground.gd" id="7_nh2ol"] +[ext_resource type="Script" path="res://source/infolayer/InfoLayer.gd" id="9_dg6uy"] +[ext_resource type="Script" path="res://source/uilayer/UILayer.gd" id="10_l2a8p"] +[ext_resource type="Script" path="res://source/EntityPlacer.gd" id="11_rf6kr"] +[ext_resource type="Script" path="res://source/uilayer/Control.gd" id="12_vhsyq"] +[ext_resource type="Script" path="res://source/uilayer/Minimap.gd" id="13_80u53"] +[ext_resource type="Script" path="res://source/uilayer/CameraMarker.gd" id="14_rvt3n"] [node name="Main" type="Node"] -script = ExtResource("1_ysxum") +script = ExtResource("1_vnd1v") [node name="EventBus" type="Node" parent="."] process_mode = 3 -script = ExtResource("2_0j1ud") +script = ExtResource("2_qhcs8") [node name="Camera" type="Camera2D" parent="EventBus"] process_mode = 1 position = Vector2(1280, 720) ignore_rotation = false -script = ExtResource("3_15x8g") +script = ExtResource("3_4khcd") [node name="Game" type="Node2D" parent="EventBus"] process_mode = 1 visible = false -script = ExtResource("4_4tr6y") +script = ExtResource("4_3cif6") [node name="Simulation" type="Node" parent="EventBus/Game"] -script = ExtResource("5_0dxab") +script = ExtResource("5_hkn6c") [node name="ChunkHandler" type="Node2D" parent="EventBus/Game"] -script = ExtResource("2_6cequ") +script = ExtResource("6_bwq3e") [node name="MapBackground" type="Sprite2D" parent="EventBus/Game"] z_index = -1 centered = false -script = ExtResource("8_ron2j") +script = ExtResource("7_nh2ol") [node name="MainMenu" parent="EventBus" instance=ExtResource("2_wfpe2")] [node name="InfoLayer" type="Node2D" parent="EventBus"] visible = false -script = ExtResource("14_hbedy") +script = ExtResource("9_dg6uy") [node name="UILayer" type="CanvasLayer" parent="EventBus"] process_mode = 1 visible = false -script = ExtResource("9_ebec0") +script = ExtResource("10_l2a8p") [node name="EntityPlacer" type="Control" parent="EventBus/UILayer"] layout_mode = 3 anchors_preset = 0 offset_right = 40.0 offset_bottom = 40.0 -script = ExtResource("5_8jju5") +script = ExtResource("11_rf6kr") [node name="Control" type="Control" parent="EventBus/UILayer"] layout_mode = 3 @@ -70,7 +70,7 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 mouse_filter = 1 -script = ExtResource("3_1t1c8") +script = ExtResource("12_vhsyq") metadata/_edit_use_anchors_ = true [node name="ConstructionPanel" type="Panel" parent="EventBus/UILayer/Control"] @@ -146,13 +146,13 @@ offset_top = -512.0 grow_horizontal = 0 grow_vertical = 0 mouse_filter = 1 -script = ExtResource("5_rg28x") +script = ExtResource("13_80u53") [node name="CameraMarker" type="Sprite2D" parent="EventBus/UILayer/Control/Minimap"] z_index = 10 position = Vector2(-32, 0) centered = false -script = ExtResource("7_6krn1") +script = ExtResource("14_rvt3n") [node name="MinimapSprite" type="Sprite2D" parent="EventBus/UILayer/Control/Minimap"] texture_repeat = 1 diff --git a/scenes/MainMenu.tscn b/scenes/MainMenu.tscn index 20459d4..6ce8faf 100644 --- a/scenes/MainMenu.tscn +++ b/scenes/MainMenu.tscn @@ -1,7 +1,7 @@ -[gd_scene load_steps=5 format=3 uid="uid://dq7jmiqon170p"] +[gd_scene load_steps=5 format=3] [ext_resource type="Theme" uid="uid://clswkwdkqsx87" path="res://themes/mainmenu_button_theme.tres" id="1_jy0t0"] -[ext_resource type="Script" path="res://scripts/MainMenu.gd" id="1_rpwyu"] +[ext_resource type="Script" path="res://source/mainmenu/MainMenu.gd" id="1_rpwyu"] [ext_resource type="Texture2D" uid="uid://ccbum282wlrrj" path="res://art/backgrounds/mainmenu_background.png" id="2_7rmv5"] [ext_resource type="Texture2D" uid="uid://jsnvlmenolg8" path="res://art/logos/mainmenu_logo.png" id="3_etjlt"] diff --git a/scripts/Building.gd b/source/Building.gd similarity index 100% rename from scripts/Building.gd rename to source/Building.gd diff --git a/scripts/EventBus.gd b/source/EventBus.gd similarity index 100% rename from scripts/EventBus.gd rename to source/EventBus.gd diff --git a/scripts/Globals.gd b/source/Globals.gd similarity index 100% rename from scripts/Globals.gd rename to source/Globals.gd diff --git a/scripts/Main.gd b/source/Main.gd similarity index 100% rename from scripts/Main.gd rename to source/Main.gd diff --git a/scripts/WorldGenerator.gd b/source/WorldGenerator.gd similarity index 100% rename from scripts/WorldGenerator.gd rename to source/WorldGenerator.gd diff --git a/scripts/Camera.gd b/source/camera/Camera.gd similarity index 100% rename from scripts/Camera.gd rename to source/camera/Camera.gd diff --git a/scripts/Chunk.gd b/source/game/Chunk.gd similarity index 100% rename from scripts/Chunk.gd rename to source/game/Chunk.gd diff --git a/scripts/ChunkHandler.gd b/source/game/ChunkHandler.gd similarity index 100% rename from scripts/ChunkHandler.gd rename to source/game/ChunkHandler.gd diff --git a/scripts/Game.gd b/source/game/Game.gd similarity index 100% rename from scripts/Game.gd rename to source/game/Game.gd diff --git a/scripts/MapBackground.gd b/source/game/MapBackground.gd similarity index 100% rename from scripts/MapBackground.gd rename to source/game/MapBackground.gd diff --git a/scripts/Simulation.gd b/source/game/Simulation.gd similarity index 100% rename from scripts/Simulation.gd rename to source/game/Simulation.gd diff --git a/scripts/InfoLayer.gd b/source/infolayer/InfoLayer.gd similarity index 100% rename from scripts/InfoLayer.gd rename to source/infolayer/InfoLayer.gd diff --git a/scripts/MainMenu.gd b/source/mainmenu/MainMenu.gd similarity index 100% rename from scripts/MainMenu.gd rename to source/mainmenu/MainMenu.gd diff --git a/scripts/CameraMarker.gd b/source/uilayer/CameraMarker.gd similarity index 100% rename from scripts/CameraMarker.gd rename to source/uilayer/CameraMarker.gd diff --git a/scripts/Control.gd b/source/uilayer/Control.gd similarity index 100% rename from scripts/Control.gd rename to source/uilayer/Control.gd diff --git a/scripts/EntityPlacer.gd b/source/uilayer/EntityPlacer.gd similarity index 100% rename from scripts/EntityPlacer.gd rename to source/uilayer/EntityPlacer.gd diff --git a/scripts/Minimap.gd b/source/uilayer/Minimap.gd similarity index 100% rename from scripts/Minimap.gd rename to source/uilayer/Minimap.gd diff --git a/scripts/UILayer.gd b/source/uilayer/UILayer.gd similarity index 100% rename from scripts/UILayer.gd rename to source/uilayer/UILayer.gd