diff --git a/BuildingDefinitions.gd b/BuildingDefinitions.gd deleted file mode 100644 index fc1c4e0..0000000 --- a/BuildingDefinitions.gd +++ /dev/null @@ -1,22 +0,0 @@ -class_name BuildingDefinitions -extends RefCounted - -const ORDER: PackedStringArray = ["mothership", "ship_crafter", "command_center", "extractor", "transport_hub", "ship_lab", "gas_burner"] -const DEFINITIONS: Dictionary = { - "mothership": preload("res://MothershipBuildingDefinition.tres"), - "ship_crafter": preload("res://CrafterBuildingDefinition.tres"), - "command_center": preload("res://CommandBuildingDefinition.tres"), - "extractor": preload("res://ExtractorBuildingDefinition.tres"), - "transport_hub": preload("res://TransportHubBuildingDefinition.tres"), - "ship_lab": preload("res://ShipLabBuildingDefinition.tres"), - "gas_burner": preload("res://GasBurnerBuildingDefinition.tres"), -} - -static func get_definition(definition_id: String) -> Resource: - return DEFINITIONS.get(definition_id) - -static func all() -> Array: - var result: Array = [] - for definition_id in ORDER: - result.append(DEFINITIONS[definition_id]) - return result diff --git a/PlanetSetups/ResearchLabSetup.tres b/PlanetSetups/ResearchLabSetup.tres index 7183fd7..1095e9c 100644 --- a/PlanetSetups/ResearchLabSetup.tres +++ b/PlanetSetups/ResearchLabSetup.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="PlanetSetup" format=3] -[ext_resource type="Script" path="res://PlanetSetupSpawn.gd" id="1"] -[ext_resource type="Script" path="res://PlanetSetup.gd" id="2"] +[ext_resource type="Script" path="res://surface/PlanetSetupSpawn.gd" id="1"] +[ext_resource type="Script" path="res://surface/PlanetSetup.gd" id="2"] [sub_resource type="Resource" id="Resource_ta1"] script = ExtResource("1") diff --git a/PlanetSetups/gas_default.tres b/PlanetSetups/gas_default.tres index e68901b..fa053cc 100644 --- a/PlanetSetups/gas_default.tres +++ b/PlanetSetups/gas_default.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="PlanetSetup" format=3] -[ext_resource type="Script" path="res://PlanetSetup.gd" id="1"] -[ext_resource type="Script" path="res://PlanetSetupSpawn.gd" id="2"] +[ext_resource type="Script" path="res://surface/PlanetSetup.gd" id="1"] +[ext_resource type="Script" path="res://surface/PlanetSetupSpawn.gd" id="2"] [sub_resource type="Resource" id="Resource_che8f"] script = ExtResource("2") diff --git a/PlanetSetups/researtch_lab_garrison.tres b/PlanetSetups/researtch_lab_garrison.tres index fbd237b..75a2dc9 100644 --- a/PlanetSetups/researtch_lab_garrison.tres +++ b/PlanetSetups/researtch_lab_garrison.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="PlanetSetup" format=3] -[ext_resource type="Script" path="res://PlanetSetupSpawn.gd" id="1_p34gm"] -[ext_resource type="Script" path="res://PlanetSetup.gd" id="2_oxc3b"] +[ext_resource type="Script" path="res://surface/PlanetSetupSpawn.gd" id="1_p34gm"] +[ext_resource type="Script" path="res://surface/PlanetSetup.gd" id="2_oxc3b"] [sub_resource type="Resource" id="Resource_p34gm"] script = ExtResource("1_p34gm") diff --git a/PlanetSetups/rocky_default.tres b/PlanetSetups/rocky_default.tres index d053f5b..625ef8a 100644 --- a/PlanetSetups/rocky_default.tres +++ b/PlanetSetups/rocky_default.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="PlanetSetup" format=3] -[ext_resource type="Script" path="res://PlanetSetup.gd" id="1"] -[ext_resource type="Script" path="res://PlanetSetupSpawn.gd" id="2"] +[ext_resource type="Script" path="res://surface/PlanetSetup.gd" id="1"] +[ext_resource type="Script" path="res://surface/PlanetSetupSpawn.gd" id="2"] [sub_resource type="Resource" id="Resource_kkunv"] script = ExtResource("2") diff --git a/Building.gd b/buildings/Building.gd similarity index 93% rename from Building.gd rename to buildings/Building.gd index b9dea7e..e710fc1 100644 --- a/Building.gd +++ b/buildings/Building.gd @@ -1,6 +1,6 @@ extends Node2D -const BUILDING_DEFINITIONS = preload("res://BuildingDefinitions.gd") +const BUILDING_DEFINITIONS = preload("res://buildings/BuildingDefinitions.gd") @export var definition_id: String = "mothership" @export var building_id: int = 0 diff --git a/Building.gd.uid b/buildings/Building.gd.uid similarity index 100% rename from Building.gd.uid rename to buildings/Building.gd.uid diff --git a/Building.tscn b/buildings/Building.tscn similarity index 67% rename from Building.tscn rename to buildings/Building.tscn index 3929101..f6fad65 100644 --- a/Building.tscn +++ b/buildings/Building.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://Building.gd" id="1"] +[ext_resource type="Script" path="res://buildings/Building.gd" id="1"] [node name="Building" type="Node2D"] script = ExtResource("1") diff --git a/BuildingActionProvider.gd b/buildings/BuildingActionProvider.gd similarity index 100% rename from BuildingActionProvider.gd rename to buildings/BuildingActionProvider.gd diff --git a/BuildingActionProvider.gd.uid b/buildings/BuildingActionProvider.gd.uid similarity index 100% rename from BuildingActionProvider.gd.uid rename to buildings/BuildingActionProvider.gd.uid diff --git a/BuildingDefinition.gd b/buildings/BuildingDefinition.gd similarity index 100% rename from BuildingDefinition.gd rename to buildings/BuildingDefinition.gd diff --git a/BuildingDefinition.gd.uid b/buildings/BuildingDefinition.gd.uid similarity index 100% rename from BuildingDefinition.gd.uid rename to buildings/BuildingDefinition.gd.uid diff --git a/buildings/BuildingDefinitions.gd b/buildings/BuildingDefinitions.gd new file mode 100644 index 0000000..972cd6a --- /dev/null +++ b/buildings/BuildingDefinitions.gd @@ -0,0 +1,22 @@ +class_name BuildingDefinitions +extends RefCounted + +const ORDER: PackedStringArray = ["mothership", "ship_crafter", "command_center", "extractor", "transport_hub", "ship_lab", "gas_burner"] +const DEFINITIONS: Dictionary = { + "mothership": preload("res://buildings/MothershipBuildingDefinition.tres"), + "ship_crafter": preload("res://buildings/CrafterBuildingDefinition.tres"), + "command_center": preload("res://buildings/CommandBuildingDefinition.tres"), + "extractor": preload("res://buildings/ExtractorBuildingDefinition.tres"), + "transport_hub": preload("res://buildings/TransportHubBuildingDefinition.tres"), + "ship_lab": preload("res://buildings/ShipLabBuildingDefinition.tres"), + "gas_burner": preload("res://buildings/GasBurnerBuildingDefinition.tres"), +} + +static func get_definition(definition_id: String) -> Resource: + return DEFINITIONS.get(definition_id) + +static func all() -> Array: + var result: Array = [] + for definition_id in ORDER: + result.append(DEFINITIONS[definition_id]) + return result diff --git a/BuildingDefinitions.gd.uid b/buildings/BuildingDefinitions.gd.uid similarity index 100% rename from BuildingDefinitions.gd.uid rename to buildings/BuildingDefinitions.gd.uid diff --git a/BuildingField.gd b/buildings/BuildingField.gd similarity index 96% rename from BuildingField.gd rename to buildings/BuildingField.gd index 09b37bd..79e8dfe 100644 --- a/BuildingField.gd +++ b/buildings/BuildingField.gd @@ -9,7 +9,7 @@ extends Node2D @onready var fleet: Node2D = get_node("../Fleet") -var building_scene: PackedScene = preload("res://Building.tscn") +var building_scene: PackedScene = preload("res://buildings/Building.tscn") var spawned: Array = [] # Nothing happens here per frame any more. Arriving at the mothership used to diff --git a/BuildingField.gd.uid b/buildings/BuildingField.gd.uid similarity index 100% rename from BuildingField.gd.uid rename to buildings/BuildingField.gd.uid diff --git a/BuildingLogisticsProfile.gd b/buildings/BuildingLogisticsProfile.gd similarity index 100% rename from BuildingLogisticsProfile.gd rename to buildings/BuildingLogisticsProfile.gd diff --git a/BuildingLogisticsProfile.gd.uid b/buildings/BuildingLogisticsProfile.gd.uid similarity index 100% rename from BuildingLogisticsProfile.gd.uid rename to buildings/BuildingLogisticsProfile.gd.uid diff --git a/BuildingVisualBase.gd b/buildings/BuildingVisualBase.gd similarity index 100% rename from BuildingVisualBase.gd rename to buildings/BuildingVisualBase.gd diff --git a/BuildingVisualBase.gd.uid b/buildings/BuildingVisualBase.gd.uid similarity index 100% rename from BuildingVisualBase.gd.uid rename to buildings/BuildingVisualBase.gd.uid diff --git a/CommandBuildingDefinition.tres b/buildings/CommandBuildingDefinition.tres similarity index 77% rename from CommandBuildingDefinition.tres rename to buildings/CommandBuildingDefinition.tres index 727a6f4..5d63505 100644 --- a/CommandBuildingDefinition.tres +++ b/buildings/CommandBuildingDefinition.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" script_class="BuildingDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://BuildingDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://CommandBuildingVisual.tscn" id="2"] +[ext_resource type="Script" path="res://buildings/BuildingDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://buildings/CommandBuildingVisual.tscn" id="2"] [resource] script = ExtResource("1") definition_id = "command_center" diff --git a/CommandBuildingVisual.gd b/buildings/CommandBuildingVisual.gd similarity index 72% rename from CommandBuildingVisual.gd rename to buildings/CommandBuildingVisual.gd index 713b407..4cce27e 100644 --- a/CommandBuildingVisual.gd +++ b/buildings/CommandBuildingVisual.gd @@ -1,4 +1,4 @@ -extends "res://BuildingVisualBase.gd" +extends "res://buildings/BuildingVisualBase.gd" func _ready() -> void: set_process(false) diff --git a/CommandBuildingVisual.gd.uid b/buildings/CommandBuildingVisual.gd.uid similarity index 100% rename from CommandBuildingVisual.gd.uid rename to buildings/CommandBuildingVisual.gd.uid diff --git a/CommandBuildingVisual.tscn b/buildings/CommandBuildingVisual.tscn similarity index 57% rename from CommandBuildingVisual.tscn rename to buildings/CommandBuildingVisual.tscn index 048b3f3..952e05e 100644 --- a/CommandBuildingVisual.tscn +++ b/buildings/CommandBuildingVisual.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3] -[ext_resource type="Script" path="res://CommandBuildingVisual.gd" id="1"] -[ext_resource type="Script" path="res://BuildingActionProvider.gd" id="2"] +[ext_resource type="Script" path="res://buildings/CommandBuildingVisual.gd" id="1"] +[ext_resource type="Script" path="res://buildings/BuildingActionProvider.gd" id="2"] [node name="Visual" type="Node2D"] script = ExtResource("1") diff --git a/CrafterBuildingDefinition.tres b/buildings/CrafterBuildingDefinition.tres similarity index 76% rename from CrafterBuildingDefinition.tres rename to buildings/CrafterBuildingDefinition.tres index 2a3f91f..ae29ea1 100644 --- a/CrafterBuildingDefinition.tres +++ b/buildings/CrafterBuildingDefinition.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" script_class="BuildingDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://BuildingDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://CrafterBuildingVisual.tscn" id="2"] +[ext_resource type="Script" path="res://buildings/BuildingDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://buildings/CrafterBuildingVisual.tscn" id="2"] [resource] script = ExtResource("1") definition_id = "ship_crafter" diff --git a/CrafterBuildingVisual.gd b/buildings/CrafterBuildingVisual.gd similarity index 84% rename from CrafterBuildingVisual.gd rename to buildings/CrafterBuildingVisual.gd index ddd41a8..146824e 100644 --- a/CrafterBuildingVisual.gd +++ b/buildings/CrafterBuildingVisual.gd @@ -1,4 +1,4 @@ -extends "res://BuildingVisualBase.gd" +extends "res://buildings/BuildingVisualBase.gd" func _ready() -> void: for part in SHIP_PARTS: diff --git a/CrafterBuildingVisual.gd.uid b/buildings/CrafterBuildingVisual.gd.uid similarity index 100% rename from CrafterBuildingVisual.gd.uid rename to buildings/CrafterBuildingVisual.gd.uid diff --git a/CrafterBuildingVisual.tscn b/buildings/CrafterBuildingVisual.tscn similarity index 56% rename from CrafterBuildingVisual.tscn rename to buildings/CrafterBuildingVisual.tscn index c3bb670..356a2bf 100644 --- a/CrafterBuildingVisual.tscn +++ b/buildings/CrafterBuildingVisual.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3] -[ext_resource type="Script" path="res://CrafterBuildingVisual.gd" id="1"] -[ext_resource type="Script" path="res://BuildingActionProvider.gd" id="2"] +[ext_resource type="Script" path="res://buildings/CrafterBuildingVisual.gd" id="1"] +[ext_resource type="Script" path="res://buildings/BuildingActionProvider.gd" id="2"] [node name="Visual" type="Node2D"] script = ExtResource("1") diff --git a/ExtractorBuildingDefinition.tres b/buildings/ExtractorBuildingDefinition.tres similarity index 87% rename from ExtractorBuildingDefinition.tres rename to buildings/ExtractorBuildingDefinition.tres index 0584758..32b30c1 100644 --- a/ExtractorBuildingDefinition.tres +++ b/buildings/ExtractorBuildingDefinition.tres @@ -1,5 +1,5 @@ [gd_resource type="Resource" script_class="BuildingDefinition" load_steps=2 format=3] -[ext_resource type="Script" path="res://BuildingDefinition.gd" id="1"] +[ext_resource type="Script" path="res://buildings/BuildingDefinition.gd" id="1"] [resource] script = ExtResource("1") definition_id = "extractor" diff --git a/GasBurnerBuildingDefinition.tres b/buildings/GasBurnerBuildingDefinition.tres similarity index 78% rename from GasBurnerBuildingDefinition.tres rename to buildings/GasBurnerBuildingDefinition.tres index a0d3058..13adca4 100644 --- a/GasBurnerBuildingDefinition.tres +++ b/buildings/GasBurnerBuildingDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="BuildingDefinition" load_steps=4 format=3] -[ext_resource type="Script" path="res://BuildingDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://GasBurnerBuildingVisual.tscn" id="2"] -[ext_resource type="Script" path="res://BuildingLogisticsProfile.gd" id="3"] +[ext_resource type="Script" path="res://buildings/BuildingDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://buildings/GasBurnerBuildingVisual.tscn" id="2"] +[ext_resource type="Script" path="res://buildings/BuildingLogisticsProfile.gd" id="3"] [sub_resource type="Resource" id="Resource_logistics"] script = ExtResource("3") diff --git a/GasBurnerBuildingVisual.gd b/buildings/GasBurnerBuildingVisual.gd similarity index 97% rename from GasBurnerBuildingVisual.gd rename to buildings/GasBurnerBuildingVisual.gd index c7a8236..7869a52 100644 --- a/GasBurnerBuildingVisual.gd +++ b/buildings/GasBurnerBuildingVisual.gd @@ -1,4 +1,4 @@ -extends "res://BuildingVisualBase.gd" +extends "res://buildings/BuildingVisualBase.gd" # Drawn once, not per frame - the burner has no animation. It does have two # LOOKS though (#78): lit while it is converting, cold while the player has diff --git a/GasBurnerBuildingVisual.gd.uid b/buildings/GasBurnerBuildingVisual.gd.uid similarity index 100% rename from GasBurnerBuildingVisual.gd.uid rename to buildings/GasBurnerBuildingVisual.gd.uid diff --git a/GasBurnerBuildingVisual.tscn b/buildings/GasBurnerBuildingVisual.tscn similarity index 56% rename from GasBurnerBuildingVisual.tscn rename to buildings/GasBurnerBuildingVisual.tscn index dd2c56a..f46a16b 100644 --- a/GasBurnerBuildingVisual.tscn +++ b/buildings/GasBurnerBuildingVisual.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3] -[ext_resource type="Script" path="res://GasBurnerBuildingVisual.gd" id="1"] -[ext_resource type="Script" path="res://BuildingActionProvider.gd" id="2"] +[ext_resource type="Script" path="res://buildings/GasBurnerBuildingVisual.gd" id="1"] +[ext_resource type="Script" path="res://buildings/BuildingActionProvider.gd" id="2"] [node name="Visual" type="Node2D"] script = ExtResource("1") diff --git a/MothershipBuildingDefinition.tres b/buildings/MothershipBuildingDefinition.tres similarity index 78% rename from MothershipBuildingDefinition.tres rename to buildings/MothershipBuildingDefinition.tres index a032777..3a23df3 100644 --- a/MothershipBuildingDefinition.tres +++ b/buildings/MothershipBuildingDefinition.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" script_class="BuildingDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://BuildingDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://MothershipBuildingVisual.tscn" id="2"] +[ext_resource type="Script" path="res://buildings/BuildingDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://buildings/MothershipBuildingVisual.tscn" id="2"] [resource] script = ExtResource("1") definition_id = "mothership" diff --git a/MothershipBuildingVisual.gd b/buildings/MothershipBuildingVisual.gd similarity index 80% rename from MothershipBuildingVisual.gd rename to buildings/MothershipBuildingVisual.gd index ba2f617..a1b12ec 100644 --- a/MothershipBuildingVisual.gd +++ b/buildings/MothershipBuildingVisual.gd @@ -1,4 +1,4 @@ -extends "res://BuildingVisualBase.gd" +extends "res://buildings/BuildingVisualBase.gd" func _ready() -> void: _build_mothership_pieces() diff --git a/MothershipBuildingVisual.gd.uid b/buildings/MothershipBuildingVisual.gd.uid similarity index 100% rename from MothershipBuildingVisual.gd.uid rename to buildings/MothershipBuildingVisual.gd.uid diff --git a/MothershipBuildingVisual.tscn b/buildings/MothershipBuildingVisual.tscn similarity index 57% rename from MothershipBuildingVisual.tscn rename to buildings/MothershipBuildingVisual.tscn index 0cc3615..3a052b1 100644 --- a/MothershipBuildingVisual.tscn +++ b/buildings/MothershipBuildingVisual.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3] -[ext_resource type="Script" path="res://MothershipBuildingVisual.gd" id="1"] -[ext_resource type="Script" path="res://BuildingActionProvider.gd" id="2"] +[ext_resource type="Script" path="res://buildings/MothershipBuildingVisual.gd" id="1"] +[ext_resource type="Script" path="res://buildings/BuildingActionProvider.gd" id="2"] [node name="Visual" type="Node2D"] script = ExtResource("1") diff --git a/ShipLabBuildingDefinition.tres b/buildings/ShipLabBuildingDefinition.tres similarity index 77% rename from ShipLabBuildingDefinition.tres rename to buildings/ShipLabBuildingDefinition.tres index 0823f52..4e78e24 100644 --- a/ShipLabBuildingDefinition.tres +++ b/buildings/ShipLabBuildingDefinition.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" script_class="BuildingDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://BuildingDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://ShipLabBuildingVisual.tscn" id="2"] +[ext_resource type="Script" path="res://buildings/BuildingDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://buildings/ShipLabBuildingVisual.tscn" id="2"] [resource] script = ExtResource("1") definition_id = "ship_lab" diff --git a/ShipLabBuildingVisual.gd b/buildings/ShipLabBuildingVisual.gd similarity index 79% rename from ShipLabBuildingVisual.gd rename to buildings/ShipLabBuildingVisual.gd index 9655162..b6567c8 100644 --- a/ShipLabBuildingVisual.gd +++ b/buildings/ShipLabBuildingVisual.gd @@ -1,4 +1,4 @@ -extends "res://BuildingVisualBase.gd" +extends "res://buildings/BuildingVisualBase.gd" func _ready() -> void: _build_lab_pieces() diff --git a/ShipLabBuildingVisual.gd.uid b/buildings/ShipLabBuildingVisual.gd.uid similarity index 100% rename from ShipLabBuildingVisual.gd.uid rename to buildings/ShipLabBuildingVisual.gd.uid diff --git a/ShipLabBuildingVisual.tscn b/buildings/ShipLabBuildingVisual.tscn similarity index 56% rename from ShipLabBuildingVisual.tscn rename to buildings/ShipLabBuildingVisual.tscn index e71fdf2..4f38db4 100644 --- a/ShipLabBuildingVisual.tscn +++ b/buildings/ShipLabBuildingVisual.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3] -[ext_resource type="Script" path="res://ShipLabBuildingVisual.gd" id="1"] -[ext_resource type="Script" path="res://BuildingActionProvider.gd" id="2"] +[ext_resource type="Script" path="res://buildings/ShipLabBuildingVisual.gd" id="1"] +[ext_resource type="Script" path="res://buildings/BuildingActionProvider.gd" id="2"] [node name="Visual" type="Node2D"] script = ExtResource("1") diff --git a/TransportHubBuildingDefinition.tres b/buildings/TransportHubBuildingDefinition.tres similarity index 78% rename from TransportHubBuildingDefinition.tres rename to buildings/TransportHubBuildingDefinition.tres index 59ad15d..864763a 100644 --- a/TransportHubBuildingDefinition.tres +++ b/buildings/TransportHubBuildingDefinition.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" script_class="BuildingDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://BuildingDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://TransportHubBuildingVisual.tscn" id="2"] +[ext_resource type="Script" path="res://buildings/BuildingDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://buildings/TransportHubBuildingVisual.tscn" id="2"] [resource] script = ExtResource("1") definition_id = "transport_hub" diff --git a/TransportHubBuildingVisual.gd b/buildings/TransportHubBuildingVisual.gd similarity index 80% rename from TransportHubBuildingVisual.gd rename to buildings/TransportHubBuildingVisual.gd index a8a0d44..70f4e04 100644 --- a/TransportHubBuildingVisual.gd +++ b/buildings/TransportHubBuildingVisual.gd @@ -1,4 +1,4 @@ -extends "res://BuildingVisualBase.gd" +extends "res://buildings/BuildingVisualBase.gd" func _ready() -> void: _build_hub_pieces() diff --git a/TransportHubBuildingVisual.gd.uid b/buildings/TransportHubBuildingVisual.gd.uid similarity index 100% rename from TransportHubBuildingVisual.gd.uid rename to buildings/TransportHubBuildingVisual.gd.uid diff --git a/TransportHubBuildingVisual.tscn b/buildings/TransportHubBuildingVisual.tscn similarity index 51% rename from TransportHubBuildingVisual.tscn rename to buildings/TransportHubBuildingVisual.tscn index 29dbb10..3d92a19 100644 --- a/TransportHubBuildingVisual.tscn +++ b/buildings/TransportHubBuildingVisual.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://TransportHubBuildingVisual.gd" id="1"] +[ext_resource type="Script" path="res://buildings/TransportHubBuildingVisual.gd" id="1"] [node name="Visual" type="Node2D"] script = ExtResource("1") diff --git a/AimedFleetAbilityController.gd b/controllers/AimedFleetAbilityController.gd similarity index 100% rename from AimedFleetAbilityController.gd rename to controllers/AimedFleetAbilityController.gd diff --git a/AimedFleetAbilityController.gd.uid b/controllers/AimedFleetAbilityController.gd.uid similarity index 100% rename from AimedFleetAbilityController.gd.uid rename to controllers/AimedFleetAbilityController.gd.uid diff --git a/BuildController.gd b/controllers/BuildController.gd similarity index 99% rename from BuildController.gd rename to controllers/BuildController.gd index a3c13ef..829d4d3 100644 --- a/BuildController.gd +++ b/controllers/BuildController.gd @@ -1,7 +1,7 @@ extends Node2D -const BUILDING_DEFINITIONS = preload("res://BuildingDefinitions.gd") -const VESSEL_DEFINITIONS = preload("res://VesselDefinitions.gd") +const BUILDING_DEFINITIONS = preload("res://buildings/BuildingDefinitions.gd") +const VESSEL_DEFINITIONS = preload("res://vessels/VesselDefinitions.gd") # Space-side building UI. Owns: # - the build menu (place a mothership, ship crafter or command centre) diff --git a/BuildController.gd.uid b/controllers/BuildController.gd.uid similarity index 100% rename from BuildController.gd.uid rename to controllers/BuildController.gd.uid diff --git a/FireStickController.gd b/controllers/FireStickController.gd similarity index 100% rename from FireStickController.gd rename to controllers/FireStickController.gd diff --git a/FireStickController.gd.uid b/controllers/FireStickController.gd.uid similarity index 100% rename from FireStickController.gd.uid rename to controllers/FireStickController.gd.uid diff --git a/GameController.gd b/controllers/GameController.gd similarity index 100% rename from GameController.gd rename to controllers/GameController.gd diff --git a/GameController.gd.uid b/controllers/GameController.gd.uid similarity index 100% rename from GameController.gd.uid rename to controllers/GameController.gd.uid diff --git a/GasBombController.gd b/controllers/GasBombController.gd similarity index 98% rename from GasBombController.gd rename to controllers/GasBombController.gd index 975bea8..f4fc9d3 100644 --- a/GasBombController.gd +++ b/controllers/GasBombController.gd @@ -1,5 +1,5 @@ class_name GasBombController -extends "res://AimedFleetAbilityController.gd" +extends "res://controllers/AimedFleetAbilityController.gd" const BOMB_COLOR := Color(0.96, 0.22, 0.72) const TARGET_COLOR := Color(0.78, 0.32, 1.0) diff --git a/GasBombController.gd.uid b/controllers/GasBombController.gd.uid similarity index 100% rename from GasBombController.gd.uid rename to controllers/GasBombController.gd.uid diff --git a/LaserController.gd b/controllers/LaserController.gd similarity index 98% rename from LaserController.gd rename to controllers/LaserController.gd index 974fe52..1116d9e 100644 --- a/LaserController.gd +++ b/controllers/LaserController.gd @@ -1,5 +1,5 @@ class_name LaserController -extends "res://AimedFleetAbilityController.gd" +extends "res://controllers/AimedFleetAbilityController.gd" const BEAM_COLOR := Color(0.3, 0.9, 1.0) const TARGET_COLOR := Color(0.6, 0.95, 1.0) diff --git a/LaserController.gd.uid b/controllers/LaserController.gd.uid similarity index 100% rename from LaserController.gd.uid rename to controllers/LaserController.gd.uid diff --git a/MouseCombatController.gd b/controllers/MouseCombatController.gd similarity index 100% rename from MouseCombatController.gd rename to controllers/MouseCombatController.gd diff --git a/controllers/MouseCombatController.gd.uid b/controllers/MouseCombatController.gd.uid new file mode 100644 index 0000000..c95823e --- /dev/null +++ b/controllers/MouseCombatController.gd.uid @@ -0,0 +1 @@ +uid://bo3rdm8elge8m diff --git a/GameState.gd b/core/GameState.gd similarity index 99% rename from GameState.gd rename to core/GameState.gd index a5320cd..3466e37 100644 --- a/GameState.gd +++ b/core/GameState.gd @@ -1,14 +1,14 @@ extends Node -const INVENTORY = preload("res://Inventory.gd") -const RESOURCE_DEFINITIONS = preload("res://ResourceDefinitions.gd") -const BUILDING_DEFINITIONS = preload("res://BuildingDefinitions.gd") -const VESSEL_DEFINITIONS = preload("res://VesselDefinitions.gd") -const PLANET_DEFINITIONS = preload("res://PlanetDefinitions.gd") +const INVENTORY = preload("res://resources/Inventory.gd") +const RESOURCE_DEFINITIONS = preload("res://resources/ResourceDefinitions.gd") +const BUILDING_DEFINITIONS = preload("res://buildings/BuildingDefinitions.gd") +const VESSEL_DEFINITIONS = preload("res://vessels/VesselDefinitions.gd") +const PLANET_DEFINITIONS = preload("res://planets/PlanetDefinitions.gd") # By path, not by its `WorldGen` global name: an autoload compiles before the # global class table is necessarily populated, the same hazard PlanetSetups.gd # works around. -const WORLD_GEN = preload("res://WorldGen.gd") +const WORLD_GEN = preload("res://world/WorldGen.gd") # Autoload singleton - the one thing that survives change_scene_to_file() diff --git a/GameState.gd.uid b/core/GameState.gd.uid similarity index 100% rename from GameState.gd.uid rename to core/GameState.gd.uid diff --git a/ViewUtils.gd b/core/ViewUtils.gd similarity index 100% rename from ViewUtils.gd rename to core/ViewUtils.gd diff --git a/ViewUtils.gd.uid b/core/ViewUtils.gd.uid similarity index 100% rename from ViewUtils.gd.uid rename to core/ViewUtils.gd.uid diff --git a/ArtilleryEnemyDefinition.tres b/enemies/ArtilleryEnemyDefinition.tres similarity index 78% rename from ArtilleryEnemyDefinition.tres rename to enemies/ArtilleryEnemyDefinition.tres index 938e573..3fc142e 100644 --- a/ArtilleryEnemyDefinition.tres +++ b/enemies/ArtilleryEnemyDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="EnemyDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://EnemyDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://EnemyArtilleryComponent.tscn" id="2"] +[ext_resource type="Script" path="res://enemies/EnemyDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://enemies/EnemyArtilleryComponent.tscn" id="2"] [resource] script = ExtResource("1") diff --git a/ArtilleryShell.gd b/enemies/ArtilleryShell.gd similarity index 100% rename from ArtilleryShell.gd rename to enemies/ArtilleryShell.gd diff --git a/ArtilleryShell.gd.uid b/enemies/ArtilleryShell.gd.uid similarity index 100% rename from ArtilleryShell.gd.uid rename to enemies/ArtilleryShell.gd.uid diff --git a/ArtilleryShell.tscn b/enemies/ArtilleryShell.tscn similarity index 58% rename from ArtilleryShell.tscn rename to enemies/ArtilleryShell.tscn index 17ff161..ddfc2bc 100644 --- a/ArtilleryShell.tscn +++ b/enemies/ArtilleryShell.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://ArtilleryShell.gd" id="1"] +[ext_resource type="Script" path="res://enemies/ArtilleryShell.gd" id="1"] [node name="ArtilleryShell" type="Node2D"] script = ExtResource("1") diff --git a/ChaserEnemyDefinition.tres b/enemies/ChaserEnemyDefinition.tres similarity index 71% rename from ChaserEnemyDefinition.tres rename to enemies/ChaserEnemyDefinition.tres index 757a5de..e11d186 100644 --- a/ChaserEnemyDefinition.tres +++ b/enemies/ChaserEnemyDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="EnemyDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://EnemyDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://EnemyPursuitComponent.tscn" id="2"] +[ext_resource type="Script" path="res://enemies/EnemyDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://enemies/EnemyPursuitComponent.tscn" id="2"] [resource] script = ExtResource("1") diff --git a/Enemy.gd b/enemies/Enemy.gd similarity index 97% rename from Enemy.gd rename to enemies/Enemy.gd index feef317..9a26869 100644 --- a/Enemy.gd +++ b/enemies/Enemy.gd @@ -2,7 +2,7 @@ extends Area2D signal destroyed -const ENEMY_DEFINITIONS = preload("res://EnemyDefinitions.gd") +const ENEMY_DEFINITIONS = preload("res://enemies/EnemyDefinitions.gd") @export var enemy_id: String = "chaser" diff --git a/Enemy.gd.uid b/enemies/Enemy.gd.uid similarity index 100% rename from Enemy.gd.uid rename to enemies/Enemy.gd.uid diff --git a/Enemy.tscn b/enemies/Enemy.tscn similarity index 78% rename from Enemy.tscn rename to enemies/Enemy.tscn index 7b3ac89..c793ce0 100644 --- a/Enemy.tscn +++ b/enemies/Enemy.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3] -[ext_resource type="Script" path="res://Enemy.gd" id="1"] +[ext_resource type="Script" path="res://enemies/Enemy.gd" id="1"] [sub_resource type="CircleShape2D" id="1"] radius = 14.0 diff --git a/EnemyArtilleryComponent.gd b/enemies/EnemyArtilleryComponent.gd similarity index 96% rename from EnemyArtilleryComponent.gd rename to enemies/EnemyArtilleryComponent.gd index cdf98ce..9230a2f 100644 --- a/EnemyArtilleryComponent.gd +++ b/enemies/EnemyArtilleryComponent.gd @@ -18,7 +18,7 @@ var capability_id: String = "artillery" @export var color: Color = Color(1.0, 0.5, 0.2) var cooldown_left: float = 0.0 -var shell_scene: PackedScene = preload("res://ArtilleryShell.tscn") +var shell_scene: PackedScene = preload("res://enemies/ArtilleryShell.tscn") func tick(delta: float) -> void: diff --git a/EnemyArtilleryComponent.gd.uid b/enemies/EnemyArtilleryComponent.gd.uid similarity index 100% rename from EnemyArtilleryComponent.gd.uid rename to enemies/EnemyArtilleryComponent.gd.uid diff --git a/EnemyArtilleryComponent.tscn b/enemies/EnemyArtilleryComponent.tscn similarity index 56% rename from EnemyArtilleryComponent.tscn rename to enemies/EnemyArtilleryComponent.tscn index dcc574b..b2472fd 100644 --- a/EnemyArtilleryComponent.tscn +++ b/enemies/EnemyArtilleryComponent.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://EnemyArtilleryComponent.gd" id="1"] +[ext_resource type="Script" path="res://enemies/EnemyArtilleryComponent.gd" id="1"] [node name="EnemyArtilleryComponent" type="Node"] script = ExtResource("1") diff --git a/EnemyBigLaserBeam.gd b/enemies/EnemyBigLaserBeam.gd similarity index 100% rename from EnemyBigLaserBeam.gd rename to enemies/EnemyBigLaserBeam.gd diff --git a/EnemyBigLaserBeam.gd.uid b/enemies/EnemyBigLaserBeam.gd.uid similarity index 100% rename from EnemyBigLaserBeam.gd.uid rename to enemies/EnemyBigLaserBeam.gd.uid diff --git a/EnemyBigLaserBeam.tscn b/enemies/EnemyBigLaserBeam.tscn similarity index 57% rename from EnemyBigLaserBeam.tscn rename to enemies/EnemyBigLaserBeam.tscn index 635ceb5..bc1ad17 100644 --- a/EnemyBigLaserBeam.tscn +++ b/enemies/EnemyBigLaserBeam.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://EnemyBigLaserBeam.gd" id="1"] +[ext_resource type="Script" path="res://enemies/EnemyBigLaserBeam.gd" id="1"] [node name="EnemyBigLaserBeam" type="Node2D"] script = ExtResource("1") diff --git a/EnemyBigLaserComponent.gd b/enemies/EnemyBigLaserComponent.gd similarity index 94% rename from EnemyBigLaserComponent.gd rename to enemies/EnemyBigLaserComponent.gd index 11f36b7..a24fc75 100644 --- a/EnemyBigLaserComponent.gd +++ b/enemies/EnemyBigLaserComponent.gd @@ -16,7 +16,7 @@ var capability_id: String = "big_laser" @export var color: Color = Color(0.55, 0.05, 0.85) var cooldown_left: float = 0.0 -var beam_scene: PackedScene = preload("res://EnemyBigLaserBeam.tscn") +var beam_scene: PackedScene = preload("res://enemies/EnemyBigLaserBeam.tscn") func tick(delta: float) -> void: diff --git a/EnemyBigLaserComponent.gd.uid b/enemies/EnemyBigLaserComponent.gd.uid similarity index 100% rename from EnemyBigLaserComponent.gd.uid rename to enemies/EnemyBigLaserComponent.gd.uid diff --git a/EnemyBigLaserComponent.tscn b/enemies/EnemyBigLaserComponent.tscn similarity index 56% rename from EnemyBigLaserComponent.tscn rename to enemies/EnemyBigLaserComponent.tscn index 8129ea2..2a9d510 100644 --- a/EnemyBigLaserComponent.tscn +++ b/enemies/EnemyBigLaserComponent.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://EnemyBigLaserComponent.gd" id="1"] +[ext_resource type="Script" path="res://enemies/EnemyBigLaserComponent.gd" id="1"] [node name="EnemyBigLaserComponent" type="Node"] script = ExtResource("1") diff --git a/EnemyDefinition.gd b/enemies/EnemyDefinition.gd similarity index 100% rename from EnemyDefinition.gd rename to enemies/EnemyDefinition.gd diff --git a/EnemyDefinition.gd.uid b/enemies/EnemyDefinition.gd.uid similarity index 100% rename from EnemyDefinition.gd.uid rename to enemies/EnemyDefinition.gd.uid diff --git a/EnemyDefinitions.gd b/enemies/EnemyDefinitions.gd similarity index 83% rename from EnemyDefinitions.gd rename to enemies/EnemyDefinitions.gd index 20cf8b0..ba34fea 100644 --- a/EnemyDefinitions.gd +++ b/enemies/EnemyDefinitions.gd @@ -4,11 +4,11 @@ extends RefCounted const DEFAULT_ID: String = "chaser" const ORDER: PackedStringArray = ["chaser", "sniper", "artillery", "turret_spawner", "enemy_mothership"] const DEFINITIONS: Dictionary = { - "chaser": preload("res://ChaserEnemyDefinition.tres"), - "sniper": preload("res://SniperEnemyDefinition.tres"), - "artillery": preload("res://ArtilleryEnemyDefinition.tres"), - "turret_spawner": preload("res://TurretSpawnerEnemyDefinition.tres"), - "enemy_mothership": preload("res://MothershipEnemyDefinition.tres"), + "chaser": preload("res://enemies/ChaserEnemyDefinition.tres"), + "sniper": preload("res://enemies/SniperEnemyDefinition.tres"), + "artillery": preload("res://enemies/ArtilleryEnemyDefinition.tres"), + "turret_spawner": preload("res://enemies/TurretSpawnerEnemyDefinition.tres"), + "enemy_mothership": preload("res://enemies/MothershipEnemyDefinition.tres"), } diff --git a/EnemyDefinitions.gd.uid b/enemies/EnemyDefinitions.gd.uid similarity index 100% rename from EnemyDefinitions.gd.uid rename to enemies/EnemyDefinitions.gd.uid diff --git a/EnemyMarker.gd b/enemies/EnemyMarker.gd similarity index 89% rename from EnemyMarker.gd rename to enemies/EnemyMarker.gd index de38c1f..aa967fc 100644 --- a/EnemyMarker.gd +++ b/enemies/EnemyMarker.gd @@ -9,7 +9,7 @@ extends Node2D # glow_color is separate from the definition's own so the editor can tint a # selected marker without touching the definition. -const ENEMY_DEFINITIONS = preload("res://EnemyDefinitions.gd") +const ENEMY_DEFINITIONS = preload("res://enemies/EnemyDefinitions.gd") var definition: Resource var glow_color: Color = Color(1.0, 0.15, 0.2) diff --git a/EnemyMarker.gd.uid b/enemies/EnemyMarker.gd.uid similarity index 100% rename from EnemyMarker.gd.uid rename to enemies/EnemyMarker.gd.uid diff --git a/EnemyProjectile.gd b/enemies/EnemyProjectile.gd similarity index 100% rename from EnemyProjectile.gd rename to enemies/EnemyProjectile.gd diff --git a/EnemyProjectile.gd.uid b/enemies/EnemyProjectile.gd.uid similarity index 100% rename from EnemyProjectile.gd.uid rename to enemies/EnemyProjectile.gd.uid diff --git a/EnemyProjectile.tscn b/enemies/EnemyProjectile.tscn similarity index 76% rename from EnemyProjectile.tscn rename to enemies/EnemyProjectile.tscn index 798768c..bde9ef9 100644 --- a/EnemyProjectile.tscn +++ b/enemies/EnemyProjectile.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3] -[ext_resource type="Script" path="res://EnemyProjectile.gd" id="1"] +[ext_resource type="Script" path="res://enemies/EnemyProjectile.gd" id="1"] [sub_resource type="CircleShape2D" id="1"] radius = 4.0 diff --git a/EnemyPursuitComponent.gd b/enemies/EnemyPursuitComponent.gd similarity index 100% rename from EnemyPursuitComponent.gd rename to enemies/EnemyPursuitComponent.gd diff --git a/EnemyPursuitComponent.gd.uid b/enemies/EnemyPursuitComponent.gd.uid similarity index 100% rename from EnemyPursuitComponent.gd.uid rename to enemies/EnemyPursuitComponent.gd.uid diff --git a/EnemyPursuitComponent.tscn b/enemies/EnemyPursuitComponent.tscn similarity index 57% rename from EnemyPursuitComponent.tscn rename to enemies/EnemyPursuitComponent.tscn index 8b68d67..2379411 100644 --- a/EnemyPursuitComponent.tscn +++ b/enemies/EnemyPursuitComponent.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://EnemyPursuitComponent.gd" id="1"] +[ext_resource type="Script" path="res://enemies/EnemyPursuitComponent.gd" id="1"] [node name="EnemyPursuitComponent" type="Node"] script = ExtResource("1") diff --git a/EnemyPursuitComponentMothership.tscn b/enemies/EnemyPursuitComponentMothership.tscn similarity index 64% rename from EnemyPursuitComponentMothership.tscn rename to enemies/EnemyPursuitComponentMothership.tscn index 108610d..049b04e 100644 --- a/EnemyPursuitComponentMothership.tscn +++ b/enemies/EnemyPursuitComponentMothership.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://EnemyPursuitComponent.gd" id="1"] +[ext_resource type="Script" path="res://enemies/EnemyPursuitComponent.gd" id="1"] [node name="EnemyPursuitComponentMothership" type="Node"] script = ExtResource("1") diff --git a/EnemyRangedWeaponComponent.gd b/enemies/EnemyRangedWeaponComponent.gd similarity index 95% rename from EnemyRangedWeaponComponent.gd rename to enemies/EnemyRangedWeaponComponent.gd index c8600ce..736800b 100644 --- a/EnemyRangedWeaponComponent.gd +++ b/enemies/EnemyRangedWeaponComponent.gd @@ -13,7 +13,7 @@ var capability_id: String = "ranged_weapon" @export var damage: int = 1 var fire_timer: float = 0.0 -var projectile_scene: PackedScene = preload("res://EnemyProjectile.tscn") +var projectile_scene: PackedScene = preload("res://enemies/EnemyProjectile.tscn") func tick(delta: float) -> void: diff --git a/EnemyRangedWeaponComponent.gd.uid b/enemies/EnemyRangedWeaponComponent.gd.uid similarity index 100% rename from EnemyRangedWeaponComponent.gd.uid rename to enemies/EnemyRangedWeaponComponent.gd.uid diff --git a/EnemyRangedWeaponComponent.tscn b/enemies/EnemyRangedWeaponComponent.tscn similarity index 56% rename from EnemyRangedWeaponComponent.tscn rename to enemies/EnemyRangedWeaponComponent.tscn index 7c8b203..700c022 100644 --- a/EnemyRangedWeaponComponent.tscn +++ b/enemies/EnemyRangedWeaponComponent.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://EnemyRangedWeaponComponent.gd" id="1"] +[ext_resource type="Script" path="res://enemies/EnemyRangedWeaponComponent.gd" id="1"] [node name="EnemyRangedWeaponComponent" type="Node"] script = ExtResource("1") diff --git a/EnemySpawner.gd b/enemies/EnemySpawner.gd similarity index 93% rename from EnemySpawner.gd rename to enemies/EnemySpawner.gd index 1ddb7e9..f70ab84 100644 --- a/EnemySpawner.gd +++ b/enemies/EnemySpawner.gd @@ -6,7 +6,7 @@ extends Node2D @onready var fleet: Node2D = get_node("../Fleet") -var enemy_scene: PackedScene = preload("res://Enemy.tscn") +var enemy_scene: PackedScene = preload("res://enemies/Enemy.tscn") var timer: float = 0.0 var next_spawn_time: float = 0.0 diff --git a/EnemySpawner.gd.uid b/enemies/EnemySpawner.gd.uid similarity index 100% rename from EnemySpawner.gd.uid rename to enemies/EnemySpawner.gd.uid diff --git a/EnemySpawnerComponent.gd b/enemies/EnemySpawnerComponent.gd similarity index 98% rename from EnemySpawnerComponent.gd rename to enemies/EnemySpawnerComponent.gd index 886f52a..c8e2732 100644 --- a/EnemySpawnerComponent.gd +++ b/enemies/EnemySpawnerComponent.gd @@ -66,7 +66,7 @@ func tick(delta: float) -> void: var offset: Vector2 = Vector2(cos(angle), sin(angle)) * spawn_radius if enemy_scene == null: - enemy_scene = load("res://Enemy.tscn") + enemy_scene = load("res://enemies/Enemy.tscn") var new_enemy: Node2D = enemy_scene.instantiate() new_enemy.enemy_id = spawned_enemy_id # spawner.position is already expressed in `host`'s local space, and diff --git a/EnemySpawnerComponent.gd.uid b/enemies/EnemySpawnerComponent.gd.uid similarity index 100% rename from EnemySpawnerComponent.gd.uid rename to enemies/EnemySpawnerComponent.gd.uid diff --git a/EnemySpawnerComponent.tscn b/enemies/EnemySpawnerComponent.tscn similarity index 57% rename from EnemySpawnerComponent.tscn rename to enemies/EnemySpawnerComponent.tscn index 5121e1b..cc9c0b0 100644 --- a/EnemySpawnerComponent.tscn +++ b/enemies/EnemySpawnerComponent.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://EnemySpawnerComponent.gd" id="1"] +[ext_resource type="Script" path="res://enemies/EnemySpawnerComponent.gd" id="1"] [node name="EnemySpawnerComponent" type="Node"] script = ExtResource("1") diff --git a/EnemySpawnerComponentArtillery.tscn b/enemies/EnemySpawnerComponentArtillery.tscn similarity index 71% rename from EnemySpawnerComponentArtillery.tscn rename to enemies/EnemySpawnerComponentArtillery.tscn index 9b72198..e8b8b4d 100644 --- a/EnemySpawnerComponentArtillery.tscn +++ b/enemies/EnemySpawnerComponentArtillery.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://EnemySpawnerComponent.gd" id="1"] +[ext_resource type="Script" path="res://enemies/EnemySpawnerComponent.gd" id="1"] [node name="EnemySpawnerComponentArtillery" type="Node"] script = ExtResource("1") diff --git a/EnemySpawnerComponentChaser.tscn b/enemies/EnemySpawnerComponentChaser.tscn similarity index 70% rename from EnemySpawnerComponentChaser.tscn rename to enemies/EnemySpawnerComponentChaser.tscn index 582f7ce..3fd5478 100644 --- a/EnemySpawnerComponentChaser.tscn +++ b/enemies/EnemySpawnerComponentChaser.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://EnemySpawnerComponent.gd" id="1"] +[ext_resource type="Script" path="res://enemies/EnemySpawnerComponent.gd" id="1"] [node name="EnemySpawnerComponentChaser" type="Node"] script = ExtResource("1") diff --git a/EnemyStandoffComponent.gd b/enemies/EnemyStandoffComponent.gd similarity index 100% rename from EnemyStandoffComponent.gd rename to enemies/EnemyStandoffComponent.gd diff --git a/EnemyStandoffComponent.gd.uid b/enemies/EnemyStandoffComponent.gd.uid similarity index 100% rename from EnemyStandoffComponent.gd.uid rename to enemies/EnemyStandoffComponent.gd.uid diff --git a/EnemyStandoffComponent.tscn b/enemies/EnemyStandoffComponent.tscn similarity index 56% rename from EnemyStandoffComponent.tscn rename to enemies/EnemyStandoffComponent.tscn index 7858cc2..1f02213 100644 --- a/EnemyStandoffComponent.tscn +++ b/enemies/EnemyStandoffComponent.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://EnemyStandoffComponent.gd" id="1"] +[ext_resource type="Script" path="res://enemies/EnemyStandoffComponent.gd" id="1"] [node name="EnemyStandoffComponent" type="Node"] script = ExtResource("1") diff --git a/MothershipEnemyDefinition.tres b/enemies/MothershipEnemyDefinition.tres similarity index 59% rename from MothershipEnemyDefinition.tres rename to enemies/MothershipEnemyDefinition.tres index d8e3603..6c8ae0b 100644 --- a/MothershipEnemyDefinition.tres +++ b/enemies/MothershipEnemyDefinition.tres @@ -1,10 +1,10 @@ [gd_resource type="Resource" script_class="EnemyDefinition" load_steps=6 format=3] -[ext_resource type="Script" path="res://EnemyDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://EnemyPursuitComponentMothership.tscn" id="2"] -[ext_resource type="PackedScene" path="res://EnemySpawnerComponentChaser.tscn" id="3"] -[ext_resource type="PackedScene" path="res://EnemySpawnerComponentArtillery.tscn" id="4"] -[ext_resource type="PackedScene" path="res://EnemyBigLaserComponent.tscn" id="5"] +[ext_resource type="Script" path="res://enemies/EnemyDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://enemies/EnemyPursuitComponentMothership.tscn" id="2"] +[ext_resource type="PackedScene" path="res://enemies/EnemySpawnerComponentChaser.tscn" id="3"] +[ext_resource type="PackedScene" path="res://enemies/EnemySpawnerComponentArtillery.tscn" id="4"] +[ext_resource type="PackedScene" path="res://enemies/EnemyBigLaserComponent.tscn" id="5"] [resource] script = ExtResource("1") diff --git a/SniperEnemyDefinition.tres b/enemies/SniperEnemyDefinition.tres similarity index 68% rename from SniperEnemyDefinition.tres rename to enemies/SniperEnemyDefinition.tres index 75654f8..64124d5 100644 --- a/SniperEnemyDefinition.tres +++ b/enemies/SniperEnemyDefinition.tres @@ -1,8 +1,8 @@ [gd_resource type="Resource" script_class="EnemyDefinition" load_steps=4 format=3] -[ext_resource type="Script" path="res://EnemyDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://EnemyStandoffComponent.tscn" id="2"] -[ext_resource type="PackedScene" path="res://EnemyRangedWeaponComponent.tscn" id="3"] +[ext_resource type="Script" path="res://enemies/EnemyDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://enemies/EnemyStandoffComponent.tscn" id="2"] +[ext_resource type="PackedScene" path="res://enemies/EnemyRangedWeaponComponent.tscn" id="3"] [resource] script = ExtResource("1") diff --git a/TurretSpawnerEnemyDefinition.tres b/enemies/TurretSpawnerEnemyDefinition.tres similarity index 79% rename from TurretSpawnerEnemyDefinition.tres rename to enemies/TurretSpawnerEnemyDefinition.tres index 3e33fb3..8f554ce 100644 --- a/TurretSpawnerEnemyDefinition.tres +++ b/enemies/TurretSpawnerEnemyDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="EnemyDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://EnemyDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://EnemySpawnerComponent.tscn" id="2"] +[ext_resource type="Script" path="res://enemies/EnemyDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://enemies/EnemySpawnerComponent.tscn" id="2"] [resource] script = ExtResource("1") diff --git a/Hauler.gd b/logistics/Hauler.gd similarity index 100% rename from Hauler.gd rename to logistics/Hauler.gd diff --git a/Hauler.gd.uid b/logistics/Hauler.gd.uid similarity index 100% rename from Hauler.gd.uid rename to logistics/Hauler.gd.uid diff --git a/Hauler.tscn b/logistics/Hauler.tscn similarity index 58% rename from Hauler.tscn rename to logistics/Hauler.tscn index e293d5a..54662db 100644 --- a/Hauler.tscn +++ b/logistics/Hauler.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://Hauler.gd" id="1"] +[ext_resource type="Script" path="res://logistics/Hauler.gd" id="1"] [node name="Hauler" type="Node2D"] script = ExtResource("1") diff --git a/HaulerField.gd b/logistics/HaulerField.gd similarity index 96% rename from HaulerField.gd rename to logistics/HaulerField.gd index ba29108..87dc5b9 100644 --- a/HaulerField.gd +++ b/logistics/HaulerField.gd @@ -13,7 +13,7 @@ extends Node2D @onready var fleet: Node2D = get_node("../Fleet") -var hauler_scene: PackedScene = preload("res://Hauler.tscn") +var hauler_scene: PackedScene = preload("res://logistics/Hauler.tscn") # extractor index -> live Hauler node var active: Dictionary = {} diff --git a/HaulerField.gd.uid b/logistics/HaulerField.gd.uid similarity index 100% rename from HaulerField.gd.uid rename to logistics/HaulerField.gd.uid diff --git a/Transporter.gd b/logistics/Transporter.gd similarity index 100% rename from Transporter.gd rename to logistics/Transporter.gd diff --git a/Transporter.gd.uid b/logistics/Transporter.gd.uid similarity index 100% rename from Transporter.gd.uid rename to logistics/Transporter.gd.uid diff --git a/Transporter.tscn b/logistics/Transporter.tscn similarity index 57% rename from Transporter.tscn rename to logistics/Transporter.tscn index d6555a6..708376d 100644 --- a/Transporter.tscn +++ b/logistics/Transporter.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://Transporter.gd" id="1"] +[ext_resource type="Script" path="res://logistics/Transporter.gd" id="1"] [node name="Transporter" type="Node2D"] script = ExtResource("1") diff --git a/TransporterField.gd b/logistics/TransporterField.gd similarity index 95% rename from TransporterField.gd rename to logistics/TransporterField.gd index c47ab7d..279215d 100644 --- a/TransporterField.gd +++ b/logistics/TransporterField.gd @@ -11,7 +11,7 @@ extends Node2D @onready var fleet: Node2D = get_node("../Fleet") -var transporter_scene: PackedScene = preload("res://Transporter.tscn") +var transporter_scene: PackedScene = preload("res://logistics/Transporter.tscn") # index into GameState.transporters -> live node var active: Dictionary = {} diff --git a/TransporterField.gd.uid b/logistics/TransporterField.gd.uid similarity index 100% rename from TransporterField.gd.uid rename to logistics/TransporterField.gd.uid diff --git a/VesselDelivery.gd b/logistics/VesselDelivery.gd similarity index 86% rename from VesselDelivery.gd rename to logistics/VesselDelivery.gd index 6392b62..71b21b4 100644 --- a/VesselDelivery.gd +++ b/logistics/VesselDelivery.gd @@ -1,6 +1,6 @@ extends Node2D -const VESSEL_DEFINITIONS = preload("res://VesselDefinitions.gd") +const VESSEL_DEFINITIONS = preload("res://vessels/VesselDefinitions.gd") # Visual-only craft-to-mothership flight. GameState owns position/progress; # this node just renders a finished hull headed toward the hangar. diff --git a/VesselDelivery.gd.uid b/logistics/VesselDelivery.gd.uid similarity index 100% rename from VesselDelivery.gd.uid rename to logistics/VesselDelivery.gd.uid diff --git a/VesselDeliveryField.gd b/logistics/VesselDeliveryField.gd similarity index 93% rename from VesselDeliveryField.gd rename to logistics/VesselDeliveryField.gd index 9b47319..d231632 100644 --- a/VesselDeliveryField.gd +++ b/logistics/VesselDeliveryField.gd @@ -2,7 +2,7 @@ extends Node2D @export var visible_radius: float = 2600.0 @onready var fleet: Node2D = get_node("../Fleet") -var delivery_script: Script = preload("res://VesselDelivery.gd") +var delivery_script: Script = preload("res://logistics/VesselDelivery.gd") var active: Dictionary = {} diff --git a/VesselDeliveryField.gd.uid b/logistics/VesselDeliveryField.gd.uid similarity index 100% rename from VesselDeliveryField.gd.uid rename to logistics/VesselDeliveryField.gd.uid diff --git a/BlackHolePlanetDefinition.tres b/planets/BlackHolePlanetDefinition.tres similarity index 71% rename from BlackHolePlanetDefinition.tres rename to planets/BlackHolePlanetDefinition.tres index 9fa5589..bed191c 100644 --- a/BlackHolePlanetDefinition.tres +++ b/planets/BlackHolePlanetDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="PlanetDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://PlanetDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://BlackHoleVisual.tscn" id="2"] +[ext_resource type="Script" path="res://planets/PlanetDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://planets/BlackHoleVisual.tscn" id="2"] [resource] script = ExtResource("1") diff --git a/BlackHoleVisual.gd b/planets/BlackHoleVisual.gd similarity index 100% rename from BlackHoleVisual.gd rename to planets/BlackHoleVisual.gd diff --git a/BlackHoleVisual.gd.uid b/planets/BlackHoleVisual.gd.uid similarity index 100% rename from BlackHoleVisual.gd.uid rename to planets/BlackHoleVisual.gd.uid diff --git a/ResearchLabPlanetVisual.tscn b/planets/BlackHoleVisual.tscn similarity index 62% rename from ResearchLabPlanetVisual.tscn rename to planets/BlackHoleVisual.tscn index bb2ebaa..3882ffd 100644 --- a/ResearchLabPlanetVisual.tscn +++ b/planets/BlackHoleVisual.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://ResearchLabPlanetVisual.gd" id="1"] +[ext_resource type="Script" path="res://planets/BlackHoleVisual.gd" id="1"] [node name="Visual" type="Node2D"] script = ExtResource("1") diff --git a/GasGiantDefinition.tres b/planets/GasGiantDefinition.tres similarity index 70% rename from GasGiantDefinition.tres rename to planets/GasGiantDefinition.tres index 0a5109c..3115a3d 100644 --- a/GasGiantDefinition.tres +++ b/planets/GasGiantDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="PlanetDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://PlanetDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://GasGiantVisual.tscn" id="2"] +[ext_resource type="Script" path="res://planets/PlanetDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://planets/GasGiantVisual.tscn" id="2"] [resource] script = ExtResource("1") diff --git a/GasGiantVisual.gd b/planets/GasGiantVisual.gd similarity index 100% rename from GasGiantVisual.gd rename to planets/GasGiantVisual.gd diff --git a/GasGiantVisual.gd.uid b/planets/GasGiantVisual.gd.uid similarity index 100% rename from GasGiantVisual.gd.uid rename to planets/GasGiantVisual.gd.uid diff --git a/GasGiantVisual.tscn b/planets/GasGiantVisual.tscn similarity index 56% rename from GasGiantVisual.tscn rename to planets/GasGiantVisual.tscn index 513b87e..3c87eaa 100644 --- a/GasGiantVisual.tscn +++ b/planets/GasGiantVisual.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://GasGiantVisual.gd" id="1"] +[ext_resource type="Script" path="res://planets/GasGiantVisual.gd" id="1"] [node name="Visual" type="Node2D"] script = ExtResource("1") diff --git a/Planet.gd b/planets/Planet.gd similarity index 98% rename from Planet.gd rename to planets/Planet.gd index 954af57..88159a2 100644 --- a/Planet.gd +++ b/planets/Planet.gd @@ -1,6 +1,6 @@ extends Node2D -const PLANET_DEFINITIONS = preload("res://PlanetDefinitions.gd") +const PLANET_DEFINITIONS = preload("res://planets/PlanetDefinitions.gd") # A landable world-object - unlike regular Asteroid.gd, planets are diff --git a/Planet.gd.uid b/planets/Planet.gd.uid similarity index 100% rename from Planet.gd.uid rename to planets/Planet.gd.uid diff --git a/Planet.tscn b/planets/Planet.tscn similarity index 68% rename from Planet.tscn rename to planets/Planet.tscn index 0e7fe1f..558d237 100644 --- a/Planet.tscn +++ b/planets/Planet.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://Planet.gd" id="1"] +[ext_resource type="Script" path="res://planets/Planet.gd" id="1"] [node name="Planet" type="Node2D"] script = ExtResource("1") diff --git a/PlanetAtmosphereController.gd b/planets/PlanetAtmosphereController.gd similarity index 98% rename from PlanetAtmosphereController.gd rename to planets/PlanetAtmosphereController.gd index 3f3599a..60dc775 100644 --- a/PlanetAtmosphereController.gd +++ b/planets/PlanetAtmosphereController.gd @@ -130,4 +130,4 @@ func _on_enter_pressed() -> void: func _enter_surface() -> void: - get_tree().change_scene_to_file("res://PlanetSurface.tscn") + get_tree().change_scene_to_file("res://surface/PlanetSurface.tscn") diff --git a/PlanetAtmosphereController.gd.uid b/planets/PlanetAtmosphereController.gd.uid similarity index 100% rename from PlanetAtmosphereController.gd.uid rename to planets/PlanetAtmosphereController.gd.uid diff --git a/PlanetDefinition.gd b/planets/PlanetDefinition.gd similarity index 100% rename from PlanetDefinition.gd rename to planets/PlanetDefinition.gd diff --git a/PlanetDefinition.gd.uid b/planets/PlanetDefinition.gd.uid similarity index 100% rename from PlanetDefinition.gd.uid rename to planets/PlanetDefinition.gd.uid diff --git a/PlanetDefinitions.gd b/planets/PlanetDefinitions.gd similarity index 61% rename from PlanetDefinitions.gd rename to planets/PlanetDefinitions.gd index 197202e..644f49a 100644 --- a/PlanetDefinitions.gd +++ b/planets/PlanetDefinitions.gd @@ -7,10 +7,10 @@ const BLACK_HOLE_ID: String = "black_hole" const RESEARCH_LAB_ID: String = "research_lab" const DEFAULT_DEFINITION_ID: String = ROCKY_ID const DEFINITIONS: Dictionary = { - ROCKY_ID: preload("res://RockyPlanetDefinition.tres"), - GAS_GIANT_ID: preload("res://GasGiantDefinition.tres"), - BLACK_HOLE_ID: preload("res://BlackHolePlanetDefinition.tres"), - RESEARCH_LAB_ID: preload("res://ResearchLabPlanetDefinition.tres"), + ROCKY_ID: preload("res://planets/RockyPlanetDefinition.tres"), + GAS_GIANT_ID: preload("res://planets/GasGiantDefinition.tres"), + BLACK_HOLE_ID: preload("res://planets/BlackHolePlanetDefinition.tres"), + RESEARCH_LAB_ID: preload("res://planets/ResearchLabPlanetDefinition.tres"), } diff --git a/PlanetDefinitions.gd.uid b/planets/PlanetDefinitions.gd.uid similarity index 100% rename from PlanetDefinitions.gd.uid rename to planets/PlanetDefinitions.gd.uid diff --git a/PlanetField.gd b/planets/PlanetField.gd similarity index 98% rename from PlanetField.gd rename to planets/PlanetField.gd index 21ea1fc..95625cf 100644 --- a/PlanetField.gd +++ b/planets/PlanetField.gd @@ -13,7 +13,7 @@ extends Node2D @onready var fleet: Node2D = get_node("../Fleet") -var planet_scene: PackedScene = preload("res://Planet.tscn") +var planet_scene: PackedScene = preload("res://planets/Planet.tscn") var populated_chunks: Dictionary = {} var timer: float = 0.0 diff --git a/PlanetField.gd.uid b/planets/PlanetField.gd.uid similarity index 100% rename from PlanetField.gd.uid rename to planets/PlanetField.gd.uid diff --git a/ResearchLabPlanetDefinition.tres b/planets/ResearchLabPlanetDefinition.tres similarity index 72% rename from ResearchLabPlanetDefinition.tres rename to planets/ResearchLabPlanetDefinition.tres index af5f88c..13c97ab 100644 --- a/ResearchLabPlanetDefinition.tres +++ b/planets/ResearchLabPlanetDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="PlanetDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://PlanetDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://ResearchLabPlanetVisual.tscn" id="2"] +[ext_resource type="Script" path="res://planets/PlanetDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://planets/ResearchLabPlanetVisual.tscn" id="2"] [resource] script = ExtResource("1") diff --git a/ResearchLabPlanetVisual.gd b/planets/ResearchLabPlanetVisual.gd similarity index 100% rename from ResearchLabPlanetVisual.gd rename to planets/ResearchLabPlanetVisual.gd diff --git a/ResearchLabPlanetVisual.gd.uid b/planets/ResearchLabPlanetVisual.gd.uid similarity index 100% rename from ResearchLabPlanetVisual.gd.uid rename to planets/ResearchLabPlanetVisual.gd.uid diff --git a/BlackHoleVisual.tscn b/planets/ResearchLabPlanetVisual.tscn similarity index 53% rename from BlackHoleVisual.tscn rename to planets/ResearchLabPlanetVisual.tscn index 65c3d79..99bd4f7 100644 --- a/BlackHoleVisual.tscn +++ b/planets/ResearchLabPlanetVisual.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://BlackHoleVisual.gd" id="1"] +[ext_resource type="Script" path="res://planets/ResearchLabPlanetVisual.gd" id="1"] [node name="Visual" type="Node2D"] script = ExtResource("1") diff --git a/RockyPlanetDefinition.tres b/planets/RockyPlanetDefinition.tres similarity index 74% rename from RockyPlanetDefinition.tres rename to planets/RockyPlanetDefinition.tres index b0a3e9f..1ede2f7 100644 --- a/RockyPlanetDefinition.tres +++ b/planets/RockyPlanetDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="PlanetDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://PlanetDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://RockyPlanetVisual.tscn" id="2"] +[ext_resource type="Script" path="res://planets/PlanetDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://planets/RockyPlanetVisual.tscn" id="2"] [resource] script = ExtResource("1") diff --git a/RockyPlanetVisual.gd b/planets/RockyPlanetVisual.gd similarity index 100% rename from RockyPlanetVisual.gd rename to planets/RockyPlanetVisual.gd diff --git a/RockyPlanetVisual.gd.uid b/planets/RockyPlanetVisual.gd.uid similarity index 100% rename from RockyPlanetVisual.gd.uid rename to planets/RockyPlanetVisual.gd.uid diff --git a/RockyPlanetVisual.tscn b/planets/RockyPlanetVisual.tscn similarity index 55% rename from RockyPlanetVisual.tscn rename to planets/RockyPlanetVisual.tscn index ee6a302..9e830b1 100644 --- a/RockyPlanetVisual.tscn +++ b/planets/RockyPlanetVisual.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://RockyPlanetVisual.gd" id="1"] +[ext_resource type="Script" path="res://planets/RockyPlanetVisual.gd" id="1"] [node name="Visual" type="Node2D"] script = ExtResource("1") diff --git a/project.godot b/project.godot index 5c355de..9af6740 100644 --- a/project.godot +++ b/project.godot @@ -11,13 +11,13 @@ config_version=5 [application] config/name="Spaceship" -run/main_scene="res://MainMenu.tscn" +run/main_scene="res://ui/MainMenu.tscn" config/features=PackedStringArray("4.7") config/icon="res://icon.svg" [autoload] -GameState="*res://GameState.gd" +GameState="*res://core/GameState.gd" [display] diff --git a/DarkMatterResourceDefinition.tres b/resources/DarkMatterResourceDefinition.tres similarity index 58% rename from DarkMatterResourceDefinition.tres rename to resources/DarkMatterResourceDefinition.tres index 07b9ee5..d602d18 100644 --- a/DarkMatterResourceDefinition.tres +++ b/resources/DarkMatterResourceDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="ResourceDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://ResourceDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://DarkMatterResourceGlyph.tscn" id="2"] +[ext_resource type="Script" path="res://resources/ResourceDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://resources/DarkMatterResourceGlyph.tscn" id="2"] [resource] script = ExtResource("1") diff --git a/DarkMatterResourceGlyph.gd b/resources/DarkMatterResourceGlyph.gd similarity index 100% rename from DarkMatterResourceGlyph.gd rename to resources/DarkMatterResourceGlyph.gd diff --git a/DarkMatterResourceGlyph.gd.uid b/resources/DarkMatterResourceGlyph.gd.uid similarity index 100% rename from DarkMatterResourceGlyph.gd.uid rename to resources/DarkMatterResourceGlyph.gd.uid diff --git a/DarkMatterResourceGlyph.tscn b/resources/DarkMatterResourceGlyph.tscn similarity index 72% rename from DarkMatterResourceGlyph.tscn rename to resources/DarkMatterResourceGlyph.tscn index 21d54f0..6d8e165 100644 --- a/DarkMatterResourceGlyph.tscn +++ b/resources/DarkMatterResourceGlyph.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://DarkMatterResourceGlyph.gd" id="1"] +[ext_resource type="Script" path="res://resources/DarkMatterResourceGlyph.gd" id="1"] [node name="GlyphVisual" type="Control"] layout_mode = 3 diff --git a/EnergyResourceDefinition.tres b/resources/EnergyResourceDefinition.tres similarity index 58% rename from EnergyResourceDefinition.tres rename to resources/EnergyResourceDefinition.tres index b56cbd9..7824715 100644 --- a/EnergyResourceDefinition.tres +++ b/resources/EnergyResourceDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="ResourceDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://ResourceDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://EnergyResourceGlyph.tscn" id="2"] +[ext_resource type="Script" path="res://resources/ResourceDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://resources/EnergyResourceGlyph.tscn" id="2"] [resource] script = ExtResource("1") diff --git a/EnergyResourceGlyph.gd b/resources/EnergyResourceGlyph.gd similarity index 100% rename from EnergyResourceGlyph.gd rename to resources/EnergyResourceGlyph.gd diff --git a/EnergyResourceGlyph.gd.uid b/resources/EnergyResourceGlyph.gd.uid similarity index 100% rename from EnergyResourceGlyph.gd.uid rename to resources/EnergyResourceGlyph.gd.uid diff --git a/EnergyResourceGlyph.tscn b/resources/EnergyResourceGlyph.tscn similarity index 73% rename from EnergyResourceGlyph.tscn rename to resources/EnergyResourceGlyph.tscn index ada9d15..fe8abd8 100644 --- a/EnergyResourceGlyph.tscn +++ b/resources/EnergyResourceGlyph.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://EnergyResourceGlyph.gd" id="1"] +[ext_resource type="Script" path="res://resources/EnergyResourceGlyph.gd" id="1"] [node name="GlyphVisual" type="Control"] layout_mode = 3 diff --git a/GasResourceDefinition.tres b/resources/GasResourceDefinition.tres similarity index 57% rename from GasResourceDefinition.tres rename to resources/GasResourceDefinition.tres index a36af07..c6d38ba 100644 --- a/GasResourceDefinition.tres +++ b/resources/GasResourceDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="ResourceDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://ResourceDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://GasResourceGlyph.tscn" id="2"] +[ext_resource type="Script" path="res://resources/ResourceDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://resources/GasResourceGlyph.tscn" id="2"] [resource] script = ExtResource("1") diff --git a/GasResourceGlyph.gd b/resources/GasResourceGlyph.gd similarity index 100% rename from GasResourceGlyph.gd rename to resources/GasResourceGlyph.gd diff --git a/GasResourceGlyph.gd.uid b/resources/GasResourceGlyph.gd.uid similarity index 100% rename from GasResourceGlyph.gd.uid rename to resources/GasResourceGlyph.gd.uid diff --git a/GasResourceGlyph.tscn b/resources/GasResourceGlyph.tscn similarity index 74% rename from GasResourceGlyph.tscn rename to resources/GasResourceGlyph.tscn index ee02276..d27ca4d 100644 --- a/GasResourceGlyph.tscn +++ b/resources/GasResourceGlyph.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://GasResourceGlyph.gd" id="1"] +[ext_resource type="Script" path="res://resources/GasResourceGlyph.gd" id="1"] [node name="GlyphVisual" type="Control"] layout_mode = 3 diff --git a/Inventory.gd b/resources/Inventory.gd similarity index 100% rename from Inventory.gd rename to resources/Inventory.gd diff --git a/Inventory.gd.uid b/resources/Inventory.gd.uid similarity index 100% rename from Inventory.gd.uid rename to resources/Inventory.gd.uid diff --git a/OreResourceDefinition.tres b/resources/OreResourceDefinition.tres similarity index 57% rename from OreResourceDefinition.tres rename to resources/OreResourceDefinition.tres index 6da27dc..692ad2d 100644 --- a/OreResourceDefinition.tres +++ b/resources/OreResourceDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="ResourceDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://ResourceDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://OreResourceGlyph.tscn" id="2"] +[ext_resource type="Script" path="res://resources/ResourceDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://resources/OreResourceGlyph.tscn" id="2"] [resource] script = ExtResource("1") diff --git a/OreResourceGlyph.gd b/resources/OreResourceGlyph.gd similarity index 100% rename from OreResourceGlyph.gd rename to resources/OreResourceGlyph.gd diff --git a/OreResourceGlyph.gd.uid b/resources/OreResourceGlyph.gd.uid similarity index 100% rename from OreResourceGlyph.gd.uid rename to resources/OreResourceGlyph.gd.uid diff --git a/OreResourceGlyph.tscn b/resources/OreResourceGlyph.tscn similarity index 74% rename from OreResourceGlyph.tscn rename to resources/OreResourceGlyph.tscn index 384a20e..f8e6f57 100644 --- a/OreResourceGlyph.tscn +++ b/resources/OreResourceGlyph.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://OreResourceGlyph.gd" id="1"] +[ext_resource type="Script" path="res://resources/OreResourceGlyph.gd" id="1"] [node name="GlyphVisual" type="Control"] layout_mode = 3 diff --git a/ResourceDefinition.gd b/resources/ResourceDefinition.gd similarity index 100% rename from ResourceDefinition.gd rename to resources/ResourceDefinition.gd diff --git a/ResourceDefinition.gd.uid b/resources/ResourceDefinition.gd.uid similarity index 100% rename from ResourceDefinition.gd.uid rename to resources/ResourceDefinition.gd.uid diff --git a/ResourceDefinitions.gd b/resources/ResourceDefinitions.gd similarity index 62% rename from ResourceDefinitions.gd rename to resources/ResourceDefinitions.gd index 12ca1bd..2430ffc 100644 --- a/ResourceDefinitions.gd +++ b/resources/ResourceDefinitions.gd @@ -7,10 +7,10 @@ const ENERGY_ID: String = "energy" const DARK_MATTER_ID: String = "dark_matter" const ORDER: PackedStringArray = [ORE_ID, GAS_ID, ENERGY_ID, DARK_MATTER_ID] const DEFINITIONS: Dictionary = { - ORE_ID: preload("res://OreResourceDefinition.tres"), - GAS_ID: preload("res://GasResourceDefinition.tres"), - ENERGY_ID: preload("res://EnergyResourceDefinition.tres"), - DARK_MATTER_ID: preload("res://DarkMatterResourceDefinition.tres"), + ORE_ID: preload("res://resources/OreResourceDefinition.tres"), + GAS_ID: preload("res://resources/GasResourceDefinition.tres"), + ENERGY_ID: preload("res://resources/EnergyResourceDefinition.tres"), + DARK_MATTER_ID: preload("res://resources/DarkMatterResourceDefinition.tres"), } diff --git a/ResourceDefinitions.gd.uid b/resources/ResourceDefinitions.gd.uid similarity index 100% rename from ResourceDefinitions.gd.uid rename to resources/ResourceDefinitions.gd.uid diff --git a/ResourceGlyph.gd b/resources/ResourceGlyph.gd similarity index 92% rename from ResourceGlyph.gd rename to resources/ResourceGlyph.gd index 14a90d0..a7979a7 100644 --- a/ResourceGlyph.gd +++ b/resources/ResourceGlyph.gd @@ -1,7 +1,7 @@ class_name ResourceGlyph extends Control -const RESOURCE_DEFINITIONS = preload("res://ResourceDefinitions.gd") +const RESOURCE_DEFINITIONS = preload("res://resources/ResourceDefinitions.gd") # A small, non-interactive resource mark shared by tables and transfer rows. # Resource buttons used to borrow IconButton, which made decorative icons diff --git a/ResourceGlyph.gd.uid b/resources/ResourceGlyph.gd.uid similarity index 100% rename from ResourceGlyph.gd.uid rename to resources/ResourceGlyph.gd.uid diff --git a/gas_surface.gdshader b/shaders/gas_surface.gdshader similarity index 100% rename from gas_surface.gdshader rename to shaders/gas_surface.gdshader diff --git a/gas_surface.gdshader.uid b/shaders/gas_surface.gdshader.uid similarity index 100% rename from gas_surface.gdshader.uid rename to shaders/gas_surface.gdshader.uid diff --git a/lunar_surface.gdshader b/shaders/lunar_surface.gdshader similarity index 99% rename from lunar_surface.gdshader rename to shaders/lunar_surface.gdshader index 9f42999..53f9244 100644 --- a/lunar_surface.gdshader +++ b/shaders/lunar_surface.gdshader @@ -32,7 +32,7 @@ shader_type canvas_item; // that brought it down - a bounded 3x3 scan, one hash per cell instead of // three, and one sqrt per pixel instead of one per sample - are each // justified at the point they appear below. Time it with -// bash tests/profile_shader.sh res://lunar_surface.gdshader +// bash tests/profile_shader.sh res://shaders/lunar_surface.gdshader uniform vec2 camera_cell = vec2(0.0, 0.0); uniform vec2 camera_frac = vec2(0.0, 0.0); diff --git a/lunar_surface.gdshader.uid b/shaders/lunar_surface.gdshader.uid similarity index 100% rename from lunar_surface.gdshader.uid rename to shaders/lunar_surface.gdshader.uid diff --git a/lunar_tiled.gdshader b/shaders/lunar_tiled.gdshader similarity index 100% rename from lunar_tiled.gdshader rename to shaders/lunar_tiled.gdshader diff --git a/lunar_tiled.gdshader.uid b/shaders/lunar_tiled.gdshader.uid similarity index 100% rename from lunar_tiled.gdshader.uid rename to shaders/lunar_tiled.gdshader.uid diff --git a/research_lab_surface.gdshader b/shaders/research_lab_surface.gdshader similarity index 100% rename from research_lab_surface.gdshader rename to shaders/research_lab_surface.gdshader diff --git a/research_lab_surface.gdshader.uid b/shaders/research_lab_surface.gdshader.uid similarity index 100% rename from research_lab_surface.gdshader.uid rename to shaders/research_lab_surface.gdshader.uid diff --git a/starfield.gdshader b/shaders/starfield.gdshader similarity index 100% rename from starfield.gdshader rename to shaders/starfield.gdshader diff --git a/starfield.gdshader.uid b/shaders/starfield.gdshader.uid similarity index 100% rename from starfield.gdshader.uid rename to shaders/starfield.gdshader.uid diff --git a/CaptureLabel.gd b/surface/CaptureLabel.gd similarity index 95% rename from CaptureLabel.gd rename to surface/CaptureLabel.gd index d3f6ef3..09d6ccc 100644 --- a/CaptureLabel.gd +++ b/surface/CaptureLabel.gd @@ -9,7 +9,7 @@ extends Label # - the same load-order hazard PlanetSurfaceController's setup_host comment # already documents: the global identifier is only guaranteed registered # after an editor/import pass, a direct preload never depends on that. -const PLANET_DEFINITIONS = preload("res://PlanetDefinitions.gd") +const PLANET_DEFINITIONS = preload("res://planets/PlanetDefinitions.gd") var _was_conquered: bool = false diff --git a/CaptureLabel.gd.uid b/surface/CaptureLabel.gd.uid similarity index 100% rename from CaptureLabel.gd.uid rename to surface/CaptureLabel.gd.uid diff --git a/CapturePoint.gd b/surface/CapturePoint.gd similarity index 100% rename from CapturePoint.gd rename to surface/CapturePoint.gd diff --git a/CapturePoint.gd.uid b/surface/CapturePoint.gd.uid similarity index 100% rename from CapturePoint.gd.uid rename to surface/CapturePoint.gd.uid diff --git a/CapturePoint.tscn b/surface/CapturePoint.tscn similarity index 65% rename from CapturePoint.tscn rename to surface/CapturePoint.tscn index 39dbe89..6a754c0 100644 --- a/CapturePoint.tscn +++ b/surface/CapturePoint.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://CapturePoint.gd" id="1"] +[ext_resource type="Script" path="res://surface/CapturePoint.gd" id="1"] [node name="CapturePoint" type="Area2D"] script = ExtResource("1") diff --git a/GasSurfaceFeatures.tscn b/surface/GasSurfaceFeatures.tscn similarity index 66% rename from GasSurfaceFeatures.tscn rename to surface/GasSurfaceFeatures.tscn index 576b66d..9309499 100644 --- a/GasSurfaceFeatures.tscn +++ b/surface/GasSurfaceFeatures.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://GasVentField.gd" id="1"] +[ext_resource type="Script" path="res://surface/GasVentField.gd" id="1"] [node name="ResourceProvider" type="Node2D"] script = ExtResource("1") diff --git a/GasSurfaceProfile.tres b/surface/GasSurfaceProfile.tres similarity index 64% rename from GasSurfaceProfile.tres rename to surface/GasSurfaceProfile.tres index 73f6bcf..a01121c 100644 --- a/GasSurfaceProfile.tres +++ b/surface/GasSurfaceProfile.tres @@ -1,8 +1,8 @@ [gd_resource type="Resource" script_class="PlanetSurfaceProfile" load_steps=4 format=3] -[ext_resource type="Script" path="res://PlanetSurfaceProfile.gd" id="1"] -[ext_resource type="PackedScene" path="res://GasSurfaceFeatures.tscn" id="2"] -[ext_resource type="Shader" path="res://gas_surface.gdshader" id="3"] +[ext_resource type="Script" path="res://surface/PlanetSurfaceProfile.gd" id="1"] +[ext_resource type="PackedScene" path="res://surface/GasSurfaceFeatures.tscn" id="2"] +[ext_resource type="Shader" path="res://shaders/gas_surface.gdshader" id="3"] [resource] script = ExtResource("1") diff --git a/GasVentField.gd b/surface/GasVentField.gd similarity index 97% rename from GasVentField.gd rename to surface/GasVentField.gd index 6b17eb6..29f2f82 100644 --- a/GasVentField.gd +++ b/surface/GasVentField.gd @@ -5,7 +5,7 @@ extends Node2D # this script is reached indirectly - loading Main.tscn from inside a preview # scene made it a hard parse error. Same workaround PlanetSetups and # PlanetSetupEditor already use. -const RESOURCE_PICKUP_VFX = preload("res://ResourcePickupVFX.gd") +const RESOURCE_PICKUP_VFX = preload("res://vfx/ResourcePickupVFX.gd") @export var fleet_path: NodePath = NodePath("../Fleet") @onready var fleet: Node2D = get_node(fleet_path) diff --git a/GasVentField.gd.uid b/surface/GasVentField.gd.uid similarity index 100% rename from GasVentField.gd.uid rename to surface/GasVentField.gd.uid diff --git a/PlanetSetup.gd b/surface/PlanetSetup.gd similarity index 100% rename from PlanetSetup.gd rename to surface/PlanetSetup.gd diff --git a/PlanetSetup.gd.uid b/surface/PlanetSetup.gd.uid similarity index 100% rename from PlanetSetup.gd.uid rename to surface/PlanetSetup.gd.uid diff --git a/PlanetSetupEditor.gd b/surface/PlanetSetupEditor.gd similarity index 98% rename from PlanetSetupEditor.gd rename to surface/PlanetSetupEditor.gd index 72d0773..3d8cfd3 100644 --- a/PlanetSetupEditor.gd +++ b/surface/PlanetSetupEditor.gd @@ -16,14 +16,14 @@ extends Node2D # every other cross-file lookup added this session (see #42/#44's # load-order notes) - a bare class-name reference needs the global # class_name cache already warm, which an explicit script path never does. -const ENEMY_DEFINITIONS = preload("res://EnemyDefinitions.gd") +const ENEMY_DEFINITIONS = preload("res://enemies/EnemyDefinitions.gd") # By path, not by its `EnemyMarker` global name: the class_name cache is not # guaranteed warm before an import pass has run, the same hazard PlanetSetups # and PlanetSurfaceController already work around. -const ENEMY_MARKER = preload("res://EnemyMarker.gd") -const PLANET_SETUP_SCRIPT = preload("res://PlanetSetup.gd") -const PLANET_SETUP_SPAWN_SCRIPT = preload("res://PlanetSetupSpawn.gd") -const PALETTE_ENTRY_BUTTON_SCRIPT = preload("res://PaletteEntryButton.gd") +const ENEMY_MARKER = preload("res://enemies/EnemyMarker.gd") +const PLANET_SETUP_SCRIPT = preload("res://surface/PlanetSetup.gd") +const PLANET_SETUP_SPAWN_SCRIPT = preload("res://surface/PlanetSetupSpawn.gd") +const PALETTE_ENTRY_BUTTON_SCRIPT = preload("res://ui/PaletteEntryButton.gd") const MIN_ZOOM: float = 0.3 const MAX_ZOOM: float = 4.0 @@ -98,7 +98,7 @@ var pan_start_camera: Vector2 = Vector2.ZERO func _ready() -> void: _profile_ids = PlanetSurfaceProfiles.PROFILES.keys() - back_button.pressed.connect(func(): get_tree().change_scene_to_file("res://MainMenu.tscn")) + back_button.pressed.connect(func(): get_tree().change_scene_to_file("res://ui/MainMenu.tscn")) profile_button.pressed.connect(_on_profile_pressed) reward_button.pressed.connect(_on_reward_pressed) new_button.pressed.connect(_on_new_pressed) diff --git a/PlanetSetupEditor.gd.uid b/surface/PlanetSetupEditor.gd.uid similarity index 100% rename from PlanetSetupEditor.gd.uid rename to surface/PlanetSetupEditor.gd.uid diff --git a/PlanetSetupEditor.tscn b/surface/PlanetSetupEditor.tscn similarity index 96% rename from PlanetSetupEditor.tscn rename to surface/PlanetSetupEditor.tscn index 8398d45..7e5eaa5 100644 --- a/PlanetSetupEditor.tscn +++ b/surface/PlanetSetupEditor.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=4 format=3] -[ext_resource type="Script" path="res://PlanetSetupEditor.gd" id="1"] -[ext_resource type="PackedScene" path="res://SurfaceBackground.tscn" id="3"] -[ext_resource type="Script" path="res://IconButton.gd" id="4"] +[ext_resource type="Script" path="res://surface/PlanetSetupEditor.gd" id="1"] +[ext_resource type="PackedScene" path="res://surface/SurfaceBackground.tscn" id="3"] +[ext_resource type="Script" path="res://ui/IconButton.gd" id="4"] [node name="PlanetSetupEditor" type="Node2D"] script = ExtResource("1") diff --git a/PlanetSetupHost.gd b/surface/PlanetSetupHost.gd similarity index 93% rename from PlanetSetupHost.gd rename to surface/PlanetSetupHost.gd index a1052ea..3a90cc6 100644 --- a/PlanetSetupHost.gd +++ b/surface/PlanetSetupHost.gd @@ -6,8 +6,8 @@ extends Node2D # through GameState so re-landing on a partly-taken planet keeps its # progress - and one enemy per authored spawn. -const CAPTURE_POINT_SCENE: PackedScene = preload("res://CapturePoint.tscn") -const ENEMY_SCENE: PackedScene = preload("res://Enemy.tscn") +const CAPTURE_POINT_SCENE: PackedScene = preload("res://surface/CapturePoint.tscn") +const ENEMY_SCENE: PackedScene = preload("res://enemies/Enemy.tscn") var setup: Resource diff --git a/PlanetSetupHost.gd.uid b/surface/PlanetSetupHost.gd.uid similarity index 100% rename from PlanetSetupHost.gd.uid rename to surface/PlanetSetupHost.gd.uid diff --git a/PlanetSetupHost.tscn b/surface/PlanetSetupHost.tscn similarity index 58% rename from PlanetSetupHost.tscn rename to surface/PlanetSetupHost.tscn index f87cc83..4e420fe 100644 --- a/PlanetSetupHost.tscn +++ b/surface/PlanetSetupHost.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://PlanetSetupHost.gd" id="1"] +[ext_resource type="Script" path="res://surface/PlanetSetupHost.gd" id="1"] [node name="PlanetSetupHost" type="Node2D"] script = ExtResource("1") diff --git a/PlanetSetupSpawn.gd b/surface/PlanetSetupSpawn.gd similarity index 100% rename from PlanetSetupSpawn.gd rename to surface/PlanetSetupSpawn.gd diff --git a/PlanetSetupSpawn.gd.uid b/surface/PlanetSetupSpawn.gd.uid similarity index 100% rename from PlanetSetupSpawn.gd.uid rename to surface/PlanetSetupSpawn.gd.uid diff --git a/PlanetSetups.gd b/surface/PlanetSetups.gd similarity index 98% rename from PlanetSetups.gd rename to surface/PlanetSetups.gd index 03559c2..e1d35dd 100644 --- a/PlanetSetups.gd +++ b/surface/PlanetSetups.gd @@ -12,7 +12,7 @@ const SETUPS_DIR: String = "res://PlanetSetups" # same load-order hazard as PlanetSurfaceController's setup_host: a global # class_name identifier can be looked up before an import pass has # registered it, while a direct script preload never depends on that cache. -const PLANET_SETUP_SCRIPT: Script = preload("res://PlanetSetup.gd") +const PLANET_SETUP_SCRIPT: Script = preload("res://surface/PlanetSetup.gd") static var _all: Array = [] static var _scanned: bool = false diff --git a/PlanetSetups.gd.uid b/surface/PlanetSetups.gd.uid similarity index 100% rename from PlanetSetups.gd.uid rename to surface/PlanetSetups.gd.uid diff --git a/PlanetSurface.tscn b/surface/PlanetSurface.tscn similarity index 87% rename from PlanetSurface.tscn rename to surface/PlanetSurface.tscn index 4d995e2..a1074be 100644 --- a/PlanetSurface.tscn +++ b/surface/PlanetSurface.tscn @@ -1,18 +1,18 @@ [gd_scene load_steps=16 format=3] -[ext_resource type="Script" path="res://GameController.gd" id="1"] -[ext_resource type="PackedScene" path="res://SurfaceBackground.tscn" id="3"] -[ext_resource type="Script" path="res://Fleet.gd" id="4"] -[ext_resource type="Script" path="res://PlanetSurfaceController.gd" id="5"] -[ext_resource type="Script" path="res://IconButton.gd" id="6"] -[ext_resource type="Script" path="res://TouchJoystick.gd" id="7"] -[ext_resource type="Script" path="res://ResourceReadout.gd" id="9"] -[ext_resource type="Script" path="res://MouseCombatController.gd" id="mouse_ctrl"] -[ext_resource type="Script" path="res://FireStickController.gd" id="fire_ctrl"] -[ext_resource type="Script" path="res://GasBombController.gd" id="14"] -[ext_resource type="Script" path="res://LaserController.gd" id="16"] -[ext_resource type="Script" path="res://SpeedFader.gd" id="17"] -[ext_resource type="Script" path="res://CaptureLabel.gd" id="15"] +[ext_resource type="Script" path="res://controllers/GameController.gd" id="1"] +[ext_resource type="PackedScene" path="res://surface/SurfaceBackground.tscn" id="3"] +[ext_resource type="Script" path="res://vessels/Fleet.gd" id="4"] +[ext_resource type="Script" path="res://surface/PlanetSurfaceController.gd" id="5"] +[ext_resource type="Script" path="res://ui/IconButton.gd" id="6"] +[ext_resource type="Script" path="res://ui/TouchJoystick.gd" id="7"] +[ext_resource type="Script" path="res://ui/ResourceReadout.gd" id="9"] +[ext_resource type="Script" path="res://controllers/MouseCombatController.gd" id="mouse_ctrl"] +[ext_resource type="Script" path="res://controllers/FireStickController.gd" id="fire_ctrl"] +[ext_resource type="Script" path="res://controllers/GasBombController.gd" id="14"] +[ext_resource type="Script" path="res://controllers/LaserController.gd" id="16"] +[ext_resource type="Script" path="res://ui/SpeedFader.gd" id="17"] +[ext_resource type="Script" path="res://surface/CaptureLabel.gd" id="15"] [node name="PlanetSurface" type="Node2D"] script = ExtResource("1") diff --git a/PlanetSurfaceController.gd b/surface/PlanetSurfaceController.gd similarity index 91% rename from PlanetSurfaceController.gd rename to surface/PlanetSurfaceController.gd index f25ef45..2347325 100644 --- a/PlanetSurfaceController.gd +++ b/surface/PlanetSurfaceController.gd @@ -1,9 +1,9 @@ extends Node2D -const SURFACE_PROFILES = preload("res://PlanetSurfaceProfiles.gd") -const PLANET_DEFINITIONS = preload("res://PlanetDefinitions.gd") -const PLANET_SETUPS = preload("res://PlanetSetups.gd") -const SETUP_HOST_SCENE: PackedScene = preload("res://PlanetSetupHost.tscn") +const SURFACE_PROFILES = preload("res://surface/PlanetSurfaceProfiles.gd") +const PLANET_DEFINITIONS = preload("res://planets/PlanetDefinitions.gd") +const PLANET_SETUPS = preload("res://surface/PlanetSetups.gd") +const SETUP_HOST_SCENE: PackedScene = preload("res://surface/PlanetSetupHost.tscn") # Bootstraps the surviving fleet, including each vessel type, on this scene's # own startup (from GameState, since this is a fresh scene tree - nothing here @@ -90,4 +90,4 @@ func _on_exit_pressed() -> void: func _return_to_space() -> void: - get_tree().change_scene_to_file("res://Main.tscn") + get_tree().change_scene_to_file("res://world/Main.tscn") diff --git a/PlanetSurfaceController.gd.uid b/surface/PlanetSurfaceController.gd.uid similarity index 100% rename from PlanetSurfaceController.gd.uid rename to surface/PlanetSurfaceController.gd.uid diff --git a/PlanetSurfaceProfile.gd b/surface/PlanetSurfaceProfile.gd similarity index 100% rename from PlanetSurfaceProfile.gd rename to surface/PlanetSurfaceProfile.gd diff --git a/PlanetSurfaceProfile.gd.uid b/surface/PlanetSurfaceProfile.gd.uid similarity index 100% rename from PlanetSurfaceProfile.gd.uid rename to surface/PlanetSurfaceProfile.gd.uid diff --git a/PlanetSurfaceProfiles.gd b/surface/PlanetSurfaceProfiles.gd similarity index 50% rename from PlanetSurfaceProfiles.gd rename to surface/PlanetSurfaceProfiles.gd index 9d42e5e..8beeaac 100644 --- a/PlanetSurfaceProfiles.gd +++ b/surface/PlanetSurfaceProfiles.gd @@ -3,10 +3,10 @@ extends RefCounted const DEFAULT_PROFILE_ID: String = "rocky" const PROFILES: Dictionary = { - "rocky": preload("res://RockySurfaceProfile.tres"), - "gas": preload("res://GasSurfaceProfile.tres"), - "void": preload("res://VoidSurfaceProfile.tres"), - "research_lab": preload("res://ResearchLabSurfaceProfile.tres"), + "rocky": preload("res://surface/RockySurfaceProfile.tres"), + "gas": preload("res://surface/GasSurfaceProfile.tres"), + "void": preload("res://surface/VoidSurfaceProfile.tres"), + "research_lab": preload("res://surface/ResearchLabSurfaceProfile.tres"), } diff --git a/PlanetSurfaceProfiles.gd.uid b/surface/PlanetSurfaceProfiles.gd.uid similarity index 100% rename from PlanetSurfaceProfiles.gd.uid rename to surface/PlanetSurfaceProfiles.gd.uid diff --git a/ResearchLabSurfaceProfile.tres b/surface/ResearchLabSurfaceProfile.tres similarity index 71% rename from ResearchLabSurfaceProfile.tres rename to surface/ResearchLabSurfaceProfile.tres index d779e0f..2c5e5ce 100644 --- a/ResearchLabSurfaceProfile.tres +++ b/surface/ResearchLabSurfaceProfile.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="PlanetSurfaceProfile" load_steps=3 format=3] -[ext_resource type="Script" path="res://PlanetSurfaceProfile.gd" id="1"] -[ext_resource type="Shader" path="res://research_lab_surface.gdshader" id="2"] +[ext_resource type="Script" path="res://surface/PlanetSurfaceProfile.gd" id="1"] +[ext_resource type="Shader" path="res://shaders/research_lab_surface.gdshader" id="2"] [resource] script = ExtResource("1") diff --git a/Rock.gd b/surface/Rock.gd similarity index 98% rename from Rock.gd rename to surface/Rock.gd index f48b23d..2a78ad4 100644 --- a/Rock.gd +++ b/surface/Rock.gd @@ -21,7 +21,7 @@ signal collected # this script is reached indirectly - loading Main.tscn from inside a preview # scene made it a hard parse error. Same workaround PlanetSetups and # PlanetSetupEditor already use. -const RESOURCE_PICKUP_VFX = preload("res://ResourcePickupVFX.gd") +const RESOURCE_PICKUP_VFX = preload("res://vfx/ResourcePickupVFX.gd") # Seconds before an uncollected rock disappears. 0 means never, which is what # hand-placed surface rocks use - a planet surface is bounded and authored, so diff --git a/Rock.gd.uid b/surface/Rock.gd.uid similarity index 100% rename from Rock.gd.uid rename to surface/Rock.gd.uid diff --git a/Rock.tscn b/surface/Rock.tscn similarity index 78% rename from Rock.tscn rename to surface/Rock.tscn index 1062c43..153ab62 100644 --- a/Rock.tscn +++ b/surface/Rock.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3] -[ext_resource type="Script" path="res://Rock.gd" id="1"] +[ext_resource type="Script" path="res://surface/Rock.gd" id="1"] [sub_resource type="CircleShape2D" id="1"] radius = 26.0 diff --git a/RockField.gd b/surface/RockField.gd similarity index 97% rename from RockField.gd rename to surface/RockField.gd index dd839ed..3dc45ea 100644 --- a/RockField.gd +++ b/surface/RockField.gd @@ -20,7 +20,7 @@ extends Node2D @export var fleet_path: NodePath = NodePath("../Fleet") @onready var fleet: Node2D = get_node(fleet_path) -var rock_scene: PackedScene = preload("res://Rock.tscn") +var rock_scene: PackedScene = preload("res://surface/Rock.tscn") var rocks: Array = [] var timer: float = 0.0 var rng: RandomNumberGenerator = RandomNumberGenerator.new() diff --git a/RockField.gd.uid b/surface/RockField.gd.uid similarity index 100% rename from RockField.gd.uid rename to surface/RockField.gd.uid diff --git a/RockySurfaceFeatures.tscn b/surface/RockySurfaceFeatures.tscn similarity index 67% rename from RockySurfaceFeatures.tscn rename to surface/RockySurfaceFeatures.tscn index f31b5c8..56c0d95 100644 --- a/RockySurfaceFeatures.tscn +++ b/surface/RockySurfaceFeatures.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://RockField.gd" id="1"] +[ext_resource type="Script" path="res://surface/RockField.gd" id="1"] [node name="ResourceProvider" type="Node2D"] script = ExtResource("1") diff --git a/RockySurfaceProfile.tres b/surface/RockySurfaceProfile.tres similarity index 63% rename from RockySurfaceProfile.tres rename to surface/RockySurfaceProfile.tres index fad0c2b..1ef08f1 100644 --- a/RockySurfaceProfile.tres +++ b/surface/RockySurfaceProfile.tres @@ -1,8 +1,8 @@ [gd_resource type="Resource" script_class="PlanetSurfaceProfile" load_steps=4 format=3] -[ext_resource type="Script" path="res://PlanetSurfaceProfile.gd" id="1"] -[ext_resource type="PackedScene" path="res://RockySurfaceFeatures.tscn" id="2"] -[ext_resource type="Shader" path="res://lunar_tiled.gdshader" id="3"] +[ext_resource type="Script" path="res://surface/PlanetSurfaceProfile.gd" id="1"] +[ext_resource type="PackedScene" path="res://surface/RockySurfaceFeatures.tscn" id="2"] +[ext_resource type="Shader" path="res://shaders/lunar_tiled.gdshader" id="3"] [resource] script = ExtResource("1") diff --git a/SurfaceBackground.gd b/surface/SurfaceBackground.gd similarity index 99% rename from SurfaceBackground.gd rename to surface/SurfaceBackground.gd index 029c390..fd5cdf5 100644 --- a/SurfaceBackground.gd +++ b/surface/SurfaceBackground.gd @@ -142,7 +142,7 @@ func _bake_field() -> void: return _baked_key = key - var procedural: Shader = load("res://lunar_surface.gdshader") + var procedural: Shader = load("res://shaders/lunar_surface.gdshader") if procedural == null: push_warning("surface background: could not load the field shader to bake") return diff --git a/SurfaceBackground.gd.uid b/surface/SurfaceBackground.gd.uid similarity index 100% rename from SurfaceBackground.gd.uid rename to surface/SurfaceBackground.gd.uid diff --git a/SurfaceBackground.tscn b/surface/SurfaceBackground.tscn similarity index 81% rename from SurfaceBackground.tscn rename to surface/SurfaceBackground.tscn index f41a98d..b3bc58e 100644 --- a/SurfaceBackground.tscn +++ b/surface/SurfaceBackground.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=4 format=3] -[ext_resource type="Script" path="res://SurfaceBackground.gd" id="1"] -[ext_resource type="Shader" path="res://lunar_tiled.gdshader" id="2"] +[ext_resource type="Script" path="res://surface/SurfaceBackground.gd" id="1"] +[ext_resource type="Shader" path="res://shaders/lunar_tiled.gdshader" id="2"] [sub_resource type="ShaderMaterial" id="1"] resource_local_to_scene = true diff --git a/VoidSurfaceProfile.tres b/surface/VoidSurfaceProfile.tres similarity index 71% rename from VoidSurfaceProfile.tres rename to surface/VoidSurfaceProfile.tres index 40cbe56..0d3bf09 100644 --- a/VoidSurfaceProfile.tres +++ b/surface/VoidSurfaceProfile.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="PlanetSurfaceProfile" load_steps=3 format=3] -[ext_resource type="Script" path="res://PlanetSurfaceProfile.gd" id="1"] -[ext_resource type="Shader" path="res://lunar_tiled.gdshader" id="2"] +[ext_resource type="Script" path="res://surface/PlanetSurfaceProfile.gd" id="1"] +[ext_resource type="Shader" path="res://shaders/lunar_tiled.gdshader" id="2"] [resource] script = ExtResource("1") diff --git a/tests/_artillery_telegraph_gas_preview.gd b/tests/_artillery_telegraph_gas_preview.gd index 703aaf4..134fdb3 100644 --- a/tests/_artillery_telegraph_gas_preview.gd +++ b/tests/_artillery_telegraph_gas_preview.gd @@ -10,11 +10,11 @@ func _ready() -> void: GameState.planet_id = "artillery_preview_gas" GameState.planet_definition_id = "gas_giant" GameState.surviving_ship_count = 3 - var surface: Node = load("res://PlanetSurface.tscn").instantiate() + var surface: Node = load("res://surface/PlanetSurface.tscn").instantiate() surface.get_node("SurfaceController").fade_duration = 0.0 add_child(surface) - var shell: Node = load("res://ArtilleryShell.tscn").instantiate() + var shell: Node = load("res://enemies/ArtilleryShell.tscn").instantiate() shell.aoe_radius = 220.0 surface.add_child(shell) # Frozen with the shell part-way to its target, which is the moment the diff --git a/tests/_artillery_telegraph_rocky_preview.gd b/tests/_artillery_telegraph_rocky_preview.gd index bff4cd0..56612c8 100644 --- a/tests/_artillery_telegraph_rocky_preview.gd +++ b/tests/_artillery_telegraph_rocky_preview.gd @@ -10,11 +10,11 @@ func _ready() -> void: GameState.planet_id = "artillery_preview_rocky" GameState.planet_definition_id = "rocky" GameState.surviving_ship_count = 3 - var surface: Node = load("res://PlanetSurface.tscn").instantiate() + var surface: Node = load("res://surface/PlanetSurface.tscn").instantiate() surface.get_node("SurfaceController").fade_duration = 0.0 add_child(surface) - var shell: Node = load("res://ArtilleryShell.tscn").instantiate() + var shell: Node = load("res://enemies/ArtilleryShell.tscn").instantiate() shell.aoe_radius = 220.0 surface.add_child(shell) # Frozen with the shell part-way to its target, which is the moment the diff --git a/tests/_black_hole_space_preview.gd b/tests/_black_hole_space_preview.gd index 7949634..c3c8fa0 100644 --- a/tests/_black_hole_space_preview.gd +++ b/tests/_black_hole_space_preview.gd @@ -15,7 +15,7 @@ func _ready() -> void: func _spawn(planet_name: String, definition_id: String, at: Vector2, shape_seed: int) -> void: - var planet: Node2D = load("res://Planet.tscn").instantiate() + var planet: Node2D = load("res://planets/Planet.tscn").instantiate() planet.planet_name = planet_name planet.definition_id = definition_id planet.shape_seed = shape_seed diff --git a/tests/_build_menu_preview.gd b/tests/_build_menu_preview.gd index 7c410e9..3074dc0 100644 --- a/tests/_build_menu_preview.gd +++ b/tests/_build_menu_preview.gd @@ -16,7 +16,7 @@ func _ready() -> void: # legible at full strength. # Partly researched, to show the menu repacking around what is hidden. GameState.unlocked = ["shipyards", "logistics"] - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("UI/BuildMenu").visible = true main.get_node("BuildController")._refresh_build_status() diff --git a/tests/_build_popup_preview.gd b/tests/_build_popup_preview.gd index d3c6b1d..c5f0a2d 100644 --- a/tests/_build_popup_preview.gd +++ b/tests/_build_popup_preview.gd @@ -18,7 +18,7 @@ func _ready() -> void: GameState.rocks = 500 GameState.add_building(GameState.BUILDING_MOTHERSHIP, Vector2(-900.0, 0.0)) - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("AsteroidField").set_process(false) main.get_node("EnemySpawner").set_process(false) diff --git a/tests/_capture_points_preview.gd b/tests/_capture_points_preview.gd index 2de5d21..70cb03c 100644 --- a/tests/_capture_points_preview.gd +++ b/tests/_capture_points_preview.gd @@ -3,7 +3,7 @@ extends Node2D # Preloaded by path rather than an `is CapturePoint` check - this preview # runs through screenshot.sh, which (unlike run_tests.sh) does not run an # import pass first, so the global class_name cache may not be warm yet. -const CAPTURE_POINT_SCRIPT = preload("res://CapturePoint.gd") +const CAPTURE_POINT_SCRIPT = preload("res://surface/CapturePoint.gd") func _ready() -> void: @@ -12,7 +12,7 @@ func _ready() -> void: GameState.planet_definition_id = "rocky" GameState.surviving_ship_count = 3 GameState.rocks = 128 - var surface: Node = load("res://PlanetSurface.tscn").instantiate() + var surface: Node = load("res://surface/PlanetSurface.tscn").instantiate() surface.get_node("SurfaceController").fade_duration = 0.0 add_child(surface) diff --git a/tests/_cargo_readout_preview.gd b/tests/_cargo_readout_preview.gd index 86361f3..b1a7414 100644 --- a/tests/_cargo_readout_preview.gd +++ b/tests/_cargo_readout_preview.gd @@ -13,4 +13,4 @@ func _ready() -> void: GameState.gas = 46 GameState.fleet_cargo = 34 GameState.fleet_gas_cargo = 17 - add_child(load("res://Main.tscn").instantiate()) + add_child(load("res://world/Main.tscn").instantiate()) diff --git a/tests/_carrier_crafter_preview.gd b/tests/_carrier_crafter_preview.gd index 36fa21c..d9f206f 100644 --- a/tests/_carrier_crafter_preview.gd +++ b/tests/_carrier_crafter_preview.gd @@ -11,7 +11,7 @@ func _ready() -> void: GameState.extractors.clear() GameState.rocks = 500 GameState.vessel_levels = {"unlock_shield": 1, "unlock_gas_bomber": 1, "unlock_carrier": 1} - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("UI/CraftMenu").visible = true main.get_node("BuildController")._refresh_craft_status() diff --git a/tests/_carrier_hangar_preview.gd b/tests/_carrier_hangar_preview.gd index 2bd4a83..803a138 100644 --- a/tests/_carrier_hangar_preview.gd +++ b/tests/_carrier_hangar_preview.gd @@ -13,7 +13,7 @@ func _ready() -> void: GameState.rocks = 500 GameState.vessel_levels = {"unlock_shield": 1, "unlock_gas_bomber": 1, "unlock_carrier": 1} GameState.stored_vessels = ["shield", "gas_bomber", "carrier"] - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) var fleet: Node = main.get_node("Fleet") fleet.spawn_ships(2, Vector2.ZERO, PackedStringArray(["interceptor", "carrier"])) diff --git a/tests/_context_actions_preview.gd b/tests/_context_actions_preview.gd index 1957336..764d781 100644 --- a/tests/_context_actions_preview.gd +++ b/tests/_context_actions_preview.gd @@ -8,13 +8,13 @@ extends Node func _ready() -> void: GameState.buildings.clear() GameState.extractors.clear() - var main: Node2D = load("res://Main.tscn").instantiate() + var main: Node2D = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("AsteroidField").set_process(false) main.get_node("EnemySpawner").set_process(false) main.get_node("LandingController").set_process(false) - var building: Node2D = load("res://Building.tscn").instantiate() + var building: Node2D = load("res://buildings/Building.tscn").instantiate() building.definition_id = GameState.BUILDING_MOTHERSHIP building.position = Vector2(0, 420) main.add_child(building) diff --git a/tests/_craft_menu_preview.gd b/tests/_craft_menu_preview.gd index c78556f..1c3abf9 100644 --- a/tests/_craft_menu_preview.gd +++ b/tests/_craft_menu_preview.gd @@ -18,7 +18,7 @@ func _ready() -> void: GameState.fleet_gas_cargo = 12 GameState.unlocked = ["shipyards", "logistics", "freight"] GameState.vessel_levels["unlock_gas_bomber"] = 1 - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("BackgroundLayer").visible = false main.get_node("Fleet").visible = false diff --git a/tests/_crafter_preview.gd b/tests/_crafter_preview.gd index 52888aa..f21b9cc 100644 --- a/tests/_crafter_preview.gd +++ b/tests/_crafter_preview.gd @@ -23,7 +23,7 @@ const CELLS: Array = [ func _ready() -> void: RenderingServer.set_default_clear_color(Color(0.02, 0.03, 0.06)) - var building_scene: PackedScene = load("res://Building.tscn") + var building_scene: PackedScene = load("res://buildings/Building.tscn") for i in range(CELLS.size()): var cell: Dictionary = CELLS[i] var b: Node2D = building_scene.instantiate() diff --git a/tests/_enemy_gallery_preview.gd b/tests/_enemy_gallery_preview.gd index c6e6a99..1f9057f 100644 --- a/tests/_enemy_gallery_preview.gd +++ b/tests/_enemy_gallery_preview.gd @@ -5,11 +5,11 @@ extends Node2D # others are meant to be more distinctive than. # bash tests/screenshot.sh res://tests/_enemy_gallery_preview.tscn /tmp/enemies.png 15 720x1280 -const ENEMY_DEFINITIONS = preload("res://EnemyDefinitions.gd") +const ENEMY_DEFINITIONS = preload("res://enemies/EnemyDefinitions.gd") func _ready() -> void: - var enemy_scene: PackedScene = load("res://Enemy.tscn") + var enemy_scene: PackedScene = load("res://enemies/Enemy.tscn") var ids: Array = ["chaser", "sniper", "artillery", "turret_spawner", "enemy_mothership"] var y: float = 200.0 for id in ids: diff --git a/tests/_extractor_transfer_preview.gd b/tests/_extractor_transfer_preview.gd index 6ccbe3e..93882b7 100644 --- a/tests/_extractor_transfer_preview.gd +++ b/tests/_extractor_transfer_preview.gd @@ -6,7 +6,7 @@ func _ready() -> void: GameState.transporters.clear() GameState.fleet_cargo = 9 GameState.fleet_gas_cargo = 4 - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) var planet: Node2D for planets in main.get_node("PlanetField").populated_chunks.values(): diff --git a/tests/_fleet_cargo_limit_preview.gd b/tests/_fleet_cargo_limit_preview.gd index 03aad5e..44b47f8 100644 --- a/tests/_fleet_cargo_limit_preview.gd +++ b/tests/_fleet_cargo_limit_preview.gd @@ -11,7 +11,7 @@ func _ready() -> void: GameState.rocks = 200 GameState.gas = 30 GameState.fleet_cargo = 0 - var scene: Node = load("res://Main.tscn").instantiate() + var scene: Node = load("res://world/Main.tscn").instantiate() add_child(scene) var fleet: Node = scene.get_node("Fleet") fleet.spawn_ships(3, Vector2.ZERO, PackedStringArray(["interceptor", "interceptor", "shield"])) diff --git a/tests/_font_probe.gd b/tests/_font_probe.gd index 24331f5..d375373 100644 --- a/tests/_font_probe.gd +++ b/tests/_font_probe.gd @@ -13,7 +13,7 @@ func _initialize() -> void: print("gui/theme/custom = '%s'" % ProjectSettings.get_setting("gui/theme/custom", "")) print("gui/theme/custom_font = '%s'" % ProjectSettings.get_setting("gui/theme/custom_font", "")) - var scene: Node = load("res://Main.tscn").instantiate() + var scene: Node = load("res://world/Main.tscn").instantiate() root.add_child(scene) for path in ["UI/BuildMenu/InfoPopup/Panel/TitleLabel", diff --git a/tests/_gas_bomb_aim_preview.gd b/tests/_gas_bomb_aim_preview.gd index cb1922c..76e2652 100644 --- a/tests/_gas_bomb_aim_preview.gd +++ b/tests/_gas_bomb_aim_preview.gd @@ -6,7 +6,7 @@ func _ready() -> void: GameState.extractors.clear() GameState.transporters.clear() GameState.vessel_levels["unlock_gas_bomber"] = 1 - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("BackgroundLayer").visible = false main.get_node("AsteroidField").visible = false @@ -37,7 +37,7 @@ func _ready() -> void: drag.position = press.position + Vector2(-245, -235) skill.handle_drag(drag) for offset in [Vector2(-65, 0), Vector2(45, -45), Vector2(55, 65)]: - var enemy: Node = load("res://Enemy.tscn").instantiate() + var enemy: Node = load("res://enemies/Enemy.tscn").instantiate() enemy.position = skill.aim_target + offset main.add_child(enemy) enemy.speed = 0.0 # after add_child - _ready() sets it from the definition diff --git a/tests/_gas_burner_build_menu_preview.gd b/tests/_gas_burner_build_menu_preview.gd index f5116d0..6bc99ff 100644 --- a/tests/_gas_burner_build_menu_preview.gd +++ b/tests/_gas_burner_build_menu_preview.gd @@ -15,7 +15,7 @@ func _ready() -> void: GameState.extractors.clear() GameState.rocks = 500 GameState.unlocked = ["shipyards", "logistics", "coordination", "freight", "vessel_science", "power_systems"] - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("UI/BuildMenu").visible = true main.get_node("BuildController")._refresh_build_status() diff --git a/tests/_gas_burner_transfer_preview.gd b/tests/_gas_burner_transfer_preview.gd index b4645e7..ee6ea6c 100644 --- a/tests/_gas_burner_transfer_preview.gd +++ b/tests/_gas_burner_transfer_preview.gd @@ -17,7 +17,7 @@ func _ready() -> void: GameState.fleet_cargo = 24 GameState.fleet_gas_cargo = 12 GameState.unlocked = ["shipyards", "logistics", "freight", "power_systems"] - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("BuildingField").place(GameState.BUILDING_GAS_BURNER, Vector2(400.0, 0.0)) var burner_id: int = int(GameState.buildings[-1].id) diff --git a/tests/_gas_surface_preview.gd b/tests/_gas_surface_preview.gd index 5dafbe5..3305015 100644 --- a/tests/_gas_surface_preview.gd +++ b/tests/_gas_surface_preview.gd @@ -9,6 +9,6 @@ func _ready() -> void: GameState.gas = 46 GameState.fleet_cargo = 34 GameState.fleet_gas_cargo = 17 - var surface: Node = load("res://PlanetSurface.tscn").instantiate() + var surface: Node = load("res://surface/PlanetSurface.tscn").instantiate() surface.get_node("SurfaceController").fade_duration = 0.0 add_child(surface) diff --git a/tests/_hangar_menu_preview.gd b/tests/_hangar_menu_preview.gd index 38a44ec..5cb8045 100644 --- a/tests/_hangar_menu_preview.gd +++ b/tests/_hangar_menu_preview.gd @@ -13,7 +13,7 @@ func _ready() -> void: GameState.VESSEL_SHIELD, GameState.VESSEL_SHIELD, GameState.VESSEL_GAS_BOMBER, ] - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("BackgroundLayer").visible = false main.get_node("AsteroidField").visible = false diff --git a/tests/_hud_preview.gd b/tests/_hud_preview.gd index 04f0fb8..1e508d8 100644 --- a/tests/_hud_preview.gd +++ b/tests/_hud_preview.gd @@ -13,7 +13,7 @@ func _ready() -> void: GameState.vessel_levels["unlock_gas_bomber"] = 1 GameState.deposit_fleet_resource(GameState.RESOURCE_ENERGY, 200) GameState.deposit_fleet_resource(GameState.RESOURCE_GAS, 200) - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("EnemySpawner").set_process(false) main.get_node("AsteroidField").set_process(false) diff --git a/tests/_ingame_buildings_preview.gd b/tests/_ingame_buildings_preview.gd index 4e6a40b..2fad5d5 100644 --- a/tests/_ingame_buildings_preview.gd +++ b/tests/_ingame_buildings_preview.gd @@ -18,7 +18,7 @@ func _ready() -> void: GameState.add_building(GameState.BUILDING_TRANSPORT_HUB, Vector2(480.0, 0.0)) GameState.add_building(GameState.BUILDING_SHIP_LAB, Vector2(820.0, 0.0)) - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("AsteroidField").set_process(false) main.get_node("EnemySpawner").set_process(false) diff --git a/tests/_lab_menu_preview.gd b/tests/_lab_menu_preview.gd index 636e240..7395fe8 100644 --- a/tests/_lab_menu_preview.gd +++ b/tests/_lab_menu_preview.gd @@ -13,7 +13,7 @@ func _ready() -> void: GameState.bank_inventory.set_amount(GameState.RESOURCE_ORE, 310) GameState.fleet_inventory.set_amount(GameState.RESOURCE_ORE, 47) GameState.research_points = 4 - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("EnemySpawner").set_process(false) main.get_node("AsteroidField").set_process(false) diff --git a/tests/_laser_aim_preview.gd b/tests/_laser_aim_preview.gd index 1fba9a5..b15ef31 100644 --- a/tests/_laser_aim_preview.gd +++ b/tests/_laser_aim_preview.gd @@ -12,7 +12,7 @@ func _ready() -> void: GameState.extractors.clear() GameState.transporters.clear() GameState.vessel_levels["unlock_laser"] = 1 - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("BackgroundLayer").visible = false main.get_node("AsteroidField").visible = false @@ -43,7 +43,7 @@ func _ready() -> void: drag.position = press.position + Vector2(-245.0, -235.0) skill.handle_drag(drag) for t in [0.35, 0.6]: - var enemy: Node = load("res://Enemy.tscn").instantiate() + var enemy: Node = load("res://enemies/Enemy.tscn").instantiate() enemy.position = fleet.get_centroid().lerp(skill.aim_target, t) main.add_child(enemy) enemy.speed = 0.0 # after add_child - _ready() sets it from the definition diff --git a/tests/_marker_preview.gd b/tests/_marker_preview.gd index 465cb20..315e92d 100644 --- a/tests/_marker_preview.gd +++ b/tests/_marker_preview.gd @@ -37,7 +37,7 @@ func _ready() -> void: GameState.add_extractor(data.name, WorldGen.chunk_origin(best) + data.local_pos) print("extractor on '%s' at chunk %s" % [data.name, best]) - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) # open_map(), not `visible = true` - opening also recentres the view on # the fleet, and without that the map is drawn from its own origin in the diff --git a/tests/_mothership_beam_preview.gd b/tests/_mothership_beam_preview.gd index cf3637a..cbc52c7 100644 --- a/tests/_mothership_beam_preview.gd +++ b/tests/_mothership_beam_preview.gd @@ -12,7 +12,7 @@ var main: Node func _ready() -> void: GameState.buildings.clear() GameState.extractors.clear() - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("BackgroundLayer").visible = false main.get_node("AsteroidField").visible = false @@ -26,12 +26,12 @@ func _ready() -> void: if is_instance_valid(ship): ship.set_physics_process(false) - var mothership: Node = load("res://Enemy.tscn").instantiate() + var mothership: Node = load("res://enemies/Enemy.tscn").instantiate() mothership.enemy_id = "enemy_mothership" mothership.position = Vector2(-500, -300) main.add_child(mothership) - var beam: Node2D = load("res://EnemyBigLaserBeam.tscn").instantiate() + var beam: Node2D = load("res://enemies/EnemyBigLaserBeam.tscn").instantiate() beam.charge_time = 10.0 # frozen mid-countdown for the screenshot beam.beam_range = 1400.0 beam.beam_half_width = 35.0 diff --git a/tests/_planet_derrick_preview.gd b/tests/_planet_derrick_preview.gd index bfcbc31..3675bb0 100644 --- a/tests/_planet_derrick_preview.gd +++ b/tests/_planet_derrick_preview.gd @@ -17,7 +17,7 @@ func _ready() -> void: func _spawn(planet_name: String, at: Vector2, shape_seed: int) -> void: - var planet: Node2D = load("res://Planet.tscn").instantiate() + var planet: Node2D = load("res://planets/Planet.tscn").instantiate() planet.planet_name = planet_name planet.shape_seed = shape_seed planet.position = at diff --git a/tests/_profile_startup.gd b/tests/_profile_startup.gd index 098098b..c081830 100644 --- a/tests/_profile_startup.gd +++ b/tests/_profile_startup.gd @@ -16,7 +16,7 @@ func _initialize() -> void: print("engine boot to _initialize: %d ms" % boot) t0 = Time.get_ticks_msec() - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") print("load(Main.tscn): %d ms" % (Time.get_ticks_msec() - t0)) t0 = Time.get_ticks_msec() diff --git a/tests/_research_lab_surface_preview.gd b/tests/_research_lab_surface_preview.gd index f88d073..2593c56 100644 --- a/tests/_research_lab_surface_preview.gd +++ b/tests/_research_lab_surface_preview.gd @@ -9,6 +9,6 @@ func _ready() -> void: GameState.planet_definition_id = "research_lab" GameState.surviving_ship_count = 3 GameState.rocks = 128 - var surface: Node = load("res://PlanetSurface.tscn").instantiate() + var surface: Node = load("res://surface/PlanetSurface.tscn").instantiate() surface.get_node("SurfaceController").fade_duration = 0.0 add_child(surface) diff --git a/tests/_resource_readout_surface_preview.gd b/tests/_resource_readout_surface_preview.gd index dd7d685..52989f8 100644 --- a/tests/_resource_readout_surface_preview.gd +++ b/tests/_resource_readout_surface_preview.gd @@ -14,4 +14,4 @@ func _ready() -> void: GameState.gas = 46 GameState.fleet_cargo = 34 GameState.fleet_gas_cargo = 17 - add_child(load("res://PlanetSurface.tscn").instantiate()) + add_child(load("res://surface/PlanetSurface.tscn").instantiate()) diff --git a/tests/_rocky_surface_preview.gd b/tests/_rocky_surface_preview.gd index 5b7b20a..830786f 100644 --- a/tests/_rocky_surface_preview.gd +++ b/tests/_rocky_surface_preview.gd @@ -15,6 +15,6 @@ func _ready() -> void: GameState.gas = 46 GameState.fleet_cargo = 34 GameState.fleet_gas_cargo = 17 - var surface: Node = load("res://PlanetSurface.tscn").instantiate() + var surface: Node = load("res://surface/PlanetSurface.tscn").instantiate() surface.get_node("SurfaceController").fade_duration = 0.0 add_child(surface) diff --git a/tests/_screenshot_tool.gd b/tests/_screenshot_tool.gd index dc81b21..540bc28 100644 --- a/tests/_screenshot_tool.gd +++ b/tests/_screenshot_tool.gd @@ -16,7 +16,7 @@ extends SceneTree # surface profile from planet_definition_id - so without this the tool can # only ever photograph the default planet: # -# ... -- res://PlanetSurface.tscn out.png 90 planet_definition_id=gas_giant +# ... -- res://surface/PlanetSurface.tscn out.png 90 planet_definition_id=gas_giant var wait_frames: int = 60 var frames: int = 0 diff --git a/tests/_setup_editor_load_panel_preview.gd b/tests/_setup_editor_load_panel_preview.gd index 798d1b0..fa921f4 100644 --- a/tests/_setup_editor_load_panel_preview.gd +++ b/tests/_setup_editor_load_panel_preview.gd @@ -7,6 +7,6 @@ extends Node2D func _ready() -> void: - var editor: Node = load("res://PlanetSetupEditor.tscn").instantiate() + var editor: Node = load("res://surface/PlanetSetupEditor.tscn").instantiate() add_child(editor) editor._on_load_pressed() diff --git a/tests/_setup_editor_preview.gd b/tests/_setup_editor_preview.gd index 4087ba8..6ec2c84 100644 --- a/tests/_setup_editor_preview.gd +++ b/tests/_setup_editor_preview.gd @@ -2,7 +2,7 @@ extends Node2D func _ready() -> void: - var editor: Node = load("res://PlanetSetupEditor.tscn").instantiate() + var editor: Node = load("res://surface/PlanetSetupEditor.tscn").instantiate() add_child(editor) editor.new_setup("preview_setup", "Preview Setup", "rocky") editor.add_capture_point(Vector2(300, 150)) diff --git a/tests/_setup_markers_preview.gd b/tests/_setup_markers_preview.gd index 8069d45..594551e 100644 --- a/tests/_setup_markers_preview.gd +++ b/tests/_setup_markers_preview.gd @@ -7,6 +7,6 @@ func _ready() -> void: GameState.planet_definition_id = "rocky" GameState.surviving_ship_count = 3 GameState.rocks = 128 - var surface: Node = load("res://PlanetSurface.tscn").instantiate() + var surface: Node = load("res://surface/PlanetSurface.tscn").instantiate() surface.get_node("SurfaceController").fade_duration = 0.0 add_child(surface) diff --git a/tests/_skill_menu_preview.gd b/tests/_skill_menu_preview.gd index e9ce954..76285f4 100644 --- a/tests/_skill_menu_preview.gd +++ b/tests/_skill_menu_preview.gd @@ -16,7 +16,7 @@ func _ready() -> void: GameState.bank_inventory.set_amount(GameState.RESOURCE_GAS, 85) GameState.fleet_inventory.set_amount(GameState.RESOURCE_ORE, 17) GameState.research_points = 6 - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("EnemySpawner").set_process(false) main.get_node("AsteroidField").set_process(false) diff --git a/tests/_sniper_vs_chaser_preview.gd b/tests/_sniper_vs_chaser_preview.gd index 9f87fe5..7aba19d 100644 --- a/tests/_sniper_vs_chaser_preview.gd +++ b/tests/_sniper_vs_chaser_preview.gd @@ -26,7 +26,7 @@ func _ready() -> void: GameState.buildings.clear() GameState.extractors.clear() GameState.transporters.clear() - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("BackgroundLayer").visible = false main.get_node("AsteroidField").visible = false @@ -58,13 +58,13 @@ func _process(_delta: float) -> void: for projectile in get_tree().get_nodes_in_group("player_projectiles"): projectile.queue_free() - var chaser: Node = load("res://Enemy.tscn").instantiate() + var chaser: Node = load("res://enemies/Enemy.tscn").instantiate() chaser.enemy_id = "chaser" chaser.position = Vector2(-160, -80) main.add_child(chaser) chaser.speed = 0.0 - var sniper: Node = load("res://Enemy.tscn").instantiate() + var sniper: Node = load("res://enemies/Enemy.tscn").instantiate() sniper.enemy_id = "sniper" sniper.position = Vector2(160, -80) main.add_child(sniper) diff --git a/tests/_transfer_menu_preview.gd b/tests/_transfer_menu_preview.gd index 85d1334..a582e87 100644 --- a/tests/_transfer_menu_preview.gd +++ b/tests/_transfer_menu_preview.gd @@ -17,7 +17,7 @@ func _ready() -> void: GameState.fleet_cargo = 24 GameState.fleet_gas_cargo = 12 GameState.unlocked = ["shipyards", "logistics", "freight"] - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("BuildingField").place(GameState.BUILDING_SHIP_CRAFTER, Vector2(400.0, 0.0)) var crafter_id: int = int(GameState.buildings[-1].id) diff --git a/tests/_transporter_preview.gd b/tests/_transporter_preview.gd index 5322f3c..9772eaf 100644 --- a/tests/_transporter_preview.gd +++ b/tests/_transporter_preview.gd @@ -30,7 +30,7 @@ func _ready() -> void: returning.from = Vector2(-380.0, 150.0) returning.to = Vector2(420.0, 150.0) - var main: Node = load("res://Main.tscn").instantiate() + var main: Node = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("AsteroidField").set_process(false) main.get_node("EnemySpawner").set_process(false) diff --git a/tests/_turret_vs_chaser_preview.gd b/tests/_turret_vs_chaser_preview.gd index 42b009f..86d0678 100644 --- a/tests/_turret_vs_chaser_preview.gd +++ b/tests/_turret_vs_chaser_preview.gd @@ -15,7 +15,7 @@ func _ready() -> void: GameState.buildings.clear() GameState.extractors.clear() GameState.transporters.clear() - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() add_child(main) main.get_node("BackgroundLayer").visible = false main.get_node("AsteroidField").visible = false @@ -43,13 +43,13 @@ func _process(_delta: float) -> void: for projectile in get_tree().get_nodes_in_group("player_projectiles"): projectile.queue_free() - var chaser: Node = load("res://Enemy.tscn").instantiate() + var chaser: Node = load("res://enemies/Enemy.tscn").instantiate() chaser.enemy_id = "chaser" chaser.position = Vector2(-160, -80) main.add_child(chaser) chaser.speed = 0.0 - var turret: Node = load("res://Enemy.tscn").instantiate() + var turret: Node = load("res://enemies/Enemy.tscn").instantiate() turret.enemy_id = "turret_spawner" turret.position = Vector2(160, -80) main.add_child(turret) diff --git a/tests/_vfx_preview.gd b/tests/_vfx_preview.gd index 55d5cc8..2f38ae6 100644 --- a/tests/_vfx_preview.gd +++ b/tests/_vfx_preview.gd @@ -9,8 +9,8 @@ extends Node2D # bash tests/screenshot.sh res://tests/_vfx_preview.tscn out.png 20 const VFX_SCRIPTS: Array = [ - "res://ShipExplosionVFX.gd", "res://EnemyExplosionVFX.gd", - "res://AsteroidExplosionVFX.gd", "res://LightBurstVFX.gd", + "res://vfx/ShipExplosionVFX.gd", "res://vfx/EnemyExplosionVFX.gd", + "res://vfx/AsteroidExplosionVFX.gd", "res://vfx/LightBurstVFX.gd", ] @@ -18,7 +18,7 @@ func _ready() -> void: RenderingServer.set_default_clear_color(Color(0.02, 0.03, 0.06)) # Bolts at several headings, held still so they can be inspected. - var bolt_scene: PackedScene = load("res://Projectile.tscn") + var bolt_scene: PackedScene = load("res://vessels/Projectile.tscn") for i in range(6): var bolt: Area2D = bolt_scene.instantiate() bolt.position = Vector2(-460.0 + float(i) * 90.0, -220.0) diff --git a/tests/_void_surface_preview.gd b/tests/_void_surface_preview.gd index 6ff3607..ee1f4df 100644 --- a/tests/_void_surface_preview.gd +++ b/tests/_void_surface_preview.gd @@ -10,6 +10,6 @@ func _ready() -> void: GameState.planet_name = "Event Zero" GameState.planet_definition_id = "black_hole" GameState.surviving_ship_count = 3 - var surface: Node = load("res://PlanetSurface.tscn").instantiate() + var surface: Node = load("res://surface/PlanetSurface.tscn").instantiate() surface.get_node("SurfaceController").fade_duration = 0.0 add_child(surface) diff --git a/tests/profile_shader.sh b/tests/profile_shader.sh index 3a57e52..b931faa 100644 --- a/tests/profile_shader.sh +++ b/tests/profile_shader.sh @@ -10,7 +10,7 @@ # a phone's frame budget is not. # # Usage: bash tests/profile_shader.sh [timed_frames] [warmup] [WxH] -# Example: bash tests/profile_shader.sh res://lunar_surface.gdshader 30 10 720x1280 +# Example: bash tests/profile_shader.sh res://shaders/lunar_surface.gdshader 30 10 720x1280 set -e PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 4716917..eea839a 100644 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -13,7 +13,7 @@ # # 1. It runs from a COPY on Termux's own filesystem, not from the project # directory. The project lives under ~/storage/shared, which is Android's -# FUSE bridge; read through proot on top of that, `load("res://Main.tscn")` +# FUSE bridge; read through proot on top of that, `load("res://world/Main.tscn")` # alone took 8.5s per test, against ~2s from a native path. Nearly every # test loads Main.tscn, and none of that time is gameplay. The copy is # ~1.4s for the whole suite and its .godot import cache is kept between diff --git a/tests/screenshot.sh b/tests/screenshot.sh index d5a715e..0e863a9 100644 --- a/tests/screenshot.sh +++ b/tests/screenshot.sh @@ -11,8 +11,8 @@ # but doesn't hit this crash. Good enough for one-shot screenshots. # # Usage: bash tests/screenshot.sh [wait_frames] [WxH] [key=value ...] -# Example: bash tests/screenshot.sh res://Main.tscn /tmp/out.png 60 720x1280 -# bash tests/screenshot.sh res://PlanetSurface.tscn /tmp/gas.png 90 720x1280 planet_definition_id=gas_giant +# Example: bash tests/screenshot.sh res://world/Main.tscn /tmp/out.png 60 720x1280 +# bash tests/screenshot.sh res://surface/PlanetSurface.tscn /tmp/gas.png 90 720x1280 planet_definition_id=gas_giant # # Trailing key=value pairs are set on the GameState autoload before the # scene loads - see tests/_screenshot_tool.gd. diff --git a/tests/test_animation_continuity.gd b/tests/test_animation_continuity.gd index 3919aa6..3ab5a3e 100644 --- a/tests/test_animation_continuity.gd +++ b/tests/test_animation_continuity.gd @@ -32,7 +32,7 @@ func _initialize() -> void: game_state = root.get_node("GameState") game_state.buildings.clear() game_state.extractors.clear() - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) field = scene.get_node("BuildingField") diff --git a/tests/test_artillery_enemy.gd b/tests/test_artillery_enemy.gd index 8ca93e5..795e171 100644 --- a/tests/test_artillery_enemy.gd +++ b/tests/test_artillery_enemy.gd @@ -43,7 +43,7 @@ var elapsed: float = 0.0 func _initialize() -> void: - ARTILLERY_SHELL_SCRIPT = load("res://ArtilleryShell.gd") + ARTILLERY_SHELL_SCRIPT = load("res://enemies/ArtilleryShell.gd") game_state = root.get_node("GameState") game_state.buildings.clear() game_state.extractors.clear() @@ -52,7 +52,7 @@ func _initialize() -> void: game_state.build_time_scale = 0.02 game_state.reset_progression() game_state.rocks = 2000 - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") @@ -83,7 +83,7 @@ func _process(delta: float) -> bool: origin = impact_point + Vector2(400, 400) travel_time = origin.distance_to(impact_point) / 300.0 - shell = load("res://ArtilleryShell.tscn").instantiate() + shell = load("res://enemies/ArtilleryShell.tscn").instantiate() shell.shell_speed = 300.0 shell.aoe_radius = 220.0 shell.damage = 3 @@ -145,7 +145,7 @@ func _process(delta: float) -> bool: # moves after the shot is fired --------------------------------- fleet.spawn_ships(1, Vector2(9000, 0)) far_ship = fleet.ships[0] - artillery = load("res://Enemy.tscn").instantiate() + artillery = load("res://enemies/Enemy.tscn").instantiate() artillery.enemy_id = "artillery" artillery.position = far_ship.position + Vector2(300, 0) main.add_child(artillery) diff --git a/tests/test_asteroid_mining.gd b/tests/test_asteroid_mining.gd index eb5c927..2acf259 100644 --- a/tests/test_asteroid_mining.gd +++ b/tests/test_asteroid_mining.gd @@ -32,14 +32,14 @@ func _initialize() -> void: game_state.buildings.clear() game_state.extractors.clear() game_state.reset_progression() - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) current_scene = main fleet = main.get_node("Fleet") func _spawn_asteroid(at: Vector2) -> Node2D: - var rock: Node2D = load("res://Asteroid.tscn").instantiate() + var rock: Node2D = load("res://world/Asteroid.tscn").instantiate() rock.position = at main.add_child(rock) return rock @@ -128,13 +128,13 @@ func _process(delta: float) -> bool: # --- E. abandoned ore expires, authored ore does not ---------- _clear_sky() - var abandoned: Node2D = load("res://Rock.tscn").instantiate() + var abandoned: Node2D = load("res://surface/Rock.tscn").instantiate() abandoned.build_shape(1) abandoned.lifetime = 0.4 # Far from every ship, or it would be collected rather than expire. abandoned.position = fleet.get_centroid() + Vector2(9000.0, 0.0) main.add_child(abandoned) - var authored: Node2D = load("res://Rock.tscn").instantiate() + var authored: Node2D = load("res://surface/Rock.tscn").instantiate() authored.build_shape(2) authored.position = fleet.get_centroid() + Vector2(9600.0, 0.0) main.add_child(authored) diff --git a/tests/test_asteroid_safe_spawn.gd b/tests/test_asteroid_safe_spawn.gd index 700ecf1..bf3b5e7 100644 --- a/tests/test_asteroid_safe_spawn.gd +++ b/tests/test_asteroid_safe_spawn.gd @@ -31,7 +31,7 @@ var ships_at_start: int = 0 func _initialize() -> void: root.get_node("GameState").reset_formation() - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") field = scene.get_node("AsteroidField") diff --git a/tests/test_asteroid_ship_collision.gd b/tests/test_asteroid_ship_collision.gd index e11b326..37a6508 100644 --- a/tests/test_asteroid_ship_collision.gd +++ b/tests/test_asteroid_ship_collision.gd @@ -18,7 +18,7 @@ var stage: int = 0 func _initialize() -> void: - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") @@ -31,7 +31,7 @@ func _process(delta: float) -> bool: # Wait one tick so Fleet._ready() has run and fleet.ships is # populated before we grab a ship reference. target_ship = fleet.ships[0] - var asteroid_scene: PackedScene = load("res://Asteroid.tscn") + var asteroid_scene: PackedScene = load("res://world/Asteroid.tscn") asteroid = asteroid_scene.instantiate() asteroid.position = target_ship.position asteroid.velocity = Vector2.ZERO diff --git a/tests/test_asteroid_spawning.gd b/tests/test_asteroid_spawning.gd index eb9e1e6..1b7cff2 100644 --- a/tests/test_asteroid_spawning.gd +++ b/tests/test_asteroid_spawning.gd @@ -34,7 +34,7 @@ func _initialize() -> void: quit(1) return - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") diff --git a/tests/test_black_hole.gd b/tests/test_black_hole.gd index 52fbf7c..4cacf50 100644 --- a/tests/test_black_hole.gd +++ b/tests/test_black_hole.gd @@ -82,14 +82,14 @@ func _initialize() -> void: print("dark matter is generic: in resource_types(), own definition, own colour %s" % dm_color) # --- structural: the black hole definition itself ----------------------- - var black_hole_def: Resource = load("res://PlanetDefinitions.gd").get_definition("black_hole") + var black_hole_def: Resource = load("res://planets/PlanetDefinitions.gd").get_definition("black_hole") if black_hole_def.resource_id != "dark_matter": _fail("black_hole planet's resource_id is '%s', expected 'dark_matter'" % black_hole_def.resource_id) return if black_hole_def.surface_profile_id != "void": _fail("black_hole planet's surface_profile_id is '%s', expected 'void'" % black_hole_def.surface_profile_id) return - var void_profile: Resource = load("res://PlanetSurfaceProfiles.gd").get_profile("void") + var void_profile: Resource = load("res://surface/PlanetSurfaceProfiles.gd").get_profile("void") if void_profile.features_scene != null: _fail("void surface profile has a features_scene - dark matter must never be a surface pickup") return @@ -101,7 +101,7 @@ func _initialize() -> void: game_state.planet_id = "test_black_hole" game_state.planet_name = "Event Zero" game_state.planet_definition_id = "black_hole" - scene = load("res://PlanetSurface.tscn").instantiate() + scene = load("res://surface/PlanetSurface.tscn").instantiate() root.add_child(scene) current_scene = scene diff --git a/tests/test_build_info_popup.gd b/tests/test_build_info_popup.gd index c67d45c..28c8d86 100644 --- a/tests/test_build_info_popup.gd +++ b/tests/test_build_info_popup.gd @@ -46,7 +46,7 @@ func _initialize() -> void: for node in GameState.SKILL_TREE: game_state.unlocked.append(node.id) - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) controller = scene.get_node("BuildController") popup = scene.get_node("UI/BuildMenu/InfoPopup") diff --git a/tests/test_build_menu_hides_locked.gd b/tests/test_build_menu_hides_locked.gd index 50f215a..aa60234 100644 --- a/tests/test_build_menu_hides_locked.gd +++ b/tests/test_build_menu_hides_locked.gd @@ -32,7 +32,7 @@ func _initialize() -> void: game_state.transporters.clear() game_state.reset_progression() game_state.rocks = 500 - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) controller = scene.get_node("BuildController") diff --git a/tests/test_build_menu_icons.gd b/tests/test_build_menu_icons.gd index 890864f..0a02806 100644 --- a/tests/test_build_menu_icons.gd +++ b/tests/test_build_menu_icons.gd @@ -25,7 +25,7 @@ const EXPECTED: Dictionary = { func _initialize() -> void: - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) diff --git a/tests/test_building_composition.gd b/tests/test_building_composition.gd index 616095d..1caacdf 100644 --- a/tests/test_building_composition.gd +++ b/tests/test_building_composition.gd @@ -1,10 +1,10 @@ extends SceneTree -const BUILDING_DEFINITIONS = preload("res://BuildingDefinitions.gd") +const BUILDING_DEFINITIONS = preload("res://buildings/BuildingDefinitions.gd") func _initialize() -> void: - var scene: PackedScene = load("res://Building.tscn") + var scene: PackedScene = load("res://buildings/Building.tscn") for definition in BUILDING_DEFINITIONS.all(): if definition.placement_mode != "space": continue diff --git a/tests/test_building_redraw_cost.gd b/tests/test_building_redraw_cost.gd index 1c81451..8e55050 100644 --- a/tests/test_building_redraw_cost.gd +++ b/tests/test_building_redraw_cost.gd @@ -36,7 +36,7 @@ func _initialize() -> void: var game_state: Node = root.get_node("GameState") game_state.buildings.clear() game_state.extractors.clear() - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) field = scene.get_node("BuildingField") diff --git a/tests/test_building_stock_queue.gd b/tests/test_building_stock_queue.gd index 1ab1137..7283e67 100644 --- a/tests/test_building_stock_queue.gd +++ b/tests/test_building_stock_queue.gd @@ -52,7 +52,7 @@ func _initialize() -> void: # wall clock. See GameState.build_time_scale. game_state.build_time_scale = 0.02 game_state.unlocked = ["shipyards", "coordination", "wing", "squadron", "armada"] - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") field = scene.get_node("BuildingField") diff --git a/tests/test_camera_settles.gd b/tests/test_camera_settles.gd index 6adb480..9824cf0 100644 --- a/tests/test_camera_settles.gd +++ b/tests/test_camera_settles.gd @@ -23,7 +23,7 @@ var identical_frames: int = 0 func _initialize() -> void: - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") diff --git a/tests/test_capture_points.gd b/tests/test_capture_points.gd index 12ffc86..444e8de 100644 --- a/tests/test_capture_points.gd +++ b/tests/test_capture_points.gd @@ -38,8 +38,8 @@ var progress_before_drain: float = 0.0 func _initialize() -> void: - CAPTURE_POINT_SCRIPT = load("res://CapturePoint.gd") - PLANET_SETUP_SCRIPT = load("res://PlanetSetup.gd") + CAPTURE_POINT_SCRIPT = load("res://surface/CapturePoint.gd") + PLANET_SETUP_SCRIPT = load("res://surface/PlanetSetup.gd") game_state = root.get_node("GameState") game_state.planet_capture.clear() @@ -51,11 +51,11 @@ func _initialize() -> void: fake_setup.capture_points = PackedVector2Array([Vector2(0, 0), Vector2(500, 0)]) game_state.planet_id = restore_planet_id - var host1: Node = load("res://PlanetSetupHost.tscn").instantiate() + var host1: Node = load("res://surface/PlanetSetupHost.tscn").instantiate() host1.apply_setup(fake_setup) game_state.mark_point_captured(restore_planet_id, 0) # simulates a completed prior visit - var host2: Node = load("res://PlanetSetupHost.tscn").instantiate() + var host2: Node = load("res://surface/PlanetSetupHost.tscn").instantiate() host2.apply_setup(fake_setup) var restored: Node = null var fresh: Node = null @@ -77,7 +77,7 @@ func _initialize() -> void: game_state.extractors.clear() game_state.rocks = 200 - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") @@ -93,7 +93,7 @@ func _process(delta: float) -> bool: for a in get_nodes_in_group("asteroids"): a.queue_free() - point = load("res://CapturePoint.tscn").instantiate() + point = load("res://surface/CapturePoint.tscn").instantiate() point.point_index = 0 point.capture_time = 1.0 point.capture_radius = 200.0 diff --git a/tests/test_cargo_readout.gd b/tests/test_cargo_readout.gd index e24f2cc..f06ac40 100644 --- a/tests/test_cargo_readout.gd +++ b/tests/test_cargo_readout.gd @@ -42,7 +42,7 @@ func _initialize() -> void: # primitives work off GameState, not off the spawned node - so this stays # a display test rather than becoming one about the building system. mothership_id = game_state.add_building(GameState.BUILDING_MOTHERSHIP, Vector2.ZERO) - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) diff --git a/tests/test_carrier_vessel.gd b/tests/test_carrier_vessel.gd index a5deec4..0806d4c 100644 --- a/tests/test_carrier_vessel.gd +++ b/tests/test_carrier_vessel.gd @@ -49,7 +49,7 @@ func _initialize() -> void: game_state.build_time_scale = 0.02 game_state.rocks = 500 game_state.research_points = 1 - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") controller = scene.get_node("BuildController") @@ -205,7 +205,7 @@ func _process(delta: float) -> bool: # same frame - a false positive, not the carrier firing. if elapsed < 0.3: return false - var enemy_scene: PackedScene = load("res://Enemy.tscn") + var enemy_scene: PackedScene = load("res://enemies/Enemy.tscn") enemy = enemy_scene.instantiate() enemy.position = fleet.get_centroid() + Vector2(220.0, 0.0) scene.add_child(enemy) diff --git a/tests/test_chaser_rams.gd b/tests/test_chaser_rams.gd index 2b0c8ea..4663554 100644 --- a/tests/test_chaser_rams.gd +++ b/tests/test_chaser_rams.gd @@ -32,14 +32,14 @@ func _initialize() -> void: game_state.extractors.clear() game_state.reset_progression() game_state.vessel_levels["unlock_shield"] = 1 - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) current_scene = main fleet = main.get_node("Fleet") func _spawn_enemy(enemy_id: String, at: Vector2) -> Node2D: - var enemy: Node2D = load("res://Enemy.tscn").instantiate() + var enemy: Node2D = load("res://enemies/Enemy.tscn").instantiate() enemy.enemy_id = enemy_id enemy.position = at main.add_child(enemy) @@ -60,7 +60,7 @@ func _process(delta: float) -> bool: hazard.queue_free() fleet.spawn_ships(1, Vector2.ZERO, PackedStringArray([GameState.VESSEL_INTERCEPTOR])) - var definitions: Script = load("res://EnemyDefinitions.gd") + var definitions: Script = load("res://enemies/EnemyDefinitions.gd") if not bool(definitions.get_definition("chaser").dies_on_contact): return _fail("the chaser is not marked dies_on_contact") if bool(definitions.get_definition("sniper").dies_on_contact): diff --git a/tests/test_chaser_rams.gd.uid b/tests/test_chaser_rams.gd.uid new file mode 100644 index 0000000..6d31f1c --- /dev/null +++ b/tests/test_chaser_rams.gd.uid @@ -0,0 +1 @@ +uid://bjqhkqmw1ls04 diff --git a/tests/test_conquered_planet_clear.gd b/tests/test_conquered_planet_clear.gd index 1f4bf03..dd28280 100644 --- a/tests/test_conquered_planet_clear.gd +++ b/tests/test_conquered_planet_clear.gd @@ -27,7 +27,7 @@ var elapsed: float = 0.0 func _initialize() -> void: game_state = root.get_node("GameState") game_state.planet_capture.clear() - host_scene = load("res://PlanetSetupHost.tscn") + host_scene = load("res://surface/PlanetSetupHost.tscn") func _process(delta: float) -> bool: @@ -85,14 +85,14 @@ func _process(delta: float) -> bool: func _make_setup(capture_count: int, enemy_count: int) -> Resource: - var setup: Resource = load("res://PlanetSetup.gd").new() + var setup: Resource = load("res://surface/PlanetSetup.gd").new() setup.setup_id = "in_memory" setup.surface_profile_id = "rocky" var points: PackedVector2Array = PackedVector2Array() for i in range(capture_count): points.append(Vector2(200.0 * float(i + 1), 0.0)) setup.capture_points = points - var spawn_script: Script = load("res://PlanetSetupSpawn.gd") + var spawn_script: Script = load("res://surface/PlanetSetupSpawn.gd") for i in range(enemy_count): var spawn: Resource = spawn_script.new() spawn.enemy_id = "chaser" diff --git a/tests/test_crafter_animation.gd b/tests/test_crafter_animation.gd index 9b5d57e..2a2eb91 100644 --- a/tests/test_crafter_animation.gd +++ b/tests/test_crafter_animation.gd @@ -29,7 +29,7 @@ func _initialize() -> void: game_state.buildings.clear() game_state.extractors.clear() - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) field = scene.get_node("BuildingField") diff --git a/tests/test_crafter_feedback.gd b/tests/test_crafter_feedback.gd index ddd1882..648dc88 100644 --- a/tests/test_crafter_feedback.gd +++ b/tests/test_crafter_feedback.gd @@ -52,7 +52,7 @@ func _initialize() -> void: game_state.fleet_cargo = 0 game_state.stored_vessels.clear() game_state.build_time_scale = 0.02 - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) controller = scene.get_node("BuildController") fleet = scene.get_node("Fleet") diff --git a/tests/test_desktop_combat.gd b/tests/test_desktop_combat.gd index e212275..907edee 100644 --- a/tests/test_desktop_combat.gd +++ b/tests/test_desktop_combat.gd @@ -34,7 +34,7 @@ func _initialize() -> void: game_state.buildings.clear() game_state.extractors.clear() game_state.reset_progression() - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) current_scene = main fleet = main.get_node("Fleet") diff --git a/tests/test_desktop_combat.gd.uid b/tests/test_desktop_combat.gd.uid new file mode 100644 index 0000000..10034fc --- /dev/null +++ b/tests/test_desktop_combat.gd.uid @@ -0,0 +1 @@ +uid://bgbmbg1bd8r4v diff --git a/tests/test_dev_mode.gd b/tests/test_dev_mode.gd index 63b73c0..c443c42 100644 --- a/tests/test_dev_mode.gd +++ b/tests/test_dev_mode.gd @@ -116,7 +116,7 @@ func _process(delta: float) -> bool: return _fail("starting a normal game after a dev one kept the dev stock") print("starting a normal game afterwards clears dev mode entirely") - menu = load("res://MainMenu.tscn").instantiate() + menu = load("res://ui/MainMenu.tscn").instantiate() root.add_child(menu) current_scene = menu elapsed = 0.0 diff --git a/tests/test_distorder_energy.gd b/tests/test_distorder_energy.gd index ea73206..74bd6a9 100644 --- a/tests/test_distorder_energy.gd +++ b/tests/test_distorder_energy.gd @@ -109,7 +109,7 @@ func _process(delta: float) -> bool: # --- C continued: the SpeedFader visibly follows it down ---------- if elapsed < 0.2: return false - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") fader = main.get_node("UI/SpeedFader") diff --git a/tests/test_distorder_stacking.gd b/tests/test_distorder_stacking.gd index babe31d..25745cb 100644 --- a/tests/test_distorder_stacking.gd +++ b/tests/test_distorder_stacking.gd @@ -32,7 +32,7 @@ func _initialize() -> void: game_state.reset_progression() game_state.vessel_levels["unlock_distorder"] = 1 game_state.deposit_fleet_resource(GameState.RESOURCE_ENERGY, 500) - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") fader = main.get_node("UI/SpeedFader") diff --git a/tests/test_enemy_collision.gd b/tests/test_enemy_collision.gd index 0055efa..e4dcbee 100644 --- a/tests/test_enemy_collision.gd +++ b/tests/test_enemy_collision.gd @@ -22,7 +22,7 @@ var started: bool = false func _initialize() -> void: - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") @@ -45,7 +45,7 @@ func _physics_process(delta: float) -> bool: root.get_node("GameState").unlocked.append_array(["wing", "squadron", "armada"]) fleet.spawn_ships(5, Vector2.ZERO) target_ship = fleet.ships[0] - var enemy_scene: PackedScene = load("res://Enemy.tscn") + var enemy_scene: PackedScene = load("res://enemies/Enemy.tscn") enemy = enemy_scene.instantiate() enemy.position = target_ship.position main_scene.add_child(enemy) diff --git a/tests/test_enemy_combat.gd b/tests/test_enemy_combat.gd index 13ef609..6e73681 100644 --- a/tests/test_enemy_combat.gd +++ b/tests/test_enemy_combat.gd @@ -23,7 +23,7 @@ var started: bool = false func _initialize() -> void: - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") @@ -45,7 +45,7 @@ func _physics_process(delta: float) -> bool: # a full one. root.get_node("GameState").unlocked.append_array(["wing", "squadron", "armada"]) fleet.spawn_ships(5, Vector2.ZERO) - var enemy_scene: PackedScene = load("res://Enemy.tscn") + var enemy_scene: PackedScene = load("res://enemies/Enemy.tscn") enemy = enemy_scene.instantiate() enemy.position = fleet.get_centroid() + SPAWN_OFFSET main_scene.add_child(enemy) diff --git a/tests/test_enemy_composition.gd b/tests/test_enemy_composition.gd index a7660d3..2268399 100644 --- a/tests/test_enemy_composition.gd +++ b/tests/test_enemy_composition.gd @@ -23,7 +23,7 @@ func _initialize() -> void: if chaser_def.enemy_id != "chaser" or chaser_def.max_hp != 3: return _fail("EnemyDefinitions did not resolve the chaser definition") - main_scene = load("res://Main.tscn").instantiate() + main_scene = load("res://world/Main.tscn").instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") main_scene.get_node("EnemySpawner").set_process(false) @@ -38,7 +38,7 @@ func _initialize() -> void: inner.name = "Inner" nested_host.add_child(inner) - enemy = load("res://Enemy.tscn").instantiate() + enemy = load("res://enemies/Enemy.tscn").instantiate() enemy.position = fleet.get_centroid() + Vector2(600, 0) inner.add_child(enemy) diff --git a/tests/test_enemy_detection_range.gd b/tests/test_enemy_detection_range.gd index 63f7e6e..680fa8c 100644 --- a/tests/test_enemy_detection_range.gd +++ b/tests/test_enemy_detection_range.gd @@ -34,7 +34,7 @@ func _initialize() -> void: game_state.extractors.clear() game_state.transporters.clear() game_state.reset_progression() - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") @@ -52,7 +52,7 @@ func _process(delta: float) -> bool: fleet.spawn_ships(1, Vector2.ZERO) # --- A. beyond detection_range: no movement at all --------------- - chaser = load("res://Enemy.tscn").instantiate() + chaser = load("res://enemies/Enemy.tscn").instantiate() chaser.enemy_id = "chaser" var pursuit: Node = null main.add_child(chaser) @@ -60,7 +60,7 @@ func _process(delta: float) -> bool: chaser.position = fleet.get_centroid() + Vector2(pursuit.detection_range + 300.0, 0.0) chaser_start = chaser.position - sniper = load("res://Enemy.tscn").instantiate() + sniper = load("res://enemies/Enemy.tscn").instantiate() sniper.enemy_id = "sniper" main.add_child(sniper) var standoff: Node = sniper.get_component("standoff") @@ -98,7 +98,7 @@ func _process(delta: float) -> bool: print("chaser correctly idle beyond range, closes in once inside it") # --- D. the mothership closes in from far beyond a chaser's range - - mothership = load("res://Enemy.tscn").instantiate() + mothership = load("res://enemies/Enemy.tscn").instantiate() mothership.enemy_id = "enemy_mothership" main.add_child(mothership) var mother_pursuit: Node = mothership.get_component("pursuit") diff --git a/tests/test_enemy_mothership.gd b/tests/test_enemy_mothership.gd index 4424988..c663d6b 100644 --- a/tests/test_enemy_mothership.gd +++ b/tests/test_enemy_mothership.gd @@ -53,11 +53,11 @@ var elapsed: float = 0.0 func _initialize() -> void: game_state = root.get_node("GameState") - beam_script = load("res://EnemyBigLaserBeam.gd") + beam_script = load("res://enemies/EnemyBigLaserBeam.gd") # Four vessels are crewed below, past BASE_FLEET_SIZE's 3 slots, so the # capacity doctrines are granted rather than assumed. game_state.unlocked.append_array(["wing", "squadron", "armada"]) - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") @@ -92,7 +92,7 @@ func _process(delta: float) -> bool: if not shield_ship.has_shield(): return _fail("shield ship has no shield right after being added") - var beam_scene: PackedScene = load("res://EnemyBigLaserBeam.tscn") + var beam_scene: PackedScene = load("res://enemies/EnemyBigLaserBeam.tscn") beam = beam_scene.instantiate() beam.charge_time = 0.5 beam.beam_range = 1000.0 @@ -153,7 +153,7 @@ func _process(delta: float) -> bool: fleet.ships.clear() fleet.spawn_ships(1, Vector2(3000, 0)) - mothership = load("res://Enemy.tscn").instantiate() + mothership = load("res://enemies/Enemy.tscn").instantiate() mothership.enemy_id = "enemy_mothership" mothership.position = Vector2.ZERO main.add_child(mothership) diff --git a/tests/test_enemy_projectile_damage.gd b/tests/test_enemy_projectile_damage.gd index a72fb36..2492b68 100644 --- a/tests/test_enemy_projectile_damage.gd +++ b/tests/test_enemy_projectile_damage.gd @@ -24,13 +24,13 @@ func _initialize() -> void: game_state.build_time_scale = 0.02 game_state.reset_progression() game_state.rocks = 2000 - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") func _fire_at(ship: Node) -> void: - var projectile: Area2D = load("res://EnemyProjectile.tscn").instantiate() + var projectile: Area2D = load("res://enemies/EnemyProjectile.tscn").instantiate() projectile.global_position = ship.global_position projectile.launch(Vector2.ZERO) # already on top of the target scene.add_child(projectile) diff --git a/tests/test_exploration_tracker.gd b/tests/test_exploration_tracker.gd index e7c22a6..abdccc0 100644 --- a/tests/test_exploration_tracker.gd +++ b/tests/test_exploration_tracker.gd @@ -15,7 +15,7 @@ var teleported: bool = false func _initialize() -> void: - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") diff --git a/tests/test_extractor_building.gd b/tests/test_extractor_building.gd index 002046e..469aeb2 100644 --- a/tests/test_extractor_building.gd +++ b/tests/test_extractor_building.gd @@ -59,7 +59,7 @@ func _initialize() -> void: for node in GameState.SKILL_TREE: game_state.unlocked.append(node.id) - main_scene = load("res://Main.tscn").instantiate() + main_scene = load("res://world/Main.tscn").instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") controller = main_scene.get_node("BuildController") diff --git a/tests/test_extractor_transfer.gd b/tests/test_extractor_transfer.gd index 5f5c838..02895d4 100644 --- a/tests/test_extractor_transfer.gd +++ b/tests/test_extractor_transfer.gd @@ -17,7 +17,7 @@ func _initialize() -> void: state.transporters.clear() state.fleet_cargo = 0 state.fleet_gas_cargo = 0 - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") controller = scene.get_node("BuildController") diff --git a/tests/test_fire_stick.gd b/tests/test_fire_stick.gd index ca80aa9..fabe487 100644 --- a/tests/test_fire_stick.gd +++ b/tests/test_fire_stick.gd @@ -37,7 +37,7 @@ func _initialize() -> void: game_state.buildings.clear() game_state.extractors.clear() game_state.reset_progression() - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) current_scene = main fleet = main.get_node("Fleet") @@ -92,7 +92,7 @@ func _process(delta: float) -> bool: return _fail("the default vessel has no weapon component to test") # Parked at a third of fire range, dead ahead: the old auto-aiming # gun would have opened up on this immediately. - decoy = load("res://Enemy.tscn").instantiate() + decoy = load("res://enemies/Enemy.tscn").instantiate() decoy.position = ship.global_position + Vector2(weapon.fire_range * 0.33, 0.0) main.add_child(decoy) decoy.speed = 0.0 diff --git a/tests/test_fleet_agility.gd b/tests/test_fleet_agility.gd index c29c25e..21eb45a 100644 --- a/tests/test_fleet_agility.gd +++ b/tests/test_fleet_agility.gd @@ -51,7 +51,7 @@ var tuned: Dictionary = {} func _initialize() -> void: var game_state: Node = root.get_node("GameState") game_state.reset_progression() - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) current_scene = main fleet = main.get_node("Fleet") diff --git a/tests/test_fleet_cargo.gd b/tests/test_fleet_cargo.gd index 0607cc7..377662e 100644 --- a/tests/test_fleet_cargo.gd +++ b/tests/test_fleet_cargo.gd @@ -42,7 +42,7 @@ func _initialize() -> void: game_state.extractors.clear() game_state.rocks = 100 game_state.fleet_cargo = 0 - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") field = scene.get_node("BuildingField") @@ -67,7 +67,7 @@ func _process(delta: float) -> bool: # pool Rock.gd credits on pickup, and a test that calls the new # API by hand passes just as happily with Rock.gd left untouched. banked_before = game_state.rocks - var rock: Area2D = load("res://Rock.tscn").instantiate() + var rock: Area2D = load("res://surface/Rock.tscn").instantiate() rock.build_shape(1) rock.global_position = fleet.ships[0].global_position scene.add_child(rock) diff --git a/tests/test_fleet_cargo_limit.gd b/tests/test_fleet_cargo_limit.gd index 90699c4..c98294f 100644 --- a/tests/test_fleet_cargo_limit.gd +++ b/tests/test_fleet_cargo_limit.gd @@ -33,7 +33,7 @@ func _initialize() -> void: game_state.rocks = 500 game_state.fleet_cargo = 0 mothership_id = game_state.add_building(GameState.BUILDING_MOTHERSHIP, Vector2.ZERO) - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) current_scene = scene @@ -61,7 +61,7 @@ func _process(delta: float) -> bool: # --- B. a full hold refuses a pickup, the rock stays ------------ fleet.spawn_ships(1, Vector2.ZERO, PackedStringArray(["interceptor"])) game_state.fleet_cargo = 20 - rock = load("res://Rock.tscn").instantiate() + rock = load("res://surface/Rock.tscn").instantiate() rock.build_shape(1) rock.global_position = fleet.ships[0].global_position scene.add_child(rock) @@ -123,7 +123,7 @@ func _process(delta: float) -> bool: # test in this suite. if elapsed < 0.3: return false - scene = load("res://PlanetSurface.tscn").instantiate() + scene = load("res://surface/PlanetSurface.tscn").instantiate() root.add_child(scene) current_scene = scene elapsed = 0.0 diff --git a/tests/test_fleet_formation.gd b/tests/test_fleet_formation.gd index bfc9610..d1dc4de 100644 --- a/tests/test_fleet_formation.gd +++ b/tests/test_fleet_formation.gd @@ -23,7 +23,7 @@ var checkpoint_positions: Array = [] func _initialize() -> void: - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") diff --git a/tests/test_fleet_growth.gd b/tests/test_fleet_growth.gd index dbbcabc..4c58207 100644 --- a/tests/test_fleet_growth.gd +++ b/tests/test_fleet_growth.gd @@ -96,7 +96,7 @@ func _process(delta: float) -> bool: # --- B. what actually flies ---------------------------------- game_state.reset_new_game() - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") elapsed = 0.0 diff --git a/tests/test_fleet_speed_bounded.gd b/tests/test_fleet_speed_bounded.gd index 3b69888..86e2477 100644 --- a/tests/test_fleet_speed_bounded.gd +++ b/tests/test_fleet_speed_bounded.gd @@ -49,7 +49,7 @@ func _initialize() -> void: game_state.transporters.clear() game_state.stored_vessels.clear() game_state.reset_progression() - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") diff --git a/tests/test_gas_bands.gd b/tests/test_gas_bands.gd index 9804173..e83bf2e 100644 --- a/tests/test_gas_bands.gd +++ b/tests/test_gas_bands.gd @@ -32,7 +32,7 @@ extends SceneTree # period whenever the camera crosses a wrap boundary. Unless the hashes # are wrapped to match, the whole sky rearranges itself at that instant -const SHADER_PATH := "res://gas_surface.gdshader" +const SHADER_PATH := "res://shaders/gas_surface.gdshader" # Sample spacing along the scan, in cells. Small enough that a genuinely # smooth field moves very little between samples. const STEP := 0.001 diff --git a/tests/test_gas_bomber.gd b/tests/test_gas_bomber.gd index 53e9a4e..7412779 100644 --- a/tests/test_gas_bomber.gd +++ b/tests/test_gas_bomber.gd @@ -77,7 +77,7 @@ func _initialize() -> void: return game_state.fleet_gas_cargo = 20 - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") skill = main.get_node("GasBombController") @@ -127,12 +127,12 @@ func _process(delta: float) -> bool: # enemy's definition, which would otherwise clobber a # pre-add_child override the instant the enemy entered the tree. for offset in [Vector2(-60, 0), Vector2(70, 35)]: - var enemy: Node = load("res://Enemy.tscn").instantiate() + var enemy: Node = load("res://enemies/Enemy.tscn").instantiate() enemy.position = skill.aim_target + offset main.add_child(enemy) enemy.speed = 0.0 inside_enemies.append(enemy) - outside_enemy = load("res://Enemy.tscn").instantiate() + outside_enemy = load("res://enemies/Enemy.tscn").instantiate() outside_enemy.position = skill.aim_target + Vector2(AOE_RADIUS_FOR_TEST + 80.0, 0) main.add_child(outside_enemy) outside_enemy.speed = 0.0 diff --git a/tests/test_gas_bomber_ammo.gd b/tests/test_gas_bomber_ammo.gd index 7ef5ae6..7c4e5a8 100644 --- a/tests/test_gas_bomber_ammo.gd +++ b/tests/test_gas_bomber_ammo.gd @@ -43,7 +43,7 @@ func _initialize() -> void: game_state.rocks = 0 game_state.gas = 0 game_state.fleet_gas_cargo = 0 - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") skill = main.get_node("GasBombController") diff --git a/tests/test_gas_bomber_cooldowns.gd b/tests/test_gas_bomber_cooldowns.gd index 655c5f9..c80883e 100644 --- a/tests/test_gas_bomber_cooldowns.gd +++ b/tests/test_gas_bomber_cooldowns.gd @@ -14,7 +14,7 @@ func _initialize() -> void: state.vessel_levels["unlock_gas_bomber"] = 1 # #60: shots draw from the fleet hold now - stock enough for both fires. state.fleet_gas_cargo = 20 - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") skill = main.get_node("GasBombController") diff --git a/tests/test_gas_burner_pause.gd b/tests/test_gas_burner_pause.gd index 8ffdc4d..50471c7 100644 --- a/tests/test_gas_burner_pause.gd +++ b/tests/test_gas_burner_pause.gd @@ -32,7 +32,7 @@ func _initialize() -> void: game_state.extractors.clear() game_state.transporters.clear() game_state.reset_progression() - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) current_scene = main controller = main.get_node("BuildController") @@ -65,7 +65,7 @@ func _process(delta: float) -> bool: return _fail("could not stock the burner with gas") # --- A. it offers pause, as its primary action ---------------- - var definition: Resource = load("res://BuildingDefinitions.gd") \ + var definition: Resource = load("res://buildings/BuildingDefinitions.gd") \ .get_definition(GameState.BUILDING_GAS_BURNER) var visual: Node = definition.visual_scene.instantiate() var provider: Node = visual.get_node_or_null("ActionProvider") diff --git a/tests/test_gas_system.gd b/tests/test_gas_system.gd index 7f98ee6..81fc3e0 100644 --- a/tests/test_gas_system.gd +++ b/tests/test_gas_system.gd @@ -42,10 +42,10 @@ func _process(delta: float) -> bool: # emission advances continuously so the source visibly looks active. game_state.planet_name = "Gas Test" game_state.planet_definition_id = "gas_giant" - var surface: Node = load("res://PlanetSurface.tscn").instantiate() + var surface: Node = load("res://surface/PlanetSurface.tscn").instantiate() root.add_child(surface) var gas_field: Node = surface.get_node("SurfaceFeatures/ResourceProvider") - if gas_field.get_script() != load("res://GasVentField.gd"): + if gas_field.get_script() != load("res://surface/GasVentField.gd"): surface.free() return _fail("gas surface did not compose the gas feature scene") if surface.get_node_or_null("RockField") != null: @@ -58,10 +58,10 @@ func _process(delta: float) -> bool: surface.free() game_state.planet_definition_id = "rocky" - var rocky_surface: Node = load("res://PlanetSurface.tscn").instantiate() + var rocky_surface: Node = load("res://surface/PlanetSurface.tscn").instantiate() root.add_child(rocky_surface) var rocky_features: Node = rocky_surface.get_node("SurfaceFeatures/ResourceProvider") - if rocky_features.get_script() != load("res://RockField.gd"): + if rocky_features.get_script() != load("res://surface/RockField.gd"): rocky_surface.free() return _fail("rocky surface did not compose the ore feature scene") if rocky_surface.get_node_or_null("GasVentField") != null: @@ -80,7 +80,7 @@ func _process(delta: float) -> bool: break if not found_giant: return _fail("world generation produced no deterministic gas giant") - var giant: Node2D = load("res://Planet.tscn").instantiate() + var giant: Node2D = load("res://planets/Planet.tscn").instantiate() giant.definition_id = "gas_giant" root.add_child(giant) giant.visual._process(0.5) diff --git a/tests/test_generic_inventory.gd b/tests/test_generic_inventory.gd index 9e9418c..d59a144 100644 --- a/tests/test_generic_inventory.gd +++ b/tests/test_generic_inventory.gd @@ -1,6 +1,6 @@ extends SceneTree -const INVENTORY = preload("res://Inventory.gd") +const INVENTORY = preload("res://resources/Inventory.gd") const TEST_RESOURCE: String = "crystal" diff --git a/tests/test_hangar_management.gd b/tests/test_hangar_management.gd index 52542b2..1c10e4a 100644 --- a/tests/test_hangar_management.gd +++ b/tests/test_hangar_management.gd @@ -19,7 +19,7 @@ func _initialize() -> void: game_state.transporters.clear() game_state.stored_vessels.clear() game_state.rocks = 100 - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") controller = scene.get_node("BuildController") @@ -71,7 +71,7 @@ func _process(delta: float) -> bool: # Context actions are compact until expanded. A mothership unfolds # research and hangar; transfer stays as a persistent shortcut beside # Build and is not duplicated in the foldout. - var mothership: Node2D = load("res://Building.tscn").instantiate() + var mothership: Node2D = load("res://buildings/Building.tscn").instantiate() mothership.set("building_type", GameState.BUILDING_MOTHERSHIP) mothership._ready() controller.current_building = mothership diff --git a/tests/test_hud_layout.gd b/tests/test_hud_layout.gd index 8cf4570..c6f7226 100644 --- a/tests/test_hud_layout.gd +++ b/tests/test_hud_layout.gd @@ -38,7 +38,7 @@ const EXCLUSIVE_PAIRS: Array = [["building_action_button", "hangar_button"]] func _initialize() -> void: - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) controller = scene.get_node("BuildController") readout = scene.get_node("UI/ResourceReadout") diff --git a/tests/test_icon_button.gd b/tests/test_icon_button.gd index 5710480..7be47a9 100644 --- a/tests/test_icon_button.gd +++ b/tests/test_icon_button.gd @@ -20,7 +20,7 @@ var press_count: int = 0 func _initialize() -> void: - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) world_map = main_scene.get_node("UI/WorldMap") diff --git a/tests/test_icon_button_drag_cancel.gd b/tests/test_icon_button_drag_cancel.gd index 7b3cc88..88325c0 100644 --- a/tests/test_icon_button_drag_cancel.gd +++ b/tests/test_icon_button_drag_cancel.gd @@ -13,7 +13,7 @@ var press_count: int = 0 func _initialize() -> void: - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) map_button = main_scene.get_node("UI/MapButton") diff --git a/tests/test_icon_button_press_fires.gd b/tests/test_icon_button_press_fires.gd index 24e8f09..59cbf87 100644 --- a/tests/test_icon_button_press_fires.gd +++ b/tests/test_icon_button_press_fires.gd @@ -32,7 +32,7 @@ var presses: int = 0 func _initialize() -> void: - var button_script: GDScript = load("res://IconButton.gd") + var button_script: GDScript = load("res://ui/IconButton.gd") # --- D. the default is the platform rule -------------------------- var default_button: Control = button_script.new() diff --git a/tests/test_joystick_control.gd b/tests/test_joystick_control.gd index cc54861..a65a4c5 100644 --- a/tests/test_joystick_control.gd +++ b/tests/test_joystick_control.gd @@ -29,7 +29,7 @@ var accelerated_after_release: bool = false func _initialize() -> void: - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") diff --git a/tests/test_joystick_recentres.gd b/tests/test_joystick_recentres.gd index bd7a1e8..d997263 100644 --- a/tests/test_joystick_recentres.gd +++ b/tests/test_joystick_recentres.gd @@ -24,7 +24,7 @@ var elapsed: float = 0.0 func _initialize() -> void: - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) current_scene = main diff --git a/tests/test_keyboard_input.gd b/tests/test_keyboard_input.gd index 321abf5..d6e97b7 100644 --- a/tests/test_keyboard_input.gd +++ b/tests/test_keyboard_input.gd @@ -29,7 +29,7 @@ var moving_centroid: Vector2 = Vector2.ZERO func _initialize() -> void: root.get_node("GameState").reset_formation() - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) controller = scene fleet = scene.get_node("Fleet") diff --git a/tests/test_lab_research_reward.gd b/tests/test_lab_research_reward.gd index 0d721d4..14e0154 100644 --- a/tests/test_lab_research_reward.gd +++ b/tests/test_lab_research_reward.gd @@ -31,7 +31,7 @@ func _process(delta: float) -> bool: match stage: 0: # --- A. the field exists and round-trips --------------------- - var setup: Resource = load("res://PlanetSetup.gd").new() + var setup: Resource = load("res://surface/PlanetSetup.gd").new() setup.setup_id = "reward_probe" setup.display_name = "Reward Probe" setup.surface_profile_id = "rocky" @@ -48,7 +48,7 @@ func _process(delta: float) -> bool: # --- B. the map's reward beats the planet type's rate -------- # A research_lab planet's own definition pays a flat 1. - var flat_rate: int = int(load("res://ResearchLabPlanetDefinition.tres").conquest_research_points) + var flat_rate: int = int(load("res://planets/ResearchLabPlanetDefinition.tres").conquest_research_points) game_state.research_points = 0 game_state.register_capture_points("hard_lab", 2, "research_lab", 6) game_state.mark_point_captured("hard_lab", 0) @@ -72,7 +72,7 @@ func _process(delta: float) -> bool: if 6 <= flat_rate: return _fail("authoring a harder lab did not raise its worth") - editor = load("res://PlanetSetupEditor.tscn").instantiate() + editor = load("res://surface/PlanetSetupEditor.tscn").instantiate() root.add_child(editor) current_scene = editor elapsed = 0.0 diff --git a/tests/test_laser_ammo.gd b/tests/test_laser_ammo.gd index 7a89251..72f2a83 100644 --- a/tests/test_laser_ammo.gd +++ b/tests/test_laser_ammo.gd @@ -42,7 +42,7 @@ func _initialize() -> void: game_state.rocks = 0 game_state.gas = 0 game_state.fleet_gas_cargo = 0 - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") skill = main.get_node("LaserController") diff --git a/tests/test_laser_auto_aim.gd b/tests/test_laser_auto_aim.gd index 1d9ad8f..f51d088 100644 --- a/tests/test_laser_auto_aim.gd +++ b/tests/test_laser_auto_aim.gd @@ -37,7 +37,7 @@ func _initialize() -> void: game_state.reset_progression() game_state.vessel_levels["unlock_laser"] = 1 game_state.deposit_fleet_resource(GameState.RESOURCE_ENERGY, 500) - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) current_scene = main fleet = main.get_node("Fleet") @@ -168,7 +168,7 @@ func _process(delta: float) -> bool: func _spawn_enemy(offset: Vector2) -> Node: - var enemy: Node = load("res://Enemy.tscn").instantiate() + var enemy: Node = load("res://enemies/Enemy.tscn").instantiate() enemy.position = shooter.global_position + offset main.add_child(enemy) enemy.speed = 0.0 diff --git a/tests/test_laser_vessel.gd b/tests/test_laser_vessel.gd index 55c3238..df23551 100644 --- a/tests/test_laser_vessel.gd +++ b/tests/test_laser_vessel.gd @@ -54,7 +54,7 @@ func _initialize() -> void: # fleet composition exists), so this deposit can't be clamped by the # soon-to-exist all-laser fleet having zero "cargo" capability. game_state.deposit_fleet_resource(GameState.RESOURCE_ENERGY, 20) - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") skill = main.get_node("LaserController") @@ -118,19 +118,19 @@ func _process(delta: float) -> bool: # --- B. targets: two on the line, one off it, one past range --- for offset in [Vector2(200.0, 0.0), Vector2(500.0, 0.0)]: - var enemy: Node = load("res://Enemy.tscn").instantiate() + var enemy: Node = load("res://enemies/Enemy.tscn").instantiate() enemy.position = first_shooter.global_position + offset main.add_child(enemy) enemy.speed = 0.0 on_line_enemies.append(enemy) - off_line_enemy = load("res://Enemy.tscn").instantiate() + off_line_enemy = load("res://enemies/Enemy.tscn").instantiate() off_line_enemy.position = first_shooter.global_position \ + Vector2(200.0, BEAM_HALF_WIDTH + 60.0) main.add_child(off_line_enemy) off_line_enemy.speed = 0.0 - beyond_range_enemy = load("res://Enemy.tscn").instantiate() + beyond_range_enemy = load("res://enemies/Enemy.tscn").instantiate() beyond_range_enemy.position = first_shooter.global_position + Vector2(2000.0, 0.0) main.add_child(beyond_range_enemy) beyond_range_enemy.speed = 0.0 diff --git a/tests/test_lopsided_formation_movement.gd b/tests/test_lopsided_formation_movement.gd index 8c9c470..bd7fcca 100644 --- a/tests/test_lopsided_formation_movement.gd +++ b/tests/test_lopsided_formation_movement.gd @@ -39,7 +39,7 @@ func _initialize() -> void: for i in range(game_state.formation.size()): game_state.formation[i] += Vector2(90.0, -70.0) - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") diff --git a/tests/test_lunar_field.gd b/tests/test_lunar_field.gd index e576b35..7b60bde 100644 --- a/tests/test_lunar_field.gd +++ b/tests/test_lunar_field.gd @@ -27,9 +27,9 @@ extends SceneTree # D. the miss sentinel stays inside mediump range when squared, so it # cannot become +Inf (and then NaN) on a mobile GPU -const SHADER_PATH := "res://lunar_surface.gdshader" -const TILED_SHADER_PATH := "res://lunar_tiled.gdshader" -const BACKGROUND_SCRIPT_PATH := "res://SurfaceBackground.gd" +const SHADER_PATH := "res://shaders/lunar_surface.gdshader" +const TILED_SHADER_PATH := "res://shaders/lunar_tiled.gdshader" +const BACKGROUND_SCRIPT_PATH := "res://surface/SurfaceBackground.gd" # Largest normalized distance any shading term below reacts to. Past this, # every smoothstep has saturated and the pixel is plain regolith. const MAX_SIGNIFICANT_DISTANCE := 1.15 diff --git a/tests/test_main_menu.gd b/tests/test_main_menu.gd index 97af240..bf9a6e5 100644 --- a/tests/test_main_menu.gd +++ b/tests/test_main_menu.gd @@ -17,7 +17,7 @@ var stage: int = 0 func _initialize() -> void: game_state = root.get_node("GameState") - menu = load("res://MainMenu.tscn").instantiate() + menu = load("res://ui/MainMenu.tscn").instantiate() root.add_child(menu) current_scene = menu @@ -59,7 +59,7 @@ func _process(delta: float) -> bool: return _fail("pressing Map Editor did not reach PlanetSetupEditor.tscn") # Return to the menu the same way the player would, then test Play. - menu = load("res://MainMenu.tscn").instantiate() + menu = load("res://ui/MainMenu.tscn").instantiate() root.add_child(menu) current_scene = menu elapsed = 0.0 diff --git a/tests/test_manual_supply_route.gd b/tests/test_manual_supply_route.gd index bfb1f86..d0a3960 100644 --- a/tests/test_manual_supply_route.gd +++ b/tests/test_manual_supply_route.gd @@ -56,7 +56,7 @@ func _initialize() -> void: game_state.stored_vessels.clear() game_state.build_time_scale = 0.02 game_state.unlocked = ["shipyards", "coordination", "wing", "squadron", "armada"] - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") field = scene.get_node("BuildingField") diff --git a/tests/test_map_building_markers.gd b/tests/test_map_building_markers.gd index e92320a..901fa69 100644 --- a/tests/test_map_building_markers.gd +++ b/tests/test_map_building_markers.gd @@ -36,7 +36,7 @@ func _initialize() -> void: game_state = root.get_node("GameState") game_state.buildings.clear() game_state.extractors.clear() - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) map_content = scene.get_node("UI/WorldMap/MapContent") diff --git a/tests/test_modal_blocks_input.gd b/tests/test_modal_blocks_input.gd index 2aca0a9..19160cf 100644 --- a/tests/test_modal_blocks_input.gd +++ b/tests/test_modal_blocks_input.gd @@ -41,7 +41,7 @@ func _initialize() -> void: game_state.buildings.clear() game_state.extractors.clear() game_state.transporters.clear() - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") skill_menu = scene.get_node("UI/SkillMenu") diff --git a/tests/test_mothership_replacement.gd b/tests/test_mothership_replacement.gd index 576f039..2fb9cdd 100644 --- a/tests/test_mothership_replacement.gd +++ b/tests/test_mothership_replacement.gd @@ -31,7 +31,7 @@ func _initialize() -> void: game_state.buildings.clear() game_state.extractors.clear() - main_scene = load("res://Main.tscn").instantiate() + main_scene = load("res://world/Main.tscn").instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") controller = main_scene.get_node("BuildController") diff --git a/tests/test_no_popin_on_load.gd b/tests/test_no_popin_on_load.gd index 810e82b..0cddf48 100644 --- a/tests/test_no_popin_on_load.gd +++ b/tests/test_no_popin_on_load.gd @@ -42,7 +42,7 @@ func _initialize() -> void: game_state.return_world_position = WorldGen.chunk_origin(target_chunk) + Vector2.ONE * WorldGen.CHUNK_SIZE * 0.5 game_state.return_camera_zoom = 1.0 - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) asteroid_field = main_scene.get_node("AsteroidField") diff --git a/tests/test_payments_use_fleet_hold.gd b/tests/test_payments_use_fleet_hold.gd index 462932f..d3165fb 100644 --- a/tests/test_payments_use_fleet_hold.gd +++ b/tests/test_payments_use_fleet_hold.gd @@ -114,7 +114,7 @@ func _initialize() -> void: # --- F. end to end, through the real build path -------------------------- game_state.bank_inventory.set_amount(GameState.RESOURCE_ORE, 0) game_state.fleet_inventory.set_amount(GameState.RESOURCE_ORE, HOLD_ORE) - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) current_scene = scene diff --git a/tests/test_pickup_feedback.gd b/tests/test_pickup_feedback.gd index 053acb8..422f99a 100644 --- a/tests/test_pickup_feedback.gd +++ b/tests/test_pickup_feedback.gd @@ -28,13 +28,13 @@ func _initialize() -> void: game_state.buildings.clear() game_state.extractors.clear() game_state.reset_progression() - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) current_scene = main fleet = main.get_node("Fleet") -const PICKUP_VFX = preload("res://ResourcePickupVFX.gd") +const PICKUP_VFX = preload("res://vfx/ResourcePickupVFX.gd") func _markers() -> Array: @@ -46,7 +46,7 @@ func _markers() -> Array: func _drop_rock_on_fleet() -> Node2D: - var rock: Node2D = load("res://Rock.tscn").instantiate() + var rock: Node2D = load("res://surface/Rock.tscn").instantiate() rock.build_shape(7) rock.position = fleet.ships[0].global_position main.add_child(rock) @@ -87,7 +87,7 @@ func _process(delta: float) -> bool: % marker.global_position.distance_to(fleet.ships[0].global_position)) # --- B. built from the catalog's own glyph -------------------- - var definitions: Script = load("res://ResourceDefinitions.gd") + var definitions: Script = load("res://resources/ResourceDefinitions.gd") var ore: Resource = definitions.get_definition(GameState.RESOURCE_ORE) if not marker.colour.is_equal_approx(ore.color): return _fail("the marker is %s, but ore is %s" % [marker.colour, ore.color]) diff --git a/tests/test_pinch_zoom.gd b/tests/test_pinch_zoom.gd index 023a071..43e120b 100644 --- a/tests/test_pinch_zoom.gd +++ b/tests/test_pinch_zoom.gd @@ -18,7 +18,7 @@ var baseline_captured: bool = false func _initialize() -> void: - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) camera = main_scene.get_node("Camera2D") diff --git a/tests/test_pivot_controls.gd b/tests/test_pivot_controls.gd index 8396c82..365a0cc 100644 --- a/tests/test_pivot_controls.gd +++ b/tests/test_pivot_controls.gd @@ -29,7 +29,7 @@ var game_state: Node func _initialize() -> void: game_state = root.get_node("GameState") game_state.reset_formation() - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") controller = scene diff --git a/tests/test_planet_atmosphere_transition.gd b/tests/test_planet_atmosphere_transition.gd index 8a78fce..9f47f83 100644 --- a/tests/test_planet_atmosphere_transition.gd +++ b/tests/test_planet_atmosphere_transition.gd @@ -55,7 +55,7 @@ func _initialize() -> void: return game_state = root.get_node("GameState") - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) # change_scene_to_file() operates on current_scene - the real game diff --git a/tests/test_planet_conquest_gate.gd b/tests/test_planet_conquest_gate.gd index 5002345..c26a049 100644 --- a/tests/test_planet_conquest_gate.gd +++ b/tests/test_planet_conquest_gate.gd @@ -78,7 +78,7 @@ func _initialize() -> void: # the unconquered path first, then conquers it. game_state.planet_capture.clear() - main_scene = load("res://Main.tscn").instantiate() + main_scene = load("res://world/Main.tscn").instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") controller = main_scene.get_node("BuildController") diff --git a/tests/test_planet_extractor_marker.gd b/tests/test_planet_extractor_marker.gd index ef11c84..662bb74 100644 --- a/tests/test_planet_extractor_marker.gd +++ b/tests/test_planet_extractor_marker.gd @@ -56,13 +56,13 @@ func _initialize() -> void: quit(1) return - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) map_content = scene.get_node("UI/WorldMap/MapContent") func _spawn_planet() -> Node2D: - var planet: Node2D = load("res://Planet.tscn").instantiate() + var planet: Node2D = load("res://planets/Planet.tscn").instantiate() planet.planet_name = planet_name planet.planet_id = planet_id planet.shape_seed = 12345 @@ -143,7 +143,7 @@ func _process(_delta: float) -> bool: # A different planet must NOT inherit the marker: the flag is keyed # by name, and getting that wrong would light up every planet. - var other: Node2D = load("res://Planet.tscn").instantiate() + var other: Node2D = load("res://planets/Planet.tscn").instantiate() other.planet_name = planet_name + " II" other.planet_id = planet_id + ":other" other.shape_seed = 999 diff --git a/tests/test_planet_identity_persists.gd b/tests/test_planet_identity_persists.gd index 11970ca..6b7fe58 100644 --- a/tests/test_planet_identity_persists.gd +++ b/tests/test_planet_identity_persists.gd @@ -50,7 +50,7 @@ func _load_main() -> void: game_state.return_world_position = WorldGen.chunk_origin(target_chunk) + Vector2.ONE * WorldGen.CHUNK_SIZE * 0.5 game_state.return_camera_zoom = 1.0 - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) main_scene.get_node("AsteroidField").set_process(false) diff --git a/tests/test_planet_landing_proximity.gd b/tests/test_planet_landing_proximity.gd index bdc98c6..f427082 100644 --- a/tests/test_planet_landing_proximity.gd +++ b/tests/test_planet_landing_proximity.gd @@ -38,7 +38,7 @@ func _initialize() -> void: quit(1) return - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") diff --git a/tests/test_planet_map_assignment.gd b/tests/test_planet_map_assignment.gd index 4988142..c510555 100644 --- a/tests/test_planet_map_assignment.gd +++ b/tests/test_planet_map_assignment.gd @@ -88,7 +88,7 @@ func _initialize() -> void: print("across 40 planets the draw used %d of the %d available maps" % [distinct.size(), ids.size()]) # --- D. a new map appearing does not re-deal the planets already visited - - var scratch: Resource = load("res://PlanetSetup.gd").new() + var scratch: Resource = load("res://surface/PlanetSetup.gd").new() scratch.setup_id = SCRATCH_ID scratch.display_name = "Assignment Scratch" scratch.surface_profile_id = profile_id @@ -141,7 +141,7 @@ func _initialize() -> void: func _plant_pool() -> bool: for pool_id in POOL_IDS: - var setup: Resource = load("res://PlanetSetup.gd").new() + var setup: Resource = load("res://surface/PlanetSetup.gd").new() setup.setup_id = pool_id setup.display_name = pool_id setup.surface_profile_id = "rocky" diff --git a/tests/test_planet_map_marker_matches_spawn.gd b/tests/test_planet_map_marker_matches_spawn.gd index aeac358..96bd0b4 100644 --- a/tests/test_planet_map_marker_matches_spawn.gd +++ b/tests/test_planet_map_marker_matches_spawn.gd @@ -36,7 +36,7 @@ func _initialize() -> void: game_state.return_world_position = WorldGen.chunk_origin(target_chunk) + Vector2.ONE * WorldGen.CHUNK_SIZE * 0.5 game_state.return_camera_zoom = 1.0 - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) main_scene.get_node("AsteroidField").set_process(false) diff --git a/tests/test_planet_prompt_map_interaction.gd b/tests/test_planet_prompt_map_interaction.gd index a3a7cc9..79853e8 100644 --- a/tests/test_planet_prompt_map_interaction.gd +++ b/tests/test_planet_prompt_map_interaction.gd @@ -34,7 +34,7 @@ func _initialize() -> void: quit(1) return - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") diff --git a/tests/test_planet_setups.gd b/tests/test_planet_setups.gd index 9bf6b8d..1fb8dc8 100644 --- a/tests/test_planet_setups.gd +++ b/tests/test_planet_setups.gd @@ -29,8 +29,8 @@ var pending_surface: Node func _initialize() -> void: - PLANET_SETUP_SCRIPT = load("res://PlanetSetup.gd") - CAPTURE_POINT_SCRIPT = load("res://CapturePoint.gd") + PLANET_SETUP_SCRIPT = load("res://surface/PlanetSetup.gd") + CAPTURE_POINT_SCRIPT = load("res://surface/CapturePoint.gd") # --- 1. determinism and profile filtering --- rocky_setup = PlanetSetups.setup_for_planet("chunk:3:7", "rocky") if rocky_setup == null: @@ -91,7 +91,7 @@ func _initialize() -> void: game_state.planet_name = "Setup Test" game_state.planet_id = "chunk:3:7" game_state.planet_definition_id = "rocky" - pending_surface = load("res://PlanetSurface.tscn").instantiate() + pending_surface = load("res://surface/PlanetSurface.tscn").instantiate() root.add_child(pending_surface) @@ -120,7 +120,7 @@ func _process(delta: float) -> bool: pending_surface.free() game_state.planet_definition_id = "gas_giant" - pending_surface = load("res://PlanetSurface.tscn").instantiate() + pending_surface = load("res://surface/PlanetSurface.tscn").instantiate() root.add_child(pending_surface) elapsed = 0.0 stage = 1 diff --git a/tests/test_planet_spawning.gd b/tests/test_planet_spawning.gd index 3a5adb5..c7ebded 100644 --- a/tests/test_planet_spawning.gd +++ b/tests/test_planet_spawning.gd @@ -33,7 +33,7 @@ func _initialize() -> void: quit(1) return - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") diff --git a/tests/test_prompt_debounce.gd b/tests/test_prompt_debounce.gd index f275903..f242cb2 100644 --- a/tests/test_prompt_debounce.gd +++ b/tests/test_prompt_debounce.gd @@ -42,7 +42,7 @@ func _initialize() -> void: quit(1) return - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") diff --git a/tests/test_research_double_tap.gd b/tests/test_research_double_tap.gd index 1d2563a..39216a9 100644 --- a/tests/test_research_double_tap.gd +++ b/tests/test_research_double_tap.gd @@ -29,7 +29,7 @@ func _initialize() -> void: game_state.buildings.clear() game_state.extractors.clear() game_state.reset_progression() - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) current_scene = main controller = main.get_node("BuildController") diff --git a/tests/test_research_double_tap.gd.uid b/tests/test_research_double_tap.gd.uid new file mode 100644 index 0000000..28ef385 --- /dev/null +++ b/tests/test_research_double_tap.gd.uid @@ -0,0 +1 @@ +uid://by5ccimf1hfwp diff --git a/tests/test_research_lab_extractor_gate.gd b/tests/test_research_lab_extractor_gate.gd index 98cf839..7ff1798 100644 --- a/tests/test_research_lab_extractor_gate.gd +++ b/tests/test_research_lab_extractor_gate.gd @@ -50,7 +50,7 @@ func _initialize() -> void: for node in GameState.SKILL_TREE: game_state.unlocked.append(node.id) - main_scene = load("res://Main.tscn").instantiate() + main_scene = load("res://world/Main.tscn").instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") controller = main_scene.get_node("BuildController") diff --git a/tests/test_research_points.gd b/tests/test_research_points.gd index 3672a8f..32b3b39 100644 --- a/tests/test_research_points.gd +++ b/tests/test_research_points.gd @@ -55,10 +55,10 @@ func _initialize() -> void: print("research labs are deterministic and rare (%d of %d planet chunks)" % [lab_count, total_planets]) # --- structural: yields nothing at all ------------------------------------ - var lab_def: Resource = load("res://PlanetDefinitions.gd").get_definition("research_lab") + var lab_def: Resource = load("res://planets/PlanetDefinitions.gd").get_definition("research_lab") if String(lab_def.resource_id) != "": return _fail("research_lab planet's resource_id is '%s', expected empty" % lab_def.resource_id) - var profile: Resource = load("res://PlanetSurfaceProfiles.gd").get_profile("research_lab") + var profile: Resource = load("res://surface/PlanetSurfaceProfiles.gd").get_profile("research_lab") if profile.features_scene != null: return _fail("research_lab surface profile has a features_scene - it must yield nothing") print("research_lab yields no resource id and no surface feature provider") @@ -89,7 +89,7 @@ func _initialize() -> void: # The planet type itself must no longer carry a reward - that is the # delegation. If it crept back, a lab would pay its map's value PLUS a # hidden one, or pay something even with no map authored. - var lab_definition: Resource = load("res://PlanetDefinitions.gd").get_definition("research_lab") + var lab_definition: Resource = load("res://planets/PlanetDefinitions.gd").get_definition("research_lab") if int(lab_definition.conquest_research_points) != 0: return _fail("the research_lab planet type still grants %d point(s) of its own - the reward belongs to the authored map now" \ % int(lab_definition.conquest_research_points)) diff --git a/tests/test_resource_readout.gd b/tests/test_resource_readout.gd index 121995d..8e7b31e 100644 --- a/tests/test_resource_readout.gd +++ b/tests/test_resource_readout.gd @@ -38,12 +38,12 @@ func _initialize() -> void: # rule holds per-resource, not just per-readout. # --- 4. no hardcoded resource id in the generalized script --- - var source: String = FileAccess.get_file_as_string("res://ResourceReadout.gd") + var source: String = FileAccess.get_file_as_string("res://ui/ResourceReadout.gd") for literal in ['"ore"', '"gas"', 'RESOURCE_ORE', 'RESOURCE_GAS']: if literal in source: return _fail("ResourceReadout.gd hardcodes %s - it must read GameState.resource_types() only" % literal) - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) readout = main.get_node("UI/ResourceReadout") @@ -100,7 +100,7 @@ func _process(delta: float) -> bool: # --- 5. the surface scene's instance also works, bright-background --- main.free() - var surface: Node = load("res://PlanetSurface.tscn").instantiate() + var surface: Node = load("res://surface/PlanetSurface.tscn").instantiate() root.add_child(surface) var surface_readout: Node = surface.get_node("UI/ResourceReadout") if not surface_readout.bright_background: diff --git a/tests/test_resource_transfer.gd b/tests/test_resource_transfer.gd index 90299f7..953f313 100644 --- a/tests/test_resource_transfer.gd +++ b/tests/test_resource_transfer.gd @@ -52,7 +52,7 @@ func _initialize() -> void: game_state.fleet_cargo = 0 game_state.stored_vessels.clear() game_state.unlocked = ["shipyards", "coordination", "wing", "squadron", "armada"] - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") # A new game now flies STARTING_SHIP_COUNT (1) vessel into BASE_FLEET_SIZE diff --git a/tests/test_resources_and_buildings.gd b/tests/test_resources_and_buildings.gd index a954b8c..81a9c9b 100644 --- a/tests/test_resources_and_buildings.gd +++ b/tests/test_resources_and_buildings.gd @@ -27,7 +27,7 @@ func _initialize() -> void: game_state.buildings.clear() game_state.has_return_position = false - scene = load("res://PlanetSurface.tscn").instantiate() + scene = load("res://surface/PlanetSurface.tscn").instantiate() root.add_child(scene) current_scene = scene fleet = scene.get_node("Fleet") @@ -39,7 +39,7 @@ func _process(delta: float) -> bool: 0: # --- gather a rock ------------------------------------------- scene.get_node("SurfaceFeatures/ResourceProvider").set_process(false) - rock = load("res://Rock.tscn").instantiate() + rock = load("res://surface/Rock.tscn").instantiate() rock.build_shape(1) # Placed OUTSIDE the pickup shape but inside attract_radius, so # this also proves the magnetic pull actually reels it in rather @@ -63,7 +63,7 @@ func _process(delta: float) -> bool: # Bank enough to build with, then move to the space scene. game_state.rocks = 60 - change_scene_to_file("res://Main.tscn") + change_scene_to_file("res://world/Main.tscn") elapsed = 0.0 stage = 2 return false diff --git a/tests/test_return_position_matches_planet.gd b/tests/test_return_position_matches_planet.gd index 99b4beb..d660702 100644 --- a/tests/test_return_position_matches_planet.gd +++ b/tests/test_return_position_matches_planet.gd @@ -43,7 +43,7 @@ func _initialize() -> void: quit(1) return - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) current_scene = main_scene diff --git a/tests/test_setup_editor.gd b/tests/test_setup_editor.gd index fe8c572..ff49512 100644 --- a/tests/test_setup_editor.gd +++ b/tests/test_setup_editor.gd @@ -24,7 +24,7 @@ var elapsed: float = 0.0 func _initialize() -> void: _cleanup_scratch_file() - editor = load("res://PlanetSetupEditor.tscn").instantiate() + editor = load("res://surface/PlanetSetupEditor.tscn").instantiate() root.add_child(editor) @@ -86,7 +86,7 @@ func _process(delta: float) -> bool: return false # Reopen in a FRESH editor instance, as a re-landing/re-editing # session would. - var reopened: Node = load("res://PlanetSetupEditor.tscn").instantiate() + var reopened: Node = load("res://surface/PlanetSetupEditor.tscn").instantiate() root.add_child(reopened) editor = reopened elapsed = 0.0 diff --git a/tests/test_setup_editor_delete.gd b/tests/test_setup_editor_delete.gd index d5c0085..e779bb0 100644 --- a/tests/test_setup_editor_delete.gd +++ b/tests/test_setup_editor_delete.gd @@ -35,7 +35,7 @@ func _initialize() -> void: _remove(SCRATCH_PATH) _remove(KEEP_PATH) PlanetSetups.rescan() - editor = load("res://PlanetSetupEditor.tscn").instantiate() + editor = load("res://surface/PlanetSetupEditor.tscn").instantiate() root.add_child(editor) diff --git a/tests/test_setup_file_identity.gd b/tests/test_setup_file_identity.gd index c064e35..9d963ba 100644 --- a/tests/test_setup_file_identity.gd +++ b/tests/test_setup_file_identity.gd @@ -45,7 +45,7 @@ var stage: int = 0 func _initialize() -> void: _cleanup() - editor = load("res://PlanetSetupEditor.tscn").instantiate() + editor = load("res://surface/PlanetSetupEditor.tscn").instantiate() root.add_child(editor) @@ -70,7 +70,7 @@ func _process(delta: float) -> bool: print("shipped mismatch present: %s" % shipped_mismatch) # A setup whose FILE NAME deliberately differs from its id. - var scratch: Resource = load("res://PlanetSetup.gd").new() + var scratch: Resource = load("res://surface/PlanetSetup.gd").new() scratch.setup_id = SCRATCH_ID scratch.display_name = "Identity Scratch" scratch.surface_profile_id = "rocky" diff --git a/tests/test_shield_vessel.gd b/tests/test_shield_vessel.gd index a902b40..9f928d5 100644 --- a/tests/test_shield_vessel.gd +++ b/tests/test_shield_vessel.gd @@ -38,13 +38,13 @@ func _initialize() -> void: game_state.build_time_scale = 0.02 game_state.reset_progression() game_state.rocks = 2000 - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") func _rock_onto(ship: Node) -> void: - var rock: Area2D = load("res://Asteroid.tscn").instantiate() + var rock: Area2D = load("res://world/Asteroid.tscn").instantiate() rock.velocity = Vector2.ZERO rock.global_position = ship.global_position scene.add_child(rock) diff --git a/tests/test_ship_facing.gd b/tests/test_ship_facing.gd index d32463b..5eec105 100644 --- a/tests/test_ship_facing.gd +++ b/tests/test_ship_facing.gd @@ -20,7 +20,7 @@ var heading_east: float = 0.0 func _initialize() -> void: root.get_node("GameState").reset_formation() - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") diff --git a/tests/test_ship_lab.gd b/tests/test_ship_lab.gd index 55a03f9..446e3ed 100644 --- a/tests/test_ship_lab.gd +++ b/tests/test_ship_lab.gd @@ -40,7 +40,7 @@ func _initialize() -> void: game_state.reset_progression() game_state.rocks = 1200 game_state.fleet_cargo = 0 - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) fleet = scene.get_node("Fleet") field = scene.get_node("BuildingField") diff --git a/tests/test_skill_tree.gd b/tests/test_skill_tree.gd index 0d3d9f6..ac2a14f 100644 --- a/tests/test_skill_tree.gd +++ b/tests/test_skill_tree.gd @@ -53,7 +53,7 @@ func _initialize() -> void: game_state.reset_progression() game_state.reset_formation() - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) controller = scene.get_node("BuildController") fleet = scene.get_node("Fleet") diff --git a/tests/test_sniper_enemy.gd b/tests/test_sniper_enemy.gd index 3a4d369..42f2b4f 100644 --- a/tests/test_sniper_enemy.gd +++ b/tests/test_sniper_enemy.gd @@ -41,7 +41,7 @@ func _initialize() -> void: game_state.build_time_scale = 0.02 game_state.reset_progression() game_state.rocks = 2000 - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") @@ -64,7 +64,7 @@ func _process(delta: float) -> bool: fleet.spawn_ships(1, Vector2.ZERO) target_ship = fleet.ships[0] - mover = load("res://Enemy.tscn").instantiate() + mover = load("res://enemies/Enemy.tscn").instantiate() mover.enemy_id = "sniper" mover.position = target_ship.position + Vector2(1000, 0) main.add_child(mover) @@ -96,7 +96,7 @@ func _process(delta: float) -> bool: # --- fire range gating: a fresh, pinned sniper out of range --- fleet.spawn_ships(1, target_ship.position + Vector2(-2000, 0)) interceptor = fleet.ships[0] - sniper = load("res://Enemy.tscn").instantiate() + sniper = load("res://enemies/Enemy.tscn").instantiate() sniper.enemy_id = "sniper" main.add_child(sniper) sniper.speed = 0.0 diff --git a/tests/test_space_time_distorder.gd b/tests/test_space_time_distorder.gd index ca8d4cd..4a92bd2 100644 --- a/tests/test_space_time_distorder.gd +++ b/tests/test_space_time_distorder.gd @@ -44,7 +44,7 @@ func _initialize() -> void: # hold has no capacity cap yet at this point, so this can't be clamped # by the soon-to-exist fleet's cargo capability. game_state.deposit_fleet_resource(GameState.RESOURCE_ENERGY, 500) - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") fader = main.get_node("UI/SpeedFader") @@ -221,7 +221,7 @@ func _process(delta: float) -> bool: 5: if elapsed < 0.3: return false - main = load("res://PlanetSurface.tscn").instantiate() + main = load("res://surface/PlanetSurface.tscn").instantiate() root.add_child(main) current_scene = main fleet = main.get_node("Fleet") diff --git a/tests/test_star_coverage.gd b/tests/test_star_coverage.gd index dfd6629..0a1728c 100644 --- a/tests/test_star_coverage.gd +++ b/tests/test_star_coverage.gd @@ -16,7 +16,7 @@ var starfield: ColorRect func _initialize() -> void: - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) camera = main_scene.get_node("Camera2D") diff --git a/tests/test_surface_background_shared.gd b/tests/test_surface_background_shared.gd index eb901f0..a8521fc 100644 --- a/tests/test_surface_background_shared.gd +++ b/tests/test_surface_background_shared.gd @@ -24,10 +24,10 @@ extends SceneTree # D. applying each profile through the shared entry point produces the same # shader AND the same colours on both scenes, for every profile -const BACKGROUND_SCENE_PATH := "res://SurfaceBackground.tscn" +const BACKGROUND_SCENE_PATH := "res://surface/SurfaceBackground.tscn" const HOST_SCENES := { - "PlanetSurface.tscn": "res://PlanetSurface.tscn", - "PlanetSetupEditor.tscn": "res://PlanetSetupEditor.tscn", + "PlanetSurface.tscn": "res://surface/PlanetSurface.tscn", + "PlanetSetupEditor.tscn": "res://surface/PlanetSetupEditor.tscn", } const COLOR_PARAMETERS := ["base_color", "crater_color", "highlight_color"] @@ -36,7 +36,7 @@ var hosts: Array = [] func _initialize() -> void: - var surface_profiles: Script = load("res://PlanetSurfaceProfiles.gd") + var surface_profiles: Script = load("res://surface/PlanetSurfaceProfiles.gd") # --- A/B: same source scene, same untouched material --------------------- for scene_name in HOST_SCENES: diff --git a/tests/test_surface_profiles.gd b/tests/test_surface_profiles.gd index 7002043..0e55623 100644 --- a/tests/test_surface_profiles.gd +++ b/tests/test_surface_profiles.gd @@ -42,7 +42,7 @@ func _initialize() -> void: # background changed implementation (#68 swapped the per-pixel # procedural shader for a baked, tiled one), which is a change this test # has no business having an opinion about. - var packed: PackedScene = load("res://PlanetSurface.tscn") + var packed: PackedScene = load("res://surface/PlanetSurface.tscn") var probe: Node = packed.instantiate() scene_shader = probe.get_node("BackgroundLayer/Background").material.shader probe.free() @@ -52,7 +52,7 @@ func _initialize() -> void: # class_name - same load-order hazard PlanetSetups.gd and # PlanetSurfaceController.gd already work around: the class_name cache # isn't guaranteed warm before an import pass has run. - var surface_profiles: Script = load("res://PlanetSurfaceProfiles.gd") + var surface_profiles: Script = load("res://surface/PlanetSurfaceProfiles.gd") var rocky_profile: Resource = surface_profiles.get_profile("rocky") var gas_profile: Resource = surface_profiles.get_profile("gas") if rocky_profile.background_shader == null: @@ -71,7 +71,7 @@ func _initialize() -> void: return game_state.planet_definition_id = "rocky" - scene = load("res://PlanetSurface.tscn").instantiate() + scene = load("res://surface/PlanetSurface.tscn").instantiate() root.add_child(scene) @@ -86,7 +86,7 @@ func _process(delta: float) -> bool: scene.free() game_state.planet_definition_id = "gas_giant" - scene = load("res://PlanetSurface.tscn").instantiate() + scene = load("res://surface/PlanetSurface.tscn").instantiate() root.add_child(scene) elapsed = 0.0 stage = 1 diff --git a/tests/test_transport_hub_building.gd b/tests/test_transport_hub_building.gd index 5f344f5..503f400 100644 --- a/tests/test_transport_hub_building.gd +++ b/tests/test_transport_hub_building.gd @@ -1,6 +1,6 @@ extends SceneTree -const BUILDING_DEFINITIONS = preload("res://BuildingDefinitions.gd") +const BUILDING_DEFINITIONS = preload("res://buildings/BuildingDefinitions.gd") # Headless gameplay test: run with # godot --headless -s res://tests/test_transport_hub_building.gd @@ -40,7 +40,7 @@ func _initialize() -> void: game_state.reset_progression() game_state.rocks = 500 game_state.fleet_cargo = 0 - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) field = scene.get_node("BuildingField") controller = scene.get_node("BuildController") diff --git a/tests/test_turret_spawner_enemy.gd b/tests/test_turret_spawner_enemy.gd index c4ffa7b..8d6e81a 100644 --- a/tests/test_turret_spawner_enemy.gd +++ b/tests/test_turret_spawner_enemy.gd @@ -48,7 +48,7 @@ func _initialize() -> void: _fail("turret_spawner speed is %s, expected 0.0 (stationary)" % definition.speed) return - main = load("res://Main.tscn").instantiate() + main = load("res://world/Main.tscn").instantiate() root.add_child(main) fleet = main.get_node("Fleet") @@ -78,7 +78,7 @@ func _process(delta: float) -> bool: ship.queue_free() fleet.ships.clear() - turret = load("res://Enemy.tscn").instantiate() + turret = load("res://enemies/Enemy.tscn").instantiate() turret.enemy_id = "turret_spawner" turret.position = Vector2(500, 500) turret_start_position = turret.position diff --git a/tests/test_vessel_composition.gd b/tests/test_vessel_composition.gd index 226d9a1..47fb135 100644 --- a/tests/test_vessel_composition.gd +++ b/tests/test_vessel_composition.gd @@ -1,6 +1,6 @@ extends SceneTree -const VESSEL_DEFINITIONS = preload("res://VesselDefinitions.gd") +const VESSEL_DEFINITIONS = preload("res://vessels/VesselDefinitions.gd") var ships: Array = [] var elapsed: float = 0.0 @@ -9,7 +9,7 @@ var game_state: Node func _initialize() -> void: game_state = root.get_node("GameState") - var scene: PackedScene = load("res://Ship.tscn") + var scene: PackedScene = load("res://vessels/Ship.tscn") for definition in VESSEL_DEFINITIONS.all(): var ship: Area2D = scene.instantiate() ship.vessel_type = definition.definition_id diff --git a/tests/test_vessel_delivery.gd b/tests/test_vessel_delivery.gd index cf518cb..a56da35 100644 --- a/tests/test_vessel_delivery.gd +++ b/tests/test_vessel_delivery.gd @@ -20,7 +20,7 @@ func _initialize() -> void: game_state.add_building(GameState.BUILDING_SHIP_CRAFTER, Vector2(900, 0)) game_state.deposit_to_building(2, GameState.SHIP_COST) game_state.queue_order(2, GameState.PRODUCT_SHIP) - scene = load("res://Main.tscn").instantiate() + scene = load("res://world/Main.tscn").instantiate() root.add_child(scene) diff --git a/tests/test_world_map_ui.gd b/tests/test_world_map_ui.gd index 8c284b9..3ec90e6 100644 --- a/tests/test_world_map_ui.gd +++ b/tests/test_world_map_ui.gd @@ -36,7 +36,7 @@ var stage: int = 0 func _initialize() -> void: - var packed: PackedScene = load("res://Main.tscn") + var packed: PackedScene = load("res://world/Main.tscn") main_scene = packed.instantiate() root.add_child(main_scene) fleet = main_scene.get_node("Fleet") diff --git a/FormationEditor.gd b/ui/FormationEditor.gd similarity index 100% rename from FormationEditor.gd rename to ui/FormationEditor.gd diff --git a/FormationEditor.gd.uid b/ui/FormationEditor.gd.uid similarity index 100% rename from FormationEditor.gd.uid rename to ui/FormationEditor.gd.uid diff --git a/IconButton.gd b/ui/IconButton.gd similarity index 100% rename from IconButton.gd rename to ui/IconButton.gd diff --git a/IconButton.gd.uid b/ui/IconButton.gd.uid similarity index 100% rename from IconButton.gd.uid rename to ui/IconButton.gd.uid diff --git a/MainMenu.gd b/ui/MainMenu.gd similarity index 97% rename from MainMenu.gd rename to ui/MainMenu.gd index b4f334a..129203d 100644 --- a/MainMenu.gd +++ b/ui/MainMenu.gd @@ -91,7 +91,7 @@ func _layout_stack() -> void: func _on_play_pressed() -> void: GameState.reset_new_game() - _start("res://Main.tscn") + _start("res://world/Main.tscn") # Loaded, built and added by hand rather than through change_scene_to_file(). @@ -119,7 +119,7 @@ func _on_dev_mode_pressed() -> void: status_label.text = "Dev mode only runs from Godot" return GameState.start_dev_game() - _start("res://Main.tscn") + _start("res://world/Main.tscn") func _on_editor_pressed() -> void: @@ -127,7 +127,7 @@ func _on_editor_pressed() -> void: status_label.text = "Map editor only runs from Godot" return if editor_button.enabled: - _start("res://PlanetSetupEditor.tscn") + _start("res://surface/PlanetSetupEditor.tscn") return status_label.text = "Map editor coming soon" diff --git a/MainMenu.gd.uid b/ui/MainMenu.gd.uid similarity index 100% rename from MainMenu.gd.uid rename to ui/MainMenu.gd.uid diff --git a/MainMenu.tscn b/ui/MainMenu.tscn similarity index 95% rename from MainMenu.tscn rename to ui/MainMenu.tscn index 14e9ce3..9880607 100644 --- a/MainMenu.tscn +++ b/ui/MainMenu.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3] -[ext_resource type="Script" path="res://MainMenu.gd" id="1"] -[ext_resource type="Script" path="res://IconButton.gd" id="2"] +[ext_resource type="Script" path="res://ui/MainMenu.gd" id="1"] +[ext_resource type="Script" path="res://ui/IconButton.gd" id="2"] [node name="MainMenu" type="Node2D"] script = ExtResource("1") diff --git a/NeonNumber.gd b/ui/NeonNumber.gd similarity index 100% rename from NeonNumber.gd rename to ui/NeonNumber.gd diff --git a/NeonNumber.gd.uid b/ui/NeonNumber.gd.uid similarity index 100% rename from NeonNumber.gd.uid rename to ui/NeonNumber.gd.uid diff --git a/NeonPanel.gd b/ui/NeonPanel.gd similarity index 100% rename from NeonPanel.gd rename to ui/NeonPanel.gd diff --git a/NeonPanel.gd.uid b/ui/NeonPanel.gd.uid similarity index 100% rename from NeonPanel.gd.uid rename to ui/NeonPanel.gd.uid diff --git a/PaletteEntryButton.gd b/ui/PaletteEntryButton.gd similarity index 96% rename from PaletteEntryButton.gd rename to ui/PaletteEntryButton.gd index c841907..7d4fb4b 100644 --- a/PaletteEntryButton.gd +++ b/ui/PaletteEntryButton.gd @@ -9,7 +9,7 @@ extends Control signal pressed @export var is_capture_point: bool = false -const ENEMY_DEFINITIONS = preload("res://EnemyDefinitions.gd") +const ENEMY_DEFINITIONS = preload("res://enemies/EnemyDefinitions.gd") @export var enemy_definition: Resource @export var selected: bool = false: set = set_selected diff --git a/PaletteEntryButton.gd.uid b/ui/PaletteEntryButton.gd.uid similarity index 100% rename from PaletteEntryButton.gd.uid rename to ui/PaletteEntryButton.gd.uid diff --git a/ResourceBar.gd b/ui/ResourceBar.gd similarity index 100% rename from ResourceBar.gd rename to ui/ResourceBar.gd diff --git a/ResourceBar.gd.uid b/ui/ResourceBar.gd.uid similarity index 100% rename from ResourceBar.gd.uid rename to ui/ResourceBar.gd.uid diff --git a/ResourceReadout.gd b/ui/ResourceReadout.gd similarity index 100% rename from ResourceReadout.gd rename to ui/ResourceReadout.gd diff --git a/ResourceReadout.gd.uid b/ui/ResourceReadout.gd.uid similarity index 100% rename from ResourceReadout.gd.uid rename to ui/ResourceReadout.gd.uid diff --git a/ResourceTransferList.gd b/ui/ResourceTransferList.gd similarity index 100% rename from ResourceTransferList.gd rename to ui/ResourceTransferList.gd diff --git a/ResourceTransferList.gd.uid b/ui/ResourceTransferList.gd.uid similarity index 100% rename from ResourceTransferList.gd.uid rename to ui/ResourceTransferList.gd.uid diff --git a/SkillTreeView.gd b/ui/SkillTreeView.gd similarity index 100% rename from SkillTreeView.gd rename to ui/SkillTreeView.gd diff --git a/SkillTreeView.gd.uid b/ui/SkillTreeView.gd.uid similarity index 100% rename from SkillTreeView.gd.uid rename to ui/SkillTreeView.gd.uid diff --git a/SpeedFader.gd b/ui/SpeedFader.gd similarity index 100% rename from SpeedFader.gd rename to ui/SpeedFader.gd diff --git a/SpeedFader.gd.uid b/ui/SpeedFader.gd.uid similarity index 100% rename from SpeedFader.gd.uid rename to ui/SpeedFader.gd.uid diff --git a/TouchJoystick.gd b/ui/TouchJoystick.gd similarity index 100% rename from TouchJoystick.gd rename to ui/TouchJoystick.gd diff --git a/TouchJoystick.gd.uid b/ui/TouchJoystick.gd.uid similarity index 100% rename from TouchJoystick.gd.uid rename to ui/TouchJoystick.gd.uid diff --git a/CarrierCapacityUpgrade.tres b/vessels/CarrierCapacityUpgrade.tres similarity index 80% rename from CarrierCapacityUpgrade.tres rename to vessels/CarrierCapacityUpgrade.tres index 99c01ac..b7bc0e8 100644 --- a/CarrierCapacityUpgrade.tres +++ b/vessels/CarrierCapacityUpgrade.tres @@ -1,5 +1,5 @@ [gd_resource type="Resource" script_class="VesselUpgradeDefinition" load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselUpgradeDefinition.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselUpgradeDefinition.gd" id="1"] [resource] script = ExtResource("1") upgrade_id = "car_capacity" diff --git a/CarrierVesselDefinition.tres b/vessels/CarrierVesselDefinition.tres similarity index 79% rename from CarrierVesselDefinition.tres rename to vessels/CarrierVesselDefinition.tres index 1d193dc..ecd7991 100644 --- a/CarrierVesselDefinition.tres +++ b/vessels/CarrierVesselDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="VesselDefinition" load_steps=4 format=3] -[ext_resource type="Script" path="res://VesselDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://VesselCargoComponent.tscn" id="2"] -[ext_resource type="Resource" path="res://CarrierCapacityUpgrade.tres" id="3"] +[ext_resource type="Script" path="res://vessels/VesselDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://vessels/VesselCargoComponent.tscn" id="2"] +[ext_resource type="Resource" path="res://vessels/CarrierCapacityUpgrade.tres" id="3"] [resource] script = ExtResource("1") definition_id = "carrier" diff --git a/DistorderVesselDefinition.tres b/vessels/DistorderVesselDefinition.tres similarity index 87% rename from DistorderVesselDefinition.tres rename to vessels/DistorderVesselDefinition.tres index 0282f25..84834b0 100644 --- a/DistorderVesselDefinition.tres +++ b/vessels/DistorderVesselDefinition.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" script_class="VesselDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://VesselDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://VesselDistorderComponent.tscn" id="2"] +[ext_resource type="Script" path="res://vessels/VesselDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://vessels/VesselDistorderComponent.tscn" id="2"] [resource] script = ExtResource("1") definition_id = "distorder" diff --git a/Fleet.gd b/vessels/Fleet.gd similarity index 99% rename from Fleet.gd rename to vessels/Fleet.gd index fda2244..e4c64fb 100644 --- a/Fleet.gd +++ b/vessels/Fleet.gd @@ -20,7 +20,7 @@ extends Node2D @export var ship_glow_color: Color = Color(0.25, 0.85, 1.0) @export var ship_core_color: Color = Color(1.0, 1.0, 1.0) -var ship_scene: PackedScene = preload("res://Ship.tscn") +var ship_scene: PackedScene = preload("res://vessels/Ship.tscn") var ships: Array = [] var formation_offsets: Array = [] diff --git a/Fleet.gd.uid b/vessels/Fleet.gd.uid similarity index 100% rename from Fleet.gd.uid rename to vessels/Fleet.gd.uid diff --git a/GasBomberVesselDefinition.tres b/vessels/GasBomberVesselDefinition.tres similarity index 85% rename from GasBomberVesselDefinition.tres rename to vessels/GasBomberVesselDefinition.tres index 04ad771..d5f6c3f 100644 --- a/GasBomberVesselDefinition.tres +++ b/vessels/GasBomberVesselDefinition.tres @@ -1,7 +1,7 @@ [gd_resource type="Resource" script_class="VesselDefinition" load_steps=3 format=3] -[ext_resource type="Script" path="res://VesselDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://VesselGasBomberComponent.tscn" id="2"] +[ext_resource type="Script" path="res://vessels/VesselDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://vessels/VesselGasBomberComponent.tscn" id="2"] [resource] script = ExtResource("1") diff --git a/InterceptorDamageUpgrade.tres b/vessels/InterceptorDamageUpgrade.tres similarity index 79% rename from InterceptorDamageUpgrade.tres rename to vessels/InterceptorDamageUpgrade.tres index a0845fc..1296eca 100644 --- a/InterceptorDamageUpgrade.tres +++ b/vessels/InterceptorDamageUpgrade.tres @@ -1,5 +1,5 @@ [gd_resource type="Resource" script_class="VesselUpgradeDefinition" load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselUpgradeDefinition.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselUpgradeDefinition.gd" id="1"] [resource] script = ExtResource("1") upgrade_id = "int_damage" diff --git a/InterceptorRangeUpgrade.tres b/vessels/InterceptorRangeUpgrade.tres similarity index 79% rename from InterceptorRangeUpgrade.tres rename to vessels/InterceptorRangeUpgrade.tres index b986ba0..c710200 100644 --- a/InterceptorRangeUpgrade.tres +++ b/vessels/InterceptorRangeUpgrade.tres @@ -1,5 +1,5 @@ [gd_resource type="Resource" script_class="VesselUpgradeDefinition" load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselUpgradeDefinition.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselUpgradeDefinition.gd" id="1"] [resource] script = ExtResource("1") upgrade_id = "int_range" diff --git a/InterceptorRateUpgrade.tres b/vessels/InterceptorRateUpgrade.tres similarity index 80% rename from InterceptorRateUpgrade.tres rename to vessels/InterceptorRateUpgrade.tres index 57dabe6..8cfb161 100644 --- a/InterceptorRateUpgrade.tres +++ b/vessels/InterceptorRateUpgrade.tres @@ -1,5 +1,5 @@ [gd_resource type="Resource" script_class="VesselUpgradeDefinition" load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselUpgradeDefinition.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselUpgradeDefinition.gd" id="1"] [resource] script = ExtResource("1") upgrade_id = "int_rate" diff --git a/InterceptorVesselDefinition.tres b/vessels/InterceptorVesselDefinition.tres similarity index 58% rename from InterceptorVesselDefinition.tres rename to vessels/InterceptorVesselDefinition.tres index cac2700..bb05f7d 100644 --- a/InterceptorVesselDefinition.tres +++ b/vessels/InterceptorVesselDefinition.tres @@ -1,10 +1,10 @@ [gd_resource type="Resource" script_class="VesselDefinition" load_steps=7 format=3] -[ext_resource type="Script" path="res://VesselDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://VesselWeaponComponent.tscn" id="2"] -[ext_resource type="Resource" path="res://InterceptorDamageUpgrade.tres" id="3"] -[ext_resource type="Resource" path="res://InterceptorRateUpgrade.tres" id="4"] -[ext_resource type="Resource" path="res://InterceptorRangeUpgrade.tres" id="5"] -[ext_resource type="PackedScene" path="res://VesselCargoComponent.tscn" id="7"] +[ext_resource type="Script" path="res://vessels/VesselDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://vessels/VesselWeaponComponent.tscn" id="2"] +[ext_resource type="Resource" path="res://vessels/InterceptorDamageUpgrade.tres" id="3"] +[ext_resource type="Resource" path="res://vessels/InterceptorRateUpgrade.tres" id="4"] +[ext_resource type="Resource" path="res://vessels/InterceptorRangeUpgrade.tres" id="5"] +[ext_resource type="PackedScene" path="res://vessels/VesselCargoComponent.tscn" id="7"] [resource] script = ExtResource("1") definition_id = "interceptor" diff --git a/LaserCooldownUpgrade.tres b/vessels/LaserCooldownUpgrade.tres similarity index 80% rename from LaserCooldownUpgrade.tres rename to vessels/LaserCooldownUpgrade.tres index b89ee4a..8dc543b 100644 --- a/LaserCooldownUpgrade.tres +++ b/vessels/LaserCooldownUpgrade.tres @@ -1,5 +1,5 @@ [gd_resource type="Resource" script_class="VesselUpgradeDefinition" load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselUpgradeDefinition.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselUpgradeDefinition.gd" id="1"] [resource] script = ExtResource("1") upgrade_id = "lsr_cooldown" diff --git a/LaserDamageUpgrade.tres b/vessels/LaserDamageUpgrade.tres similarity index 79% rename from LaserDamageUpgrade.tres rename to vessels/LaserDamageUpgrade.tres index e9c4c97..37e0d22 100644 --- a/LaserDamageUpgrade.tres +++ b/vessels/LaserDamageUpgrade.tres @@ -1,5 +1,5 @@ [gd_resource type="Resource" script_class="VesselUpgradeDefinition" load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselUpgradeDefinition.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselUpgradeDefinition.gd" id="1"] [resource] script = ExtResource("1") upgrade_id = "lsr_damage" diff --git a/LaserRangeUpgrade.tres b/vessels/LaserRangeUpgrade.tres similarity index 79% rename from LaserRangeUpgrade.tres rename to vessels/LaserRangeUpgrade.tres index 755e585..061a994 100644 --- a/LaserRangeUpgrade.tres +++ b/vessels/LaserRangeUpgrade.tres @@ -1,5 +1,5 @@ [gd_resource type="Resource" script_class="VesselUpgradeDefinition" load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselUpgradeDefinition.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselUpgradeDefinition.gd" id="1"] [resource] script = ExtResource("1") upgrade_id = "lsr_range" diff --git a/LaserVesselDefinition.tres b/vessels/LaserVesselDefinition.tres similarity index 73% rename from LaserVesselDefinition.tres rename to vessels/LaserVesselDefinition.tres index 20dbf62..598a841 100644 --- a/LaserVesselDefinition.tres +++ b/vessels/LaserVesselDefinition.tres @@ -1,9 +1,9 @@ [gd_resource type="Resource" script_class="VesselDefinition" load_steps=6 format=3] -[ext_resource type="Script" path="res://VesselDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://VesselLaserComponent.tscn" id="2"] -[ext_resource type="Resource" path="res://LaserDamageUpgrade.tres" id="3"] -[ext_resource type="Resource" path="res://LaserRangeUpgrade.tres" id="4"] -[ext_resource type="Resource" path="res://LaserCooldownUpgrade.tres" id="5"] +[ext_resource type="Script" path="res://vessels/VesselDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://vessels/VesselLaserComponent.tscn" id="2"] +[ext_resource type="Resource" path="res://vessels/LaserDamageUpgrade.tres" id="3"] +[ext_resource type="Resource" path="res://vessels/LaserRangeUpgrade.tres" id="4"] +[ext_resource type="Resource" path="res://vessels/LaserCooldownUpgrade.tres" id="5"] [resource] script = ExtResource("1") definition_id = "laser" diff --git a/Projectile.gd b/vessels/Projectile.gd similarity index 100% rename from Projectile.gd rename to vessels/Projectile.gd diff --git a/Projectile.gd.uid b/vessels/Projectile.gd.uid similarity index 100% rename from Projectile.gd.uid rename to vessels/Projectile.gd.uid diff --git a/Projectile.tscn b/vessels/Projectile.tscn similarity index 77% rename from Projectile.tscn rename to vessels/Projectile.tscn index bd199c3..639546d 100644 --- a/Projectile.tscn +++ b/vessels/Projectile.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3] -[ext_resource type="Script" path="res://Projectile.gd" id="1"] +[ext_resource type="Script" path="res://vessels/Projectile.gd" id="1"] [sub_resource type="CircleShape2D" id="1"] radius = 4.0 diff --git a/ShieldHitsUpgrade.tres b/vessels/ShieldHitsUpgrade.tres similarity index 80% rename from ShieldHitsUpgrade.tres rename to vessels/ShieldHitsUpgrade.tres index bbbd180..c9a8ef6 100644 --- a/ShieldHitsUpgrade.tres +++ b/vessels/ShieldHitsUpgrade.tres @@ -1,5 +1,5 @@ [gd_resource type="Resource" script_class="VesselUpgradeDefinition" load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselUpgradeDefinition.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselUpgradeDefinition.gd" id="1"] [resource] script = ExtResource("1") upgrade_id = "shd_hits" diff --git a/ShieldRechargeUpgrade.tres b/vessels/ShieldRechargeUpgrade.tres similarity index 80% rename from ShieldRechargeUpgrade.tres rename to vessels/ShieldRechargeUpgrade.tres index 756523c..2f267e0 100644 --- a/ShieldRechargeUpgrade.tres +++ b/vessels/ShieldRechargeUpgrade.tres @@ -1,5 +1,5 @@ [gd_resource type="Resource" script_class="VesselUpgradeDefinition" load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselUpgradeDefinition.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselUpgradeDefinition.gd" id="1"] [resource] script = ExtResource("1") upgrade_id = "shd_recharge" diff --git a/ShieldVesselDefinition.tres b/vessels/ShieldVesselDefinition.tres similarity index 76% rename from ShieldVesselDefinition.tres rename to vessels/ShieldVesselDefinition.tres index 0b811b0..b15ba4a 100644 --- a/ShieldVesselDefinition.tres +++ b/vessels/ShieldVesselDefinition.tres @@ -1,8 +1,8 @@ [gd_resource type="Resource" script_class="VesselDefinition" load_steps=5 format=3] -[ext_resource type="Script" path="res://VesselDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://VesselShieldComponent.tscn" id="3"] -[ext_resource type="Resource" path="res://ShieldHitsUpgrade.tres" id="4"] -[ext_resource type="Resource" path="res://ShieldRechargeUpgrade.tres" id="5"] +[ext_resource type="Script" path="res://vessels/VesselDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://vessels/VesselShieldComponent.tscn" id="3"] +[ext_resource type="Resource" path="res://vessels/ShieldHitsUpgrade.tres" id="4"] +[ext_resource type="Resource" path="res://vessels/ShieldRechargeUpgrade.tres" id="5"] [resource] script = ExtResource("1") definition_id = "shield" diff --git a/Ship.gd b/vessels/Ship.gd similarity index 99% rename from Ship.gd rename to vessels/Ship.gd index 0ca2ca7..6a15ac8 100644 --- a/Ship.gd +++ b/vessels/Ship.gd @@ -2,7 +2,7 @@ extends Area2D signal destroyed -const VESSEL_DEFINITIONS = preload("res://VesselDefinitions.gd") +const VESSEL_DEFINITIONS = preload("res://vessels/VesselDefinitions.gd") @export var max_speed: float = 460.0 @export var acceleration: float = 450.0 diff --git a/Ship.gd.uid b/vessels/Ship.gd.uid similarity index 100% rename from Ship.gd.uid rename to vessels/Ship.gd.uid diff --git a/Ship.tscn b/vessels/Ship.tscn similarity index 78% rename from Ship.tscn rename to vessels/Ship.tscn index 85e1601..886ee21 100644 --- a/Ship.tscn +++ b/vessels/Ship.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3] -[ext_resource type="Script" path="res://Ship.gd" id="1"] +[ext_resource type="Script" path="res://vessels/Ship.gd" id="1"] [sub_resource type="CircleShape2D" id="1"] radius = 16.0 diff --git a/TransportCapacityUpgrade.tres b/vessels/TransportCapacityUpgrade.tres similarity index 80% rename from TransportCapacityUpgrade.tres rename to vessels/TransportCapacityUpgrade.tres index 87b331c..37089e6 100644 --- a/TransportCapacityUpgrade.tres +++ b/vessels/TransportCapacityUpgrade.tres @@ -1,5 +1,5 @@ [gd_resource type="Resource" script_class="VesselUpgradeDefinition" load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselUpgradeDefinition.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselUpgradeDefinition.gd" id="1"] [resource] script = ExtResource("1") upgrade_id = "trn_capacity" diff --git a/TransportSpeedUpgrade.tres b/vessels/TransportSpeedUpgrade.tres similarity index 80% rename from TransportSpeedUpgrade.tres rename to vessels/TransportSpeedUpgrade.tres index 06c3f42..ef1c9c2 100644 --- a/TransportSpeedUpgrade.tres +++ b/vessels/TransportSpeedUpgrade.tres @@ -1,5 +1,5 @@ [gd_resource type="Resource" script_class="VesselUpgradeDefinition" load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselUpgradeDefinition.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselUpgradeDefinition.gd" id="1"] [resource] script = ExtResource("1") upgrade_id = "trn_speed" diff --git a/TransporterVesselDefinition.tres b/vessels/TransporterVesselDefinition.tres similarity index 60% rename from TransporterVesselDefinition.tres rename to vessels/TransporterVesselDefinition.tres index ef0030b..422dbfe 100644 --- a/TransporterVesselDefinition.tres +++ b/vessels/TransporterVesselDefinition.tres @@ -1,9 +1,9 @@ [gd_resource type="Resource" script_class="VesselDefinition" load_steps=6 format=3] -[ext_resource type="Script" path="res://VesselDefinition.gd" id="1"] -[ext_resource type="PackedScene" path="res://VesselCargoComponent.tscn" id="2"] -[ext_resource type="PackedScene" path="res://VesselTransportComponent.tscn" id="3"] -[ext_resource type="Resource" path="res://TransportCapacityUpgrade.tres" id="4"] -[ext_resource type="Resource" path="res://TransportSpeedUpgrade.tres" id="5"] +[ext_resource type="Script" path="res://vessels/VesselDefinition.gd" id="1"] +[ext_resource type="PackedScene" path="res://vessels/VesselCargoComponent.tscn" id="2"] +[ext_resource type="PackedScene" path="res://vessels/VesselTransportComponent.tscn" id="3"] +[ext_resource type="Resource" path="res://vessels/TransportCapacityUpgrade.tres" id="4"] +[ext_resource type="Resource" path="res://vessels/TransportSpeedUpgrade.tres" id="5"] [resource] script = ExtResource("1") definition_id = "transporter" diff --git a/VesselCargoComponent.gd b/vessels/VesselCargoComponent.gd similarity index 100% rename from VesselCargoComponent.gd rename to vessels/VesselCargoComponent.gd diff --git a/VesselCargoComponent.gd.uid b/vessels/VesselCargoComponent.gd.uid similarity index 100% rename from VesselCargoComponent.gd.uid rename to vessels/VesselCargoComponent.gd.uid diff --git a/VesselCargoComponent.tscn b/vessels/VesselCargoComponent.tscn similarity index 55% rename from VesselCargoComponent.tscn rename to vessels/VesselCargoComponent.tscn index 34eafa6..b6f6702 100644 --- a/VesselCargoComponent.tscn +++ b/vessels/VesselCargoComponent.tscn @@ -1,4 +1,4 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselCargoComponent.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselCargoComponent.gd" id="1"] [node name="CargoComponent" type="Node"] script = ExtResource("1") diff --git a/VesselCooldownFillComponent.gd b/vessels/VesselCooldownFillComponent.gd similarity index 100% rename from VesselCooldownFillComponent.gd rename to vessels/VesselCooldownFillComponent.gd diff --git a/VesselCooldownFillComponent.gd.uid b/vessels/VesselCooldownFillComponent.gd.uid similarity index 100% rename from VesselCooldownFillComponent.gd.uid rename to vessels/VesselCooldownFillComponent.gd.uid diff --git a/VesselDefinition.gd b/vessels/VesselDefinition.gd similarity index 100% rename from VesselDefinition.gd rename to vessels/VesselDefinition.gd diff --git a/VesselDefinition.gd.uid b/vessels/VesselDefinition.gd.uid similarity index 100% rename from VesselDefinition.gd.uid rename to vessels/VesselDefinition.gd.uid diff --git a/VesselDefinitions.gd b/vessels/VesselDefinitions.gd similarity index 61% rename from VesselDefinitions.gd rename to vessels/VesselDefinitions.gd index 33ca763..dbc00a8 100644 --- a/VesselDefinitions.gd +++ b/vessels/VesselDefinitions.gd @@ -3,13 +3,13 @@ extends RefCounted const ORDER: PackedStringArray = ["interceptor", "shield", "gas_bomber", "transporter", "carrier", "laser", "distorder"] const DEFINITIONS: Dictionary = { - "interceptor": preload("res://InterceptorVesselDefinition.tres"), - "shield": preload("res://ShieldVesselDefinition.tres"), - "gas_bomber": preload("res://GasBomberVesselDefinition.tres"), - "transporter": preload("res://TransporterVesselDefinition.tres"), - "carrier": preload("res://CarrierVesselDefinition.tres"), - "laser": preload("res://LaserVesselDefinition.tres"), - "distorder": preload("res://DistorderVesselDefinition.tres"), + "interceptor": preload("res://vessels/InterceptorVesselDefinition.tres"), + "shield": preload("res://vessels/ShieldVesselDefinition.tres"), + "gas_bomber": preload("res://vessels/GasBomberVesselDefinition.tres"), + "transporter": preload("res://vessels/TransporterVesselDefinition.tres"), + "carrier": preload("res://vessels/CarrierVesselDefinition.tres"), + "laser": preload("res://vessels/LaserVesselDefinition.tres"), + "distorder": preload("res://vessels/DistorderVesselDefinition.tres"), } static func get_definition(definition_id: String) -> Resource: diff --git a/VesselDefinitions.gd.uid b/vessels/VesselDefinitions.gd.uid similarity index 100% rename from VesselDefinitions.gd.uid rename to vessels/VesselDefinitions.gd.uid diff --git a/VesselDistorderComponent.gd b/vessels/VesselDistorderComponent.gd similarity index 100% rename from VesselDistorderComponent.gd rename to vessels/VesselDistorderComponent.gd diff --git a/VesselDistorderComponent.gd.uid b/vessels/VesselDistorderComponent.gd.uid similarity index 100% rename from VesselDistorderComponent.gd.uid rename to vessels/VesselDistorderComponent.gd.uid diff --git a/VesselDistorderComponent.tscn b/vessels/VesselDistorderComponent.tscn similarity index 55% rename from VesselDistorderComponent.tscn rename to vessels/VesselDistorderComponent.tscn index 862f0d3..70586f5 100644 --- a/VesselDistorderComponent.tscn +++ b/vessels/VesselDistorderComponent.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselDistorderComponent.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselDistorderComponent.gd" id="1"] [node name="DistorderComponent" type="Node"] script = ExtResource("1") diff --git a/VesselGasBomberComponent.gd b/vessels/VesselGasBomberComponent.gd similarity index 87% rename from VesselGasBomberComponent.gd rename to vessels/VesselGasBomberComponent.gd index a109188..b46bc33 100644 --- a/VesselGasBomberComponent.gd +++ b/vessels/VesselGasBomberComponent.gd @@ -1,5 +1,5 @@ class_name VesselGasBomberComponent -extends "res://VesselCooldownFillComponent.gd" +extends "res://vessels/VesselCooldownFillComponent.gd" var capability_id := "gas_bomber" diff --git a/VesselGasBomberComponent.gd.uid b/vessels/VesselGasBomberComponent.gd.uid similarity index 100% rename from VesselGasBomberComponent.gd.uid rename to vessels/VesselGasBomberComponent.gd.uid diff --git a/VesselGasBomberComponent.tscn b/vessels/VesselGasBomberComponent.tscn similarity index 55% rename from VesselGasBomberComponent.tscn rename to vessels/VesselGasBomberComponent.tscn index 6eaa4ad..d86b5f9 100644 --- a/VesselGasBomberComponent.tscn +++ b/vessels/VesselGasBomberComponent.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselGasBomberComponent.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselGasBomberComponent.gd" id="1"] [node name="GasBomberComponent" type="Node2D"] script = ExtResource("1") diff --git a/VesselLaserComponent.gd b/vessels/VesselLaserComponent.gd similarity index 93% rename from VesselLaserComponent.gd rename to vessels/VesselLaserComponent.gd index a004277..278c32a 100644 --- a/VesselLaserComponent.gd +++ b/vessels/VesselLaserComponent.gd @@ -1,5 +1,5 @@ class_name VesselLaserComponent -extends "res://VesselCooldownFillComponent.gd" +extends "res://vessels/VesselCooldownFillComponent.gd" var capability_id := "laser" var damage: int = 2 diff --git a/VesselLaserComponent.gd.uid b/vessels/VesselLaserComponent.gd.uid similarity index 100% rename from VesselLaserComponent.gd.uid rename to vessels/VesselLaserComponent.gd.uid diff --git a/VesselLaserComponent.tscn b/vessels/VesselLaserComponent.tscn similarity index 56% rename from VesselLaserComponent.tscn rename to vessels/VesselLaserComponent.tscn index a7d44db..f950b03 100644 --- a/VesselLaserComponent.tscn +++ b/vessels/VesselLaserComponent.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselLaserComponent.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselLaserComponent.gd" id="1"] [node name="LaserComponent" type="Node2D"] script = ExtResource("1") diff --git a/VesselShieldComponent.gd b/vessels/VesselShieldComponent.gd similarity index 100% rename from VesselShieldComponent.gd rename to vessels/VesselShieldComponent.gd diff --git a/VesselShieldComponent.gd.uid b/vessels/VesselShieldComponent.gd.uid similarity index 100% rename from VesselShieldComponent.gd.uid rename to vessels/VesselShieldComponent.gd.uid diff --git a/VesselShieldComponent.tscn b/vessels/VesselShieldComponent.tscn similarity index 55% rename from VesselShieldComponent.tscn rename to vessels/VesselShieldComponent.tscn index 50ba89e..4083167 100644 --- a/VesselShieldComponent.tscn +++ b/vessels/VesselShieldComponent.tscn @@ -1,4 +1,4 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselShieldComponent.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselShieldComponent.gd" id="1"] [node name="ShieldComponent" type="Node"] script = ExtResource("1") diff --git a/VesselTransportComponent.gd b/vessels/VesselTransportComponent.gd similarity index 100% rename from VesselTransportComponent.gd rename to vessels/VesselTransportComponent.gd diff --git a/VesselTransportComponent.gd.uid b/vessels/VesselTransportComponent.gd.uid similarity index 100% rename from VesselTransportComponent.gd.uid rename to vessels/VesselTransportComponent.gd.uid diff --git a/VesselTransportComponent.tscn b/vessels/VesselTransportComponent.tscn similarity index 55% rename from VesselTransportComponent.tscn rename to vessels/VesselTransportComponent.tscn index a16d4e9..304ef48 100644 --- a/VesselTransportComponent.tscn +++ b/vessels/VesselTransportComponent.tscn @@ -1,4 +1,4 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselTransportComponent.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselTransportComponent.gd" id="1"] [node name="TransportComponent" type="Node"] script = ExtResource("1") diff --git a/VesselUpgradeDefinition.gd b/vessels/VesselUpgradeDefinition.gd similarity index 100% rename from VesselUpgradeDefinition.gd rename to vessels/VesselUpgradeDefinition.gd diff --git a/VesselUpgradeDefinition.gd.uid b/vessels/VesselUpgradeDefinition.gd.uid similarity index 100% rename from VesselUpgradeDefinition.gd.uid rename to vessels/VesselUpgradeDefinition.gd.uid diff --git a/VesselWeaponComponent.gd b/vessels/VesselWeaponComponent.gd similarity index 96% rename from VesselWeaponComponent.gd rename to vessels/VesselWeaponComponent.gd index 1ba49e9..f81ae71 100644 --- a/VesselWeaponComponent.gd +++ b/vessels/VesselWeaponComponent.gd @@ -20,7 +20,7 @@ var fire_cooldown: float var projectile_damage: int var fire_timer: float = 0.0 var fire_direction: Vector2 = Vector2.ZERO -var projectile_scene: PackedScene = preload("res://Projectile.tscn") +var projectile_scene: PackedScene = preload("res://vessels/Projectile.tscn") func apply_stats() -> void: diff --git a/VesselWeaponComponent.gd.uid b/vessels/VesselWeaponComponent.gd.uid similarity index 100% rename from VesselWeaponComponent.gd.uid rename to vessels/VesselWeaponComponent.gd.uid diff --git a/VesselWeaponComponent.tscn b/vessels/VesselWeaponComponent.tscn similarity index 55% rename from VesselWeaponComponent.tscn rename to vessels/VesselWeaponComponent.tscn index b3bd611..06f6cb5 100644 --- a/VesselWeaponComponent.tscn +++ b/vessels/VesselWeaponComponent.tscn @@ -1,4 +1,4 @@ [gd_scene load_steps=2 format=3] -[ext_resource type="Script" path="res://VesselWeaponComponent.gd" id="1"] +[ext_resource type="Script" path="res://vessels/VesselWeaponComponent.gd" id="1"] [node name="WeaponComponent" type="Node"] script = ExtResource("1") diff --git a/AsteroidExplosionVFX.gd b/vfx/AsteroidExplosionVFX.gd similarity index 100% rename from AsteroidExplosionVFX.gd rename to vfx/AsteroidExplosionVFX.gd diff --git a/AsteroidExplosionVFX.gd.uid b/vfx/AsteroidExplosionVFX.gd.uid similarity index 100% rename from AsteroidExplosionVFX.gd.uid rename to vfx/AsteroidExplosionVFX.gd.uid diff --git a/EnemyExplosionVFX.gd b/vfx/EnemyExplosionVFX.gd similarity index 100% rename from EnemyExplosionVFX.gd rename to vfx/EnemyExplosionVFX.gd diff --git a/EnemyExplosionVFX.gd.uid b/vfx/EnemyExplosionVFX.gd.uid similarity index 100% rename from EnemyExplosionVFX.gd.uid rename to vfx/EnemyExplosionVFX.gd.uid diff --git a/ExplosionParticle.gd b/vfx/ExplosionParticle.gd similarity index 100% rename from ExplosionParticle.gd rename to vfx/ExplosionParticle.gd diff --git a/ExplosionParticle.gd.uid b/vfx/ExplosionParticle.gd.uid similarity index 100% rename from ExplosionParticle.gd.uid rename to vfx/ExplosionParticle.gd.uid diff --git a/ExplosionVFXBase.gd b/vfx/ExplosionVFXBase.gd similarity index 100% rename from ExplosionVFXBase.gd rename to vfx/ExplosionVFXBase.gd diff --git a/ExplosionVFXBase.gd.uid b/vfx/ExplosionVFXBase.gd.uid similarity index 100% rename from ExplosionVFXBase.gd.uid rename to vfx/ExplosionVFXBase.gd.uid diff --git a/LightBurstVFX.gd b/vfx/LightBurstVFX.gd similarity index 100% rename from LightBurstVFX.gd rename to vfx/LightBurstVFX.gd diff --git a/LightBurstVFX.gd.uid b/vfx/LightBurstVFX.gd.uid similarity index 100% rename from LightBurstVFX.gd.uid rename to vfx/LightBurstVFX.gd.uid diff --git a/NeonDraw.gd b/vfx/NeonDraw.gd similarity index 100% rename from NeonDraw.gd rename to vfx/NeonDraw.gd diff --git a/NeonDraw.gd.uid b/vfx/NeonDraw.gd.uid similarity index 100% rename from NeonDraw.gd.uid rename to vfx/NeonDraw.gd.uid diff --git a/NeonPiece.gd b/vfx/NeonPiece.gd similarity index 100% rename from NeonPiece.gd rename to vfx/NeonPiece.gd diff --git a/NeonPiece.gd.uid b/vfx/NeonPiece.gd.uid similarity index 100% rename from NeonPiece.gd.uid rename to vfx/NeonPiece.gd.uid diff --git a/ResourcePickupVFX.gd b/vfx/ResourcePickupVFX.gd similarity index 96% rename from ResourcePickupVFX.gd rename to vfx/ResourcePickupVFX.gd index d84cb0c..853ec26 100644 --- a/ResourcePickupVFX.gd +++ b/vfx/ResourcePickupVFX.gd @@ -13,14 +13,14 @@ extends Node2D # gets a correct pickup mark with no work here - and can never end up with # one mark in the HUD and a different one in the world. -const RESOURCE_DEFINITIONS = preload("res://ResourceDefinitions.gd") +const RESOURCE_DEFINITIONS = preload("res://resources/ResourceDefinitions.gd") # Deliberately NO class_name, and the constructor below loads this file by # path rather than naming the class. A global class-name identifier - even a # script's own, inside its own static function - needs the class cache already # warm, and it is not when this is reached indirectly through a preview scene # loading Main.tscn. That failed to compile outright, taking Rock and the gas # vents down with it. Callers preload the path too; see Rock.gd. -const SELF_PATH: String = "res://ResourcePickupVFX.gd" +const SELF_PATH: String = "res://vfx/ResourcePickupVFX.gd" const RISE_DISTANCE: float = 46.0 const DURATION: float = 0.85 diff --git a/ResourcePickupVFX.gd.uid b/vfx/ResourcePickupVFX.gd.uid similarity index 100% rename from ResourcePickupVFX.gd.uid rename to vfx/ResourcePickupVFX.gd.uid diff --git a/ShipExplosionVFX.gd b/vfx/ShipExplosionVFX.gd similarity index 100% rename from ShipExplosionVFX.gd rename to vfx/ShipExplosionVFX.gd diff --git a/ShipExplosionVFX.gd.uid b/vfx/ShipExplosionVFX.gd.uid similarity index 100% rename from ShipExplosionVFX.gd.uid rename to vfx/ShipExplosionVFX.gd.uid diff --git a/Asteroid.gd b/world/Asteroid.gd similarity index 98% rename from Asteroid.gd rename to world/Asteroid.gd index 1042622..b35df34 100644 --- a/Asteroid.gd +++ b/world/Asteroid.gd @@ -12,7 +12,7 @@ extends Area2D # being mined, and you have just lost a ship (or a shield charge) for it. # Without that split, a shield vessel could farm asteroids by ramming. -const ROCK_SCENE: PackedScene = preload("res://Rock.tscn") +const ROCK_SCENE: PackedScene = preload("res://surface/Rock.tscn") # Shots needed to crack one open. Low enough that a single vessel clears one # in a couple of bursts, high enough that a stray shot in passing does not. const HIT_POINTS: int = 2 diff --git a/Asteroid.gd.uid b/world/Asteroid.gd.uid similarity index 100% rename from Asteroid.gd.uid rename to world/Asteroid.gd.uid diff --git a/Asteroid.tscn b/world/Asteroid.tscn similarity index 78% rename from Asteroid.tscn rename to world/Asteroid.tscn index c26e2f2..6b01b37 100644 --- a/Asteroid.tscn +++ b/world/Asteroid.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3] -[ext_resource type="Script" path="res://Asteroid.gd" id="1"] +[ext_resource type="Script" path="res://world/Asteroid.gd" id="1"] [sub_resource type="CircleShape2D" id="1"] radius = 18.0 diff --git a/AsteroidField.gd b/world/AsteroidField.gd similarity index 98% rename from AsteroidField.gd rename to world/AsteroidField.gd index 5b10d7b..e7a938a 100644 --- a/AsteroidField.gd +++ b/world/AsteroidField.gd @@ -18,7 +18,7 @@ extends Node2D @onready var fleet: Node2D = get_node("../Fleet") -var asteroid_scene: PackedScene = preload("res://Asteroid.tscn") +var asteroid_scene: PackedScene = preload("res://world/Asteroid.tscn") var populated_chunks: Dictionary = {} var timer: float = 0.0 diff --git a/AsteroidField.gd.uid b/world/AsteroidField.gd.uid similarity index 100% rename from AsteroidField.gd.uid rename to world/AsteroidField.gd.uid diff --git a/ExplorationTracker.gd b/world/ExplorationTracker.gd similarity index 100% rename from ExplorationTracker.gd rename to world/ExplorationTracker.gd diff --git a/ExplorationTracker.gd.uid b/world/ExplorationTracker.gd.uid similarity index 100% rename from ExplorationTracker.gd.uid rename to world/ExplorationTracker.gd.uid diff --git a/Main.tscn b/world/Main.tscn similarity index 95% rename from Main.tscn rename to world/Main.tscn index 7e6a459..301a200 100644 --- a/Main.tscn +++ b/world/Main.tscn @@ -1,34 +1,34 @@ [gd_scene load_steps=31 format=3] -[ext_resource type="Script" path="res://Starfield.gd" id="1"] -[ext_resource type="Script" path="res://Fleet.gd" id="2"] -[ext_resource type="Script" path="res://GameController.gd" id="3"] -[ext_resource type="Script" path="res://EnemySpawner.gd" id="4"] -[ext_resource type="Shader" path="res://starfield.gdshader" id="5"] -[ext_resource type="Script" path="res://ExplorationTracker.gd" id="6"] -[ext_resource type="Script" path="res://AsteroidField.gd" id="7"] -[ext_resource type="Script" path="res://WorldMap.gd" id="8"] -[ext_resource type="Script" path="res://WorldMapContent.gd" id="9"] -[ext_resource type="Script" path="res://IconButton.gd" id="10"] -[ext_resource type="Script" path="res://PlanetField.gd" id="11"] -[ext_resource type="Script" path="res://PlanetAtmosphereController.gd" id="12"] -[ext_resource type="Script" path="res://TouchJoystick.gd" id="13"] -[ext_resource type="Script" path="res://BuildingField.gd" id="14"] -[ext_resource type="Script" path="res://BuildController.gd" id="15"] -[ext_resource type="Script" path="res://ResourceReadout.gd" id="16"] -[ext_resource type="Script" path="res://FormationEditor.gd" id="17"] -[ext_resource type="Script" path="res://NeonNumber.gd" id="19"] -[ext_resource type="Script" path="res://NeonPanel.gd" id="20"] -[ext_resource type="Script" path="res://SkillTreeView.gd" id="21"] -[ext_resource type="Script" path="res://TransporterField.gd" id="23"] -[ext_resource type="Script" path="res://ResourceBar.gd" id="24"] -[ext_resource type="Script" path="res://VesselDeliveryField.gd" id="26"] -[ext_resource type="Script" path="res://ResourceTransferList.gd" id="27"] -[ext_resource type="Script" path="res://MouseCombatController.gd" id="mouse_ctrl"] -[ext_resource type="Script" path="res://FireStickController.gd" id="fire_ctrl"] -[ext_resource type="Script" path="res://GasBombController.gd" id="29"] -[ext_resource type="Script" path="res://LaserController.gd" id="30"] -[ext_resource type="Script" path="res://SpeedFader.gd" id="31"] +[ext_resource type="Script" path="res://world/Starfield.gd" id="1"] +[ext_resource type="Script" path="res://vessels/Fleet.gd" id="2"] +[ext_resource type="Script" path="res://controllers/GameController.gd" id="3"] +[ext_resource type="Script" path="res://enemies/EnemySpawner.gd" id="4"] +[ext_resource type="Shader" path="res://shaders/starfield.gdshader" id="5"] +[ext_resource type="Script" path="res://world/ExplorationTracker.gd" id="6"] +[ext_resource type="Script" path="res://world/AsteroidField.gd" id="7"] +[ext_resource type="Script" path="res://world/WorldMap.gd" id="8"] +[ext_resource type="Script" path="res://world/WorldMapContent.gd" id="9"] +[ext_resource type="Script" path="res://ui/IconButton.gd" id="10"] +[ext_resource type="Script" path="res://planets/PlanetField.gd" id="11"] +[ext_resource type="Script" path="res://planets/PlanetAtmosphereController.gd" id="12"] +[ext_resource type="Script" path="res://ui/TouchJoystick.gd" id="13"] +[ext_resource type="Script" path="res://buildings/BuildingField.gd" id="14"] +[ext_resource type="Script" path="res://controllers/BuildController.gd" id="15"] +[ext_resource type="Script" path="res://ui/ResourceReadout.gd" id="16"] +[ext_resource type="Script" path="res://ui/FormationEditor.gd" id="17"] +[ext_resource type="Script" path="res://ui/NeonNumber.gd" id="19"] +[ext_resource type="Script" path="res://ui/NeonPanel.gd" id="20"] +[ext_resource type="Script" path="res://ui/SkillTreeView.gd" id="21"] +[ext_resource type="Script" path="res://logistics/TransporterField.gd" id="23"] +[ext_resource type="Script" path="res://ui/ResourceBar.gd" id="24"] +[ext_resource type="Script" path="res://logistics/VesselDeliveryField.gd" id="26"] +[ext_resource type="Script" path="res://ui/ResourceTransferList.gd" id="27"] +[ext_resource type="Script" path="res://controllers/MouseCombatController.gd" id="mouse_ctrl"] +[ext_resource type="Script" path="res://controllers/FireStickController.gd" id="fire_ctrl"] +[ext_resource type="Script" path="res://controllers/GasBombController.gd" id="29"] +[ext_resource type="Script" path="res://controllers/LaserController.gd" id="30"] +[ext_resource type="Script" path="res://ui/SpeedFader.gd" id="31"] [sub_resource type="ShaderMaterial" id="1"] shader = ExtResource("5") diff --git a/Starfield.gd b/world/Starfield.gd similarity index 100% rename from Starfield.gd rename to world/Starfield.gd diff --git a/Starfield.gd.uid b/world/Starfield.gd.uid similarity index 100% rename from Starfield.gd.uid rename to world/Starfield.gd.uid diff --git a/WorldGen.gd b/world/WorldGen.gd similarity index 99% rename from WorldGen.gd rename to world/WorldGen.gd index ba56670..1feb86f 100644 --- a/WorldGen.gd +++ b/world/WorldGen.gd @@ -1,7 +1,7 @@ class_name WorldGen extends RefCounted -const PLANET_DEFINITIONS = preload("res://PlanetDefinitions.gd") +const PLANET_DEFINITIONS = preload("res://planets/PlanetDefinitions.gd") # Deterministic procedural world generation: the world is divided into # square chunks, and each chunk's biome is derived from a seeded diff --git a/WorldGen.gd.uid b/world/WorldGen.gd.uid similarity index 100% rename from WorldGen.gd.uid rename to world/WorldGen.gd.uid diff --git a/WorldMap.gd b/world/WorldMap.gd similarity index 100% rename from WorldMap.gd rename to world/WorldMap.gd diff --git a/WorldMap.gd.uid b/world/WorldMap.gd.uid similarity index 100% rename from WorldMap.gd.uid rename to world/WorldMap.gd.uid diff --git a/WorldMapContent.gd b/world/WorldMapContent.gd similarity index 96% rename from WorldMapContent.gd rename to world/WorldMapContent.gd index 9577163..a3020f2 100644 --- a/WorldMapContent.gd +++ b/world/WorldMapContent.gd @@ -1,7 +1,7 @@ extends Node2D -const PLANET_DEFINITIONS = preload("res://PlanetDefinitions.gd") -const BUILDING_DEFINITIONS = preload("res://BuildingDefinitions.gd") +const PLANET_DEFINITIONS = preload("res://planets/PlanetDefinitions.gd") +const BUILDING_DEFINITIONS = preload("res://buildings/BuildingDefinitions.gd") const WORLD_TO_LOCAL: float = 0.04 diff --git a/WorldMapContent.gd.uid b/world/WorldMapContent.gd.uid similarity index 100% rename from WorldMapContent.gd.uid rename to world/WorldMapContent.gd.uid