From d9b2d16db8e70e8d0f2b1c314f91b6f6b67e7521 Mon Sep 17 00:00:00 2001 From: Rendo Date: Thu, 25 Dec 2025 00:01:58 +0500 Subject: [PATCH] New beginnings --- Samera.tres | 2 +- {sprites => atlasses}/Uitto.png | Bin {sprites => atlasses}/Uitto.png.import | 6 +- {sprites => atlasses}/atlasses/Lorpeka.png | Bin .../atlasses/Lorpeka.png.import | 6 +- {sprites => atlasses}/atlasses/Popekko.png | Bin .../atlasses/Popekko.png.import | 6 +- generic/items/dbg_input1.tres | 15 --- generic/items/dbg_input2.tres | 15 --- generic/items/dbg_output.tres | 15 --- generic/platform.tres | 32 ------ generic/prototypes/belt.tres | 15 --- generic/prototypes/dbg_assembler.tres | 15 --- generic/prototypes/dbg_item_deposit.tres | 11 -- generic/prototypes/splitter.tres | 15 --- generic/prototypes/trash_can.tres | 15 --- generic/recipes/test_recipe.tres | 31 ------ lore/basic | 15 --- lore/geo | 13 --- lore/state | 9 -- lore/trade | 14 --- lore/trinet | 9 -- lore/ttech | 15 --- project.godot | 1 - scenes/2d_world.tscn | 81 -------------- scenes/debug_item.tscn | 12 -- scenes/gui/construction_button.tscn | 17 --- scenes/mounted_gun.tscn | 13 --- scenes/other_platform.tscn | 20 ---- scenes/player_platform.tscn | 21 ---- scenes/structures/conveyor.tscn | 99 ----------------- scenes/structures/debug_assembler.tscn | 56 ---------- scenes/structures/debug_item_deposit.tscn | 21 ---- scenes/structures/splitter.tscn | 69 ------------ scenes/structures/trash_can.tscn | 20 ---- scripts/autoloads/belt_manager.gd | 10 -- scripts/autoloads/belt_manager.gd.uid | 1 - scripts/autoloads/registry.gd | 2 - scripts/autoloads/registry.gd.uid | 1 - scripts/autoloads/runtime_player_data.gd | 12 -- scripts/autoloads/runtime_player_data.gd.uid | 1 - scripts/autoloads/ticker.gd | 16 --- scripts/autoloads/ticker.gd.uid | 1 - scripts/globals.gd | 13 --- scripts/globals.gd.uid | 1 - scripts/grid_controller.gd | 54 --------- scripts/grid_controller.gd.uid | 1 - scripts/gui/construction_button.gd | 13 --- scripts/gui/construction_button.gd.uid | 1 - scripts/gui/construction_buttons_generator.gd | 11 -- .../gui/construction_buttons_generator.gd.uid | 1 - scripts/gui/gui_event_bus.gd | 6 - scripts/gui/gui_event_bus.gd.uid | 1 - scripts/inventory/advanced_rotation.gd | 15 --- scripts/inventory/advanced_rotation.gd.uid | 1 - scripts/inventory/belt_inventory.gd | 101 ----------------- scripts/inventory/belt_inventory.gd.uid | 1 - scripts/inventory/in_out_inventory.gd | 77 ------------- scripts/inventory/in_out_inventory.gd.uid | 1 - scripts/inventory/inventory.gd | 41 ------- scripts/inventory/inventory.gd.uid | 1 - scripts/inventory/inventory_context.gd | 13 --- scripts/inventory/inventory_context.gd.uid | 1 - scripts/inventory/inventory_slot.gd | 105 ------------------ scripts/inventory/inventory_slot.gd.uid | 1 - scripts/inventory/splitter_inventory.gd | 79 ------------- scripts/inventory/splitter_inventory.gd.uid | 1 - scripts/inventory/stack.gd | 22 ---- scripts/inventory/stack.gd.uid | 1 - scripts/inventory/storage.gd | 93 ---------------- scripts/inventory/storage.gd.uid | 1 - scripts/inventory/void_inventory.gd | 32 ------ scripts/inventory/void_inventory.gd.uid | 1 - scripts/item.gd | 23 ---- scripts/item.gd.uid | 1 - scripts/placement_manager.gd | 75 ------------- scripts/placement_manager.gd.uid | 1 - scripts/placement_zone.gd | 61 ---------- scripts/placement_zone.gd.uid | 1 - scripts/prototype.gd | 11 -- scripts/prototype.gd.uid | 1 - scripts/recipe/comparable.gd | 7 -- scripts/recipe/comparable.gd.uid | 1 - scripts/recipe/item_tag.gd | 12 -- scripts/recipe/item_tag.gd.uid | 1 - scripts/recipe/recipe.gd | 6 - scripts/recipe/recipe.gd.uid | 1 - scripts/recipe/recipe_part.gd | 22 ---- scripts/recipe/recipe_part.gd.uid | 1 - scripts/structure.gd | 86 -------------- scripts/structure.gd.uid | 1 - scripts/structure_behaviour.gd | 12 -- scripts/structure_behaviour.gd.uid | 1 - scripts/structures/assembler.gd | 51 --------- scripts/structures/assembler.gd.uid | 1 - scripts/structures/belt.gd | 35 ------ scripts/structures/belt.gd.uid | 1 - scripts/structures/belt_animation_sync.gd | 4 - scripts/structures/belt_animation_sync.gd.uid | 1 - scripts/structures/debug_item_deposit.gd | 15 --- scripts/structures/debug_item_deposit.gd.uid | 1 - scripts/structures/directional_sprite.gd | 12 -- scripts/structures/directional_sprite.gd.uid | 1 - scripts/structures/splitter.gd | 47 -------- scripts/structures/splitter.gd.uid | 1 - 105 files changed, 10 insertions(+), 1923 deletions(-) rename {sprites => atlasses}/Uitto.png (100%) rename {sprites => atlasses}/Uitto.png.import (78%) rename {sprites => atlasses}/atlasses/Lorpeka.png (100%) rename {sprites => atlasses}/atlasses/Lorpeka.png.import (77%) rename {sprites => atlasses}/atlasses/Popekko.png (100%) rename {sprites => atlasses}/atlasses/Popekko.png.import (77%) delete mode 100644 generic/items/dbg_input1.tres delete mode 100644 generic/items/dbg_input2.tres delete mode 100644 generic/items/dbg_output.tres delete mode 100644 generic/platform.tres delete mode 100644 generic/prototypes/belt.tres delete mode 100644 generic/prototypes/dbg_assembler.tres delete mode 100644 generic/prototypes/dbg_item_deposit.tres delete mode 100644 generic/prototypes/splitter.tres delete mode 100644 generic/prototypes/trash_can.tres delete mode 100644 generic/recipes/test_recipe.tres delete mode 100644 lore/basic delete mode 100644 lore/geo delete mode 100644 lore/state delete mode 100644 lore/trade delete mode 100644 lore/trinet delete mode 100644 lore/ttech delete mode 100644 scenes/2d_world.tscn delete mode 100644 scenes/debug_item.tscn delete mode 100644 scenes/gui/construction_button.tscn delete mode 100644 scenes/mounted_gun.tscn delete mode 100644 scenes/other_platform.tscn delete mode 100644 scenes/player_platform.tscn delete mode 100644 scenes/structures/conveyor.tscn delete mode 100644 scenes/structures/debug_assembler.tscn delete mode 100644 scenes/structures/debug_item_deposit.tscn delete mode 100644 scenes/structures/splitter.tscn delete mode 100644 scenes/structures/trash_can.tscn delete mode 100644 scripts/autoloads/belt_manager.gd delete mode 100644 scripts/autoloads/belt_manager.gd.uid delete mode 100644 scripts/autoloads/registry.gd delete mode 100644 scripts/autoloads/registry.gd.uid delete mode 100644 scripts/autoloads/runtime_player_data.gd delete mode 100644 scripts/autoloads/runtime_player_data.gd.uid delete mode 100644 scripts/autoloads/ticker.gd delete mode 100644 scripts/autoloads/ticker.gd.uid delete mode 100644 scripts/globals.gd delete mode 100644 scripts/globals.gd.uid delete mode 100644 scripts/grid_controller.gd delete mode 100644 scripts/grid_controller.gd.uid delete mode 100644 scripts/gui/construction_button.gd delete mode 100644 scripts/gui/construction_button.gd.uid delete mode 100644 scripts/gui/construction_buttons_generator.gd delete mode 100644 scripts/gui/construction_buttons_generator.gd.uid delete mode 100644 scripts/gui/gui_event_bus.gd delete mode 100644 scripts/gui/gui_event_bus.gd.uid delete mode 100644 scripts/inventory/advanced_rotation.gd delete mode 100644 scripts/inventory/advanced_rotation.gd.uid delete mode 100644 scripts/inventory/belt_inventory.gd delete mode 100644 scripts/inventory/belt_inventory.gd.uid delete mode 100644 scripts/inventory/in_out_inventory.gd delete mode 100644 scripts/inventory/in_out_inventory.gd.uid delete mode 100644 scripts/inventory/inventory.gd delete mode 100644 scripts/inventory/inventory.gd.uid delete mode 100644 scripts/inventory/inventory_context.gd delete mode 100644 scripts/inventory/inventory_context.gd.uid delete mode 100644 scripts/inventory/inventory_slot.gd delete mode 100644 scripts/inventory/inventory_slot.gd.uid delete mode 100644 scripts/inventory/splitter_inventory.gd delete mode 100644 scripts/inventory/splitter_inventory.gd.uid delete mode 100644 scripts/inventory/stack.gd delete mode 100644 scripts/inventory/stack.gd.uid delete mode 100644 scripts/inventory/storage.gd delete mode 100644 scripts/inventory/storage.gd.uid delete mode 100644 scripts/inventory/void_inventory.gd delete mode 100644 scripts/inventory/void_inventory.gd.uid delete mode 100644 scripts/item.gd delete mode 100644 scripts/item.gd.uid delete mode 100644 scripts/placement_manager.gd delete mode 100644 scripts/placement_manager.gd.uid delete mode 100644 scripts/placement_zone.gd delete mode 100644 scripts/placement_zone.gd.uid delete mode 100644 scripts/prototype.gd delete mode 100644 scripts/prototype.gd.uid delete mode 100644 scripts/recipe/comparable.gd delete mode 100644 scripts/recipe/comparable.gd.uid delete mode 100644 scripts/recipe/item_tag.gd delete mode 100644 scripts/recipe/item_tag.gd.uid delete mode 100644 scripts/recipe/recipe.gd delete mode 100644 scripts/recipe/recipe.gd.uid delete mode 100644 scripts/recipe/recipe_part.gd delete mode 100644 scripts/recipe/recipe_part.gd.uid delete mode 100644 scripts/structure.gd delete mode 100644 scripts/structure.gd.uid delete mode 100644 scripts/structure_behaviour.gd delete mode 100644 scripts/structure_behaviour.gd.uid delete mode 100644 scripts/structures/assembler.gd delete mode 100644 scripts/structures/assembler.gd.uid delete mode 100644 scripts/structures/belt.gd delete mode 100644 scripts/structures/belt.gd.uid delete mode 100644 scripts/structures/belt_animation_sync.gd delete mode 100644 scripts/structures/belt_animation_sync.gd.uid delete mode 100644 scripts/structures/debug_item_deposit.gd delete mode 100644 scripts/structures/debug_item_deposit.gd.uid delete mode 100644 scripts/structures/directional_sprite.gd delete mode 100644 scripts/structures/directional_sprite.gd.uid delete mode 100644 scripts/structures/splitter.gd delete mode 100644 scripts/structures/splitter.gd.uid diff --git a/Samera.tres b/Samera.tres index fa030e3..764038b 100644 --- a/Samera.tres +++ b/Samera.tres @@ -1,6 +1,6 @@ [gd_resource type="Theme" load_steps=6 format=3 uid="uid://csh7en7c4otv6"] -[ext_resource type="Texture2D" uid="uid://3h6y6jxhf1qp" path="res://sprites/Uitto.png" id="1_cpeo0"] +[ext_resource type="Texture2D" uid="uid://3h6y6jxhf1qp" path="res://atlasses/Uitto.png" id="1_cpeo0"] [sub_resource type="AtlasTexture" id="AtlasTexture_cpeo0"] atlas = ExtResource("1_cpeo0") diff --git a/sprites/Uitto.png b/atlasses/Uitto.png similarity index 100% rename from sprites/Uitto.png rename to atlasses/Uitto.png diff --git a/sprites/Uitto.png.import b/atlasses/Uitto.png.import similarity index 78% rename from sprites/Uitto.png.import rename to atlasses/Uitto.png.import index 631f04e..affc2e8 100644 --- a/sprites/Uitto.png.import +++ b/atlasses/Uitto.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://3h6y6jxhf1qp" -path="res://.godot/imported/Uitto.png-aa56f94032c469259c3a25656653a91a.ctex" +path="res://.godot/imported/Uitto.png-9efeca1f14ae166610f5a34f2f69dbbd.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://sprites/Uitto.png" -dest_files=["res://.godot/imported/Uitto.png-aa56f94032c469259c3a25656653a91a.ctex"] +source_file="res://atlasses/Uitto.png" +dest_files=["res://.godot/imported/Uitto.png-9efeca1f14ae166610f5a34f2f69dbbd.ctex"] [params] diff --git a/sprites/atlasses/Lorpeka.png b/atlasses/atlasses/Lorpeka.png similarity index 100% rename from sprites/atlasses/Lorpeka.png rename to atlasses/atlasses/Lorpeka.png diff --git a/sprites/atlasses/Lorpeka.png.import b/atlasses/atlasses/Lorpeka.png.import similarity index 77% rename from sprites/atlasses/Lorpeka.png.import rename to atlasses/atlasses/Lorpeka.png.import index 9518bf0..1179654 100644 --- a/sprites/atlasses/Lorpeka.png.import +++ b/atlasses/atlasses/Lorpeka.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://5a173ko7iowk" -path="res://.godot/imported/Lorpeka.png-f43a0d85fcb09484172c72994d520a0f.ctex" +path="res://.godot/imported/Lorpeka.png-b67436292437ad95740c1d05d46f150b.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://sprites/atlasses/Lorpeka.png" -dest_files=["res://.godot/imported/Lorpeka.png-f43a0d85fcb09484172c72994d520a0f.ctex"] +source_file="res://atlasses/atlasses/Lorpeka.png" +dest_files=["res://.godot/imported/Lorpeka.png-b67436292437ad95740c1d05d46f150b.ctex"] [params] diff --git a/sprites/atlasses/Popekko.png b/atlasses/atlasses/Popekko.png similarity index 100% rename from sprites/atlasses/Popekko.png rename to atlasses/atlasses/Popekko.png diff --git a/sprites/atlasses/Popekko.png.import b/atlasses/atlasses/Popekko.png.import similarity index 77% rename from sprites/atlasses/Popekko.png.import rename to atlasses/atlasses/Popekko.png.import index 4dc9be4..7cdb34c 100644 --- a/sprites/atlasses/Popekko.png.import +++ b/atlasses/atlasses/Popekko.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://gfkhedfdi7ug" -path="res://.godot/imported/Popekko.png-5c34a5f2a8c85fcf59453310fa6553d9.ctex" +path="res://.godot/imported/Popekko.png-819a403b20da6f38897fc9b448aa97ec.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://sprites/atlasses/Popekko.png" -dest_files=["res://.godot/imported/Popekko.png-5c34a5f2a8c85fcf59453310fa6553d9.ctex"] +source_file="res://atlasses/atlasses/Popekko.png" +dest_files=["res://.godot/imported/Popekko.png-819a403b20da6f38897fc9b448aa97ec.ctex"] [params] diff --git a/generic/items/dbg_input1.tres b/generic/items/dbg_input1.tres deleted file mode 100644 index 0da7a0f..0000000 --- a/generic/items/dbg_input1.tres +++ /dev/null @@ -1,15 +0,0 @@ -[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://cpjlj1vm46t08"] - -[ext_resource type="Texture2D" uid="uid://gfkhedfdi7ug" path="res://sprites/atlasses/Popekko.png" id="1_hmnnx"] -[ext_resource type="Script" uid="uid://p5327ibxtyfs" path="res://scripts/item.gd" id="2_t6mdl"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_h7cm1"] -atlas = ExtResource("1_hmnnx") -region = Rect2(0, 16, 4, 4) - -[resource] -script = ExtResource("2_t6mdl") -display_name = &"Input1" -preview = SubResource("AtlasTexture_h7cm1") -stack_size = 2 -metadata/_custom_type_script = "uid://p5327ibxtyfs" diff --git a/generic/items/dbg_input2.tres b/generic/items/dbg_input2.tres deleted file mode 100644 index cd70415..0000000 --- a/generic/items/dbg_input2.tres +++ /dev/null @@ -1,15 +0,0 @@ -[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://c23vqjqnyo6f3"] - -[ext_resource type="Texture2D" uid="uid://gfkhedfdi7ug" path="res://sprites/atlasses/Popekko.png" id="1_7lekm"] -[ext_resource type="Script" uid="uid://p5327ibxtyfs" path="res://scripts/item.gd" id="2_50iur"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_7lekm"] -atlas = ExtResource("1_7lekm") -region = Rect2(4, 16, 4, 4) - -[resource] -script = ExtResource("2_50iur") -display_name = &"Input2" -preview = SubResource("AtlasTexture_7lekm") -stack_size = 2 -metadata/_custom_type_script = "uid://p5327ibxtyfs" diff --git a/generic/items/dbg_output.tres b/generic/items/dbg_output.tres deleted file mode 100644 index b8baf4a..0000000 --- a/generic/items/dbg_output.tres +++ /dev/null @@ -1,15 +0,0 @@ -[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://c16fy6r43xlg1"] - -[ext_resource type="Texture2D" uid="uid://gfkhedfdi7ug" path="res://sprites/atlasses/Popekko.png" id="1_r3jjm"] -[ext_resource type="Script" uid="uid://p5327ibxtyfs" path="res://scripts/item.gd" id="2_rkyi0"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_r3jjm"] -atlas = ExtResource("1_r3jjm") -region = Rect2(8, 16, 4, 4) - -[resource] -script = ExtResource("2_rkyi0") -display_name = &"Output" -preview = SubResource("AtlasTexture_r3jjm") -stack_size = 5 -metadata/_custom_type_script = "uid://p5327ibxtyfs" diff --git a/generic/platform.tres b/generic/platform.tres deleted file mode 100644 index 7196177..0000000 --- a/generic/platform.tres +++ /dev/null @@ -1,32 +0,0 @@ -[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://bv75bu0af04vs"] - -[ext_resource type="Texture2D" uid="uid://5a173ko7iowk" path="res://sprites/atlasses/Lorpeka.png" id="1_eak7k"] - -[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_vxqge"] -texture = ExtResource("1_eak7k") -0:0/0 = 0 -0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -1:0/0 = 0 -0:1/0 = 0 -0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) -1:1/0 = 0 -0:2/0 = 0 -1:2/0 = 0 -2:2/0 = 0 -2:1/0 = 0 -2:0/0 = 0 -3:0/0 = 0 -3:1/0 = 0 -3:2/0 = 0 -4:1/0 = 0 -4:2/0 = 0 -5:2/0 = 0 -5:1/0 = 0 -4:0/0 = 0 -5:0/0 = 0 -6:0/0 = 0 -6:1/0 = 0 - -[resource] -physics_layer_0/collision_layer = 1 -sources/0 = SubResource("TileSetAtlasSource_vxqge") diff --git a/generic/prototypes/belt.tres b/generic/prototypes/belt.tres deleted file mode 100644 index a1490cf..0000000 --- a/generic/prototypes/belt.tres +++ /dev/null @@ -1,15 +0,0 @@ -[gd_resource type="Resource" script_class="Prototype" load_steps=5 format=3 uid="uid://dj524jjal1f0n"] - -[ext_resource type="Script" uid="uid://c80sp6f77l5ha" path="res://scripts/prototype.gd" id="1_53h7j"] -[ext_resource type="Texture2D" uid="uid://gfkhedfdi7ug" path="res://sprites/atlasses/Popekko.png" id="1_x27pp"] -[ext_resource type="PackedScene" uid="uid://b0h8dd82b3ox5" path="res://scenes/structures/conveyor.tscn" id="2_hinjf"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_uvy8r"] -atlas = ExtResource("1_x27pp") -region = Rect2(16, 0, 16, 16) - -[resource] -script = ExtResource("1_53h7j") -scene = ExtResource("2_hinjf") -preview = SubResource("AtlasTexture_uvy8r") -metadata/_custom_type_script = "uid://c80sp6f77l5ha" diff --git a/generic/prototypes/dbg_assembler.tres b/generic/prototypes/dbg_assembler.tres deleted file mode 100644 index 7df276a..0000000 --- a/generic/prototypes/dbg_assembler.tres +++ /dev/null @@ -1,15 +0,0 @@ -[gd_resource type="Resource" script_class="Prototype" load_steps=5 format=3 uid="uid://yn1iesx30nfu"] - -[ext_resource type="Script" uid="uid://c80sp6f77l5ha" path="res://scripts/prototype.gd" id="1_mqcr0"] -[ext_resource type="Texture2D" uid="uid://gfkhedfdi7ug" path="res://sprites/atlasses/Popekko.png" id="1_sh8t1"] -[ext_resource type="PackedScene" uid="uid://dfatkxv6n55dw" path="res://scenes/structures/debug_assembler.tscn" id="2_kf3x0"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_kf3x0"] -atlas = ExtResource("1_sh8t1") -region = Rect2(48, 0, 32, 32) - -[resource] -script = ExtResource("1_mqcr0") -scene = ExtResource("2_kf3x0") -preview = SubResource("AtlasTexture_kf3x0") -metadata/_custom_type_script = "uid://c80sp6f77l5ha" diff --git a/generic/prototypes/dbg_item_deposit.tres b/generic/prototypes/dbg_item_deposit.tres deleted file mode 100644 index d5a0d61..0000000 --- a/generic/prototypes/dbg_item_deposit.tres +++ /dev/null @@ -1,11 +0,0 @@ -[gd_resource type="Resource" script_class="Prototype" load_steps=4 format=3 uid="uid://jhe8wtjoo6c6"] - -[ext_resource type="Texture2D" uid="uid://ugbe4qcmgfw0" path="res://icon.svg" id="1_movbu"] -[ext_resource type="PackedScene" uid="uid://cteh8r405wqwk" path="res://scenes/structures/debug_item_deposit.tscn" id="2_wp7ck"] -[ext_resource type="Script" uid="uid://c80sp6f77l5ha" path="res://scripts/prototype.gd" id="3_benq7"] - -[resource] -script = ExtResource("3_benq7") -scene = ExtResource("2_wp7ck") -preview = ExtResource("1_movbu") -metadata/_custom_type_script = "uid://c80sp6f77l5ha" diff --git a/generic/prototypes/splitter.tres b/generic/prototypes/splitter.tres deleted file mode 100644 index f8d632e..0000000 --- a/generic/prototypes/splitter.tres +++ /dev/null @@ -1,15 +0,0 @@ -[gd_resource type="Resource" script_class="Prototype" load_steps=5 format=3 uid="uid://bm2tggegnoik2"] - -[ext_resource type="Script" uid="uid://c80sp6f77l5ha" path="res://scripts/prototype.gd" id="1_cghkd"] -[ext_resource type="Texture2D" uid="uid://gfkhedfdi7ug" path="res://sprites/atlasses/Popekko.png" id="1_flgjh"] -[ext_resource type="PackedScene" uid="uid://bp4uvx2sdunfr" path="res://scenes/structures/splitter.tscn" id="2_2ry43"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_04mjq"] -atlas = ExtResource("1_flgjh") -region = Rect2(80, 16, 16, 32) - -[resource] -script = ExtResource("1_cghkd") -scene = ExtResource("2_2ry43") -preview = SubResource("AtlasTexture_04mjq") -metadata/_custom_type_script = "uid://c80sp6f77l5ha" diff --git a/generic/prototypes/trash_can.tres b/generic/prototypes/trash_can.tres deleted file mode 100644 index 9d3e937..0000000 --- a/generic/prototypes/trash_can.tres +++ /dev/null @@ -1,15 +0,0 @@ -[gd_resource type="Resource" script_class="Prototype" load_steps=5 format=3 uid="uid://wxfa130pbn18"] - -[ext_resource type="Texture2D" uid="uid://gfkhedfdi7ug" path="res://sprites/atlasses/Popekko.png" id="1_erjr6"] -[ext_resource type="Script" uid="uid://c80sp6f77l5ha" path="res://scripts/prototype.gd" id="1_jurq1"] -[ext_resource type="PackedScene" uid="uid://dpsrwmum6rbmi" path="res://scenes/structures/trash_can.tscn" id="2_qlygk"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_lldoj"] -atlas = ExtResource("1_erjr6") -region = Rect2(80, 0, 16, 16) - -[resource] -script = ExtResource("1_jurq1") -scene = ExtResource("2_qlygk") -preview = SubResource("AtlasTexture_lldoj") -metadata/_custom_type_script = "uid://c80sp6f77l5ha" diff --git a/generic/recipes/test_recipe.tres b/generic/recipes/test_recipe.tres deleted file mode 100644 index 90c0172..0000000 --- a/generic/recipes/test_recipe.tres +++ /dev/null @@ -1,31 +0,0 @@ -[gd_resource type="Resource" script_class="Recipe" load_steps=9 format=3 uid="uid://d2lbc1qqkayaa"] - -[ext_resource type="Script" uid="uid://w4v6jqv1ygqb" path="res://scripts/recipe/recipe_part.gd" id="1_no0hw"] -[ext_resource type="Resource" uid="uid://cpjlj1vm46t08" path="res://generic/items/dbg_input1.tres" id="2_f53xa"] -[ext_resource type="Script" uid="uid://dl0i68ut0lw70" path="res://scripts/recipe/recipe.gd" id="2_w6qf0"] -[ext_resource type="Resource" uid="uid://c23vqjqnyo6f3" path="res://generic/items/dbg_input2.tres" id="3_heoi8"] -[ext_resource type="Resource" uid="uid://c16fy6r43xlg1" path="res://generic/items/dbg_output.tres" id="4_0enwg"] - -[sub_resource type="Resource" id="Resource_q2e78"] -script = ExtResource("1_no0hw") -item = ExtResource("2_f53xa") -amount = 1 -metadata/_custom_type_script = "uid://w4v6jqv1ygqb" - -[sub_resource type="Resource" id="Resource_ry6el"] -script = ExtResource("1_no0hw") -item = ExtResource("3_heoi8") -amount = 1 -metadata/_custom_type_script = "uid://w4v6jqv1ygqb" - -[sub_resource type="Resource" id="Resource_ek2yb"] -script = ExtResource("1_no0hw") -item = ExtResource("4_0enwg") -amount = 5 -metadata/_custom_type_script = "uid://w4v6jqv1ygqb" - -[resource] -script = ExtResource("2_w6qf0") -ingridients = Array[ExtResource("1_no0hw")]([SubResource("Resource_q2e78"), SubResource("Resource_ry6el")]) -result = SubResource("Resource_ek2yb") -metadata/_custom_type_script = "uid://dl0i68ut0lw70" diff --git a/lore/basic b/lore/basic deleted file mode 100644 index a992853..0000000 --- a/lore/basic +++ /dev/null @@ -1,15 +0,0 @@ -Отрывок из "Исторического развития космических полётов": -"<...> -В 2036 году после рождения христа совершается первый полёт на марс человеком, который завершается к середине 2037 -В 2040 году после рождения христа году последняя христианская страна переходит на голоценовый календарь на фоне падения культурной значимости религии на фоне развития искуственного интеллекта -В 12060-х публикуется исследование свойств тахиократических систем частиц, доказывая, что тахионы существуют, окончательно доказывая, что мнимые числа не такие уж и мнимые -В конце 12070-х был получен первый тахион в лабораторных условиях -Ближе к 12100-м разрабатывается технология использования тахионов в космических полётах -В 12105 году совершается первый полёт на Марс, совершённый за неделю в самой дальней орбите -<...>" - -Со стороны государств тахионные технологии получили финансирование тогда, когда в России был перемещён из Москвы во Владивосток кусок фольги. Вместе с тем, была в разработке технология атмосаэдра, тогда носившую название "Атмосфера Два Ноль". Атмосаэдр - это икосаэдрический щит, в то время разрабатываемый для ультимативной защиты от ядерных боеголовок. В будущем Атмосаэдр станет залогом существования колоний, выступая искуственной атмосферой. Страна, называемая Ч, которая первой разработала Атмосаэдр, вскоре начала обмен ядерными боеголовками с Америкой. Это был ужаснейший геноцид, спецификой которого стало то, что пострадала только одна страна. Америка, как уничтоженная страна, не перестала существовать, правительство и столица были перенесены на Марсианскую колонию, однако эта страна перестала быть сверхдержавой. Начала новая эпоха взаимоотношений между государствами, были разработаны аналоги атмосаэдров, что позволило сохранить суверенитет остальных стран. Сплочёнными усилиями учёных со всего мира, был разработана технология поддержания огромного атмосаэдра, децентрализованный и стабильный, что позволило сдавить авторитет Ч в области щитов. Этот щит прозвали Зартум. Вскоре, были разработаны Отзечные врата. Это такие врата, которые позволяли проходить через Зартум, не выключая его. Вскоре после создания этой технологии, торговля и транспортировка между колониями удешевилась, что позволило некоторым колониям получить суверенитет. Однако, Писдосия (Peacedosia, некогда USA) организовала первый в галактике планетарный теракт. На одной из лун Ч, Форт Сатис, были диверсированы Столбы Зартума, что привело к уничтожению атмосферы, и геноциду всех, кто не находился в герметичных помещениях. Это вызвало невообразимые социальные потрясения, в ходе чего репрессивный аппарат Ч был перенесён на все колонии, а также были разработаны Лофадуры. Лофадуры выступали как ПВО, защищающие Отзечные врата. Несмотря на это, Ч в ходе социальных противоречий была разделена на кучу стран, все колонии были зависимы от самой крупой - Пахлосомии, но она не смогла установить контроль, и все Колонии стали независимыми. Из-за этого, технология Платформ утекла. Писдосия с того теракта закрыла свой Зартум, установив отзечные врата так, чтобы их было легко контроллировать с Марса. Вдохновившись Писдосией, были некоторые колонии так же стали террористическими государствами. - -Мы играем на территории полусуверенной полуколонии, являясь инжинером Лофадуры, защищающей Отзечные врата. Мы можем использовать приспособленный метеокрюк, чтобы захватывать другие Лофадуры, метеоры, астероиды и мусор. На Астероидах встречаются различные пока что безымянные материалы. Мы можем строить турели, создавать производственные цепочки. Кроме того, на главной Лофадуре установлен Контрольно Пропускной Модуль, который позволяет нам идентифицировать корабли, и автоматически открывать Отзечные врата. Пролетая мимо нас, торговцы могут с нами торговать. На нас будут постоянно совершать нападения различного рода государства. - -Кстати, я хотел добавить возможность перепрограммировать КПП Модуль, позволяющие скентится с "пиратами". Это выступало бы аналогом дружбы с гроксами, ибо колония бы направила все свои орбитальные силы на тебя, чтобы уничтожить тебя diff --git a/lore/geo b/lore/geo deleted file mode 100644 index 25d9b48..0000000 --- a/lore/geo +++ /dev/null @@ -1,13 +0,0 @@ -сейчас либо 123XY год по голоцену (X>5), либо 1240Y -Колонии внутри системы скорее кластерами, чем рассеянно, редко когда встретишь одиночную колонию в системе -при этом, на одной планете почти всегда несколько колоний разных стран -а на одной луне (размером с нашу луну, или меркурий) всегда колония одной страны -я думаю, что к 12500 в целом будут все колонии повсеместно по всей галактике, т.е. в разных точках по разному -но относительно нашей колонии, родная планета где-то через пару десятков солнечных систем. Я думаю, что типо, PI/12 или PI/8 радиан относительно центра галактики -Со всеми колониями на планете, на которой мы находимся, мы находимся в очень хороших отношениях, полусимбиотических. -С колониями из солнечной системы: -Планета Кертыш - В целом нейтрально с нами. Принадлежит в основном к Неосерби и Ч, но есть одна полусуверенная колония -Луна Флорк - принадлежит пиратам Хопсер, они наши противники -Планета Миртум - мы у них в долгу за установку Держила, тахионного "поезда" между солнечными системами, мы у них в экономической зависимости, полностью независимая -Есть Земное Союзное Право, по которому живут все земные колонии кроме колоний Бларистии и Орканы, у них на территории колоний просто копия местной конституции -Есть Негласные правила Писдосии, который просто является террористическим манифестом, по нему никто не живёт, но все пираты вдохновлены diff --git a/lore/state b/lore/state deleted file mode 100644 index a3c48c2..0000000 --- a/lore/state +++ /dev/null @@ -1,9 +0,0 @@ -ну, короче, государство Ч это на самом деле Чэбялин, это буквально то государство, которое начало новую эпоху. Из-за террактов Писдосии (+ исторически) у неё хороший репрессивный аппарат. Политика в экономике направлена на расширение производств, что видно по тому, как они любят экспансию. Не нападают первыми (больше). Культурно наследница России (а как же) -Писдосия это мифическое государство, о котором никто и ничего не знает. С тех пор, как они закрыли в последний раз отзечные врата, любая коммуникация с ними сошла на нет. Поговаривают, что они вознеслись в четвёртое измерение. -Бларистия, Оркана, Неосербия - это земные государства, которые можно сравнить с современной европой. Вроде суверенные, сильные, но так то лежат под Чэбялин. (Культурно все отличаются). Полагаются во многом на торговлю. -Так же есть Африканская империя. Благодаря атмосаэдрам, они превзошли свои природные ограничения. Сильная промышленность, чем-то чэбялин похожи, но в основном они идеологически ведут войну против всех пиратов. -Миртум - самая близкая к нам суверенная колония. Технократия. Экономика направлена на инновации. -Доллинджер,, Гоготки - самые влиятельные неземные колонии. -Доллинджер - Демкоратия с экономикой заточенной под торговлю и сферой услуг -Гоготки - Исследовательский институт атома и тахионов, в основном продаёт и производит эти технологии -Сигвойды - Летающая "планета" (огромный корабль) с теократией-технократией. diff --git a/lore/trade b/lore/trade deleted file mode 100644 index f219b7f..0000000 --- a/lore/trade +++ /dev/null @@ -1,14 +0,0 @@ -Писдосия предпочитает торговать только с суверенными государствами (т.е. не торгует со своими колониями, чужими колониями, и лофадурами), при этом торгует с "пиратами". Традиционно использует ЦифР -Бларистия, Оркана, Неосербия - предпочитают торговать с кем угодно кроме пиратов и своих колоний. Использует Объединённую монету для торговли -Африканская империя ведёт весьма ограниченую торговлю с другими государствами, предпочитая покупать только боеприпасы. Валюта - объединённая монета -Миртум ведёт расширенную технологиями со всеми, и только внутри системы проводит оптовую торговлю. Имеет банк. Валюта - объединённая монета -Доллинджер - как сучка продаёт свои ресурсы. Сфера услуг доступна только Родной планете. Валюта - Объединённая монета -Гоготки - в целом, то же самое, что и Миртум. Валюта - Кисивась - -Текущие ходовые товары: -Патроны разного вида -Ресурсы, которые встречаются на астероиде -Электроэнергия -Тахионные приблуды -Карманные атмосаедры -(пока так, я так то планировал это расписывать от экономики игры) diff --git a/lore/trinet b/lore/trinet deleted file mode 100644 index 9428eb5..0000000 --- a/lore/trinet +++ /dev/null @@ -1,9 +0,0 @@ -В галактике превалирует глобально Трисеть. Трисеть можно назвать солнечным интернетом, с интерфейсом взаимодействия с другими интернетами -любой идентификатор в трисети состоит из следующих трибит информации (я заранее говорю, не уверен, что стоит именно такое число бит выделить): -первый трибит - тип идентификатора (статический, динамический, приватный) -шестнадцать трибитов - "глава" сети (солнечная система) -остальные трибиты - сам идентификатор - -прикол статичных идентификаторов - они по факту являются хешированными названиями. Т.е. 2ndbeam.ru будет чёто типо 0tx00000000000000000<хэш> -не нужен дополнительно dns, ты просто обращаешься к своему космопровайдеру, и в само название вшит айпишник -в качестве кстати военной коммуникации используется запутанность бобионов diff --git a/lore/ttech b/lore/ttech deleted file mode 100644 index b97f385..0000000 --- a/lore/ttech +++ /dev/null @@ -1,15 +0,0 @@ -Общие технологии: -Держил - аналог космических реле. Позволяет нетахионным транспортным средствам перемещатся по солнечным системам -Мельтжил - позволяет сразу же переместится из одной солнечной системы в другую - -Гражданские технологии: -Старожил - тахионный грузовик -Выжил - тахионный "поезд" -Отвыяз - класс "тахионных движков" гражданской калибровки - -Военные технологии: -Барбед - экспериментальная технология, позволяет нетахионным транспортным средствам работать как тахионные -Шломлага - не совсем транспортная технология, но она позволяет не разбиваться об атмосаедр, и вместо этого его немного гнуть -Пирлипед - традиционное оружие. Это атомная боеголовка тахионная. Моментально взрывает противника. Не использовалась хуеву кучу лет -Мавитон - класс "тахионных движков" военной калибровки - diff --git a/project.godot b/project.godot index 6cbb945..e231e7f 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,6 @@ config_version=5 [application] config/name="Delurbelako" -run/main_scene="uid://u7thalwj5742" config/features=PackedStringArray("4.5", "GL Compatibility") config/icon="res://icon.svg" diff --git a/scenes/2d_world.tscn b/scenes/2d_world.tscn deleted file mode 100644 index f5ce456..0000000 --- a/scenes/2d_world.tscn +++ /dev/null @@ -1,81 +0,0 @@ -[gd_scene load_steps=8 format=3 uid="uid://u7thalwj5742"] - -[ext_resource type="PackedScene" uid="uid://b7du4vul4bmpq" path="res://scenes/player_platform.tscn" id="1_4ia00"] -[ext_resource type="Script" uid="uid://bnjwg4rlcfd8k" path="res://scripts/gui/construction_buttons_generator.gd" id="3_i7yte"] -[ext_resource type="Script" uid="uid://b4nkk0ndqcto" path="res://scripts/placement_manager.gd" id="4_i7yte"] -[ext_resource type="PackedScene" uid="uid://bac552xgua68e" path="res://scenes/other_platform.tscn" id="5_mnxrb"] - -[sub_resource type="Animation" id="Animation_bq5r8"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("OtherPlatform:position") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [Vector2(309, 15)] -} - -[sub_resource type="Animation" id="Animation_ymyc2"] -resource_name = "main" -length = 10.0 -loop_mode = 1 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("OtherPlatform:position") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 5), -"transitions": PackedFloat32Array(-2, -2), -"update": 0, -"values": [Vector2(309, 15), Vector2(309, 131)] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_mogn5"] -_data = { -&"RESET": SubResource("Animation_bq5r8"), -&"main": SubResource("Animation_ymyc2") -} - -[node name="2D World" type="Node2D"] - -[node name="PlayerPlatform" parent="." instance=ExtResource("1_4ia00")] -position = Vector2(17, 17) - -[node name="OtherPlatform" parent="." instance=ExtResource("5_mnxrb")] -position = Vector2(309, 15) - -[node name="GUI" type="CanvasLayer" parent="."] - -[node name="Panel" type="Panel" parent="GUI"] -anchors_preset = -1 -anchor_top = 0.757 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_top = -0.01600647 -grow_horizontal = 2 -grow_vertical = 0 - -[node name="HBoxContainer" type="HBoxContainer" parent="GUI/Panel"] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -script = ExtResource("3_i7yte") - -[node name="Placer" type="Node2D" parent="."] -script = ExtResource("4_i7yte") - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -&"": SubResource("AnimationLibrary_mogn5") -} -autoplay = "main" diff --git a/scenes/debug_item.tscn b/scenes/debug_item.tscn deleted file mode 100644 index 90d4a11..0000000 --- a/scenes/debug_item.tscn +++ /dev/null @@ -1,12 +0,0 @@ -[gd_scene load_steps=3 format=3 uid="uid://bbh7akfbskq4u"] - -[ext_resource type="Texture2D" uid="uid://dinyjq8853usn" path="res://sprites/atlasses/Popekko.png" id="1_omb5g"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_laovn"] -atlas = ExtResource("1_omb5g") -region = Rect2(0, 0, 5, 5) - -[node name="DebugItem" type="Node2D"] - -[node name="Sprite2D" type="Sprite2D" parent="."] -texture = SubResource("AtlasTexture_laovn") diff --git a/scenes/gui/construction_button.tscn b/scenes/gui/construction_button.tscn deleted file mode 100644 index 3734551..0000000 --- a/scenes/gui/construction_button.tscn +++ /dev/null @@ -1,17 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://dwq8u8ptmcegk"] - -[ext_resource type="Script" uid="uid://db37xmo8ygwhg" path="res://scripts/gui/construction_button.gd" id="1_unpdg"] - -[node name="ConstructionButton" type="AspectRatioContainer"] -offset_right = 12.0 -offset_bottom = 9.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 -theme_type_variation = &"CRT" - -[node name="Button" type="Button" parent="."] -layout_mode = 2 -theme_type_variation = &"CRT" -icon_alignment = 1 -expand_icon = true -script = ExtResource("1_unpdg") diff --git a/scenes/mounted_gun.tscn b/scenes/mounted_gun.tscn deleted file mode 100644 index 1772239..0000000 --- a/scenes/mounted_gun.tscn +++ /dev/null @@ -1,13 +0,0 @@ -[gd_scene load_steps=3 format=3 uid="uid://buklkcwb0k2rc"] - -[ext_resource type="Texture2D" uid="uid://416h8gs1f7x0" path="res://sprites/atlasses/Popekko.png" id="1_ligff"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_qfuiw"] -atlas = ExtResource("1_ligff") -region = Rect2(0, 0, 5, 5) - -[node name="MountedGun" type="Node2D"] - -[node name="Sprite2D" type="Sprite2D" parent="."] -position = Vector2(-2.5, 2.5) -texture = SubResource("AtlasTexture_qfuiw") diff --git a/scenes/other_platform.tscn b/scenes/other_platform.tscn deleted file mode 100644 index 47d0b84..0000000 --- a/scenes/other_platform.tscn +++ /dev/null @@ -1,20 +0,0 @@ -[gd_scene load_steps=4 format=4 uid="uid://bac552xgua68e"] - -[ext_resource type="TileSet" uid="uid://bv75bu0af04vs" path="res://generic/platform.tres" id="1_fs1oy"] -[ext_resource type="Script" uid="uid://lw1ya3iu14uf" path="res://scripts/placement_zone.gd" id="2_bwire"] -[ext_resource type="Script" uid="uid://x5edy155eg0s" path="res://scripts/grid_controller.gd" id="3_qaudu"] - -[node name="OtherPlatform" type="TileMapLayer"] -tile_map_data = PackedByteArray("AAAAAAAAAAAAAAAAAAAAAAEAAAAAAAEAAAAAAAIAAAAAAAEAAAAAAAMAAAAAAAEAAAAAAAQAAAAAAAEAAAABAAAAAAAAAAEAAAABAAEAAAAAAAEAAAABAAIAAAAAAAEAAAABAAMAAAAAAAAAAAABAAQAAAAAAAEAAAACAAAAAAAAAAAAAAACAAEAAAAAAAEAAAACAAIAAAAAAAEAAAACAAMAAAAAAAAAAAACAAQAAAAAAAAAAAD/////AAACAAEAAAD//wAAAAAEAAIAAAD//wEAAAAEAAIAAAD//wIAAAAEAAIAAAD//wMAAAAEAAIAAAD//wQAAAAEAAIAAAAAAP//AAABAAIAAAABAP//AAABAAIAAAACAP//AAABAAIAAAADAP//AAADAAEAAAD//wUAAAAEAAEAAAADAAUAAAAFAAEAAAAAAAUAAAAGAAEAAAABAAUAAAAGAAEAAAACAAUAAAAGAAEAAAADAAAAAAAFAAIAAAADAAEAAAAFAAIAAAADAAIAAAAFAAIAAAADAAMAAAAFAAIAAAADAAQAAAAFAAIAAAA=") -tile_set = ExtResource("1_fs1oy") - -[node name="BuildZone" type="Marker2D" parent="." node_paths=PackedStringArray("grid_controller")] -script = ExtResource("2_bwire") -building_rect = Rect2(0, 0, 48, 80) -grid_controller = NodePath("../EntityHolder") -metadata/_custom_type_script = "uid://lw1ya3iu14uf" - -[node name="EntityHolder" type="Node2D" parent="." node_paths=PackedStringArray("building_zone")] -script = ExtResource("3_qaudu") -building_zone = NodePath("../BuildZone") -metadata/_custom_type_script = "uid://x5edy155eg0s" diff --git a/scenes/player_platform.tscn b/scenes/player_platform.tscn deleted file mode 100644 index ca73456..0000000 --- a/scenes/player_platform.tscn +++ /dev/null @@ -1,21 +0,0 @@ -[gd_scene load_steps=4 format=4 uid="uid://b7du4vul4bmpq"] - -[ext_resource type="TileSet" uid="uid://bv75bu0af04vs" path="res://generic/platform.tres" id="1_khkq2"] -[ext_resource type="Script" uid="uid://lw1ya3iu14uf" path="res://scripts/placement_zone.gd" id="2_wpmwa"] -[ext_resource type="Script" uid="uid://x5edy155eg0s" path="res://scripts/grid_controller.gd" id="3_6hjoe"] - -[node name="PlayerPlatform" type="Node2D"] - -[node name="TileMapLayer" type="TileMapLayer" parent="."] -tile_map_data = PackedByteArray("AAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAACAAAAAAAAAAEAAAADAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAGAAAAAAAAAAEAAAAHAAAAAAAAAAAAAAAIAAAAAAAAAAEAAAAJAAAAAAAAAAEAAAAKAAAAAAAAAAEAAAALAAAAAAAAAAAAAAAMAAAAAAAAAAEAAAANAAAAAAAAAAEAAAAOAAAAAAAAAAEAAAAPAAAAAAAAAAAAAAAQAAAAAAAAAAEAAAAQAAEAAAAAAAAAAAAPAAEAAAAAAAAAAAAOAAEAAAAAAAEAAAANAAEAAAAAAAAAAAAMAAEAAAAAAAAAAAALAAEAAAAAAAEAAAAKAAEAAAAAAAEAAAAJAAEAAAAAAAEAAAAIAAEAAAAAAAEAAAAHAAEAAAAAAAAAAAAGAAEAAAAAAAEAAAAFAAEAAAAAAAEAAAAEAAEAAAAAAAAAAAADAAEAAAAAAAAAAAACAAEAAAAAAAEAAAABAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAIAAAAAAAAAAAABAAIAAAAAAAEAAAACAAIAAAAAAAEAAAACAAMAAAAAAAEAAAADAAMAAAAAAAAAAAADAAIAAAAAAAAAAAAEAAIAAAAAAAAAAAAFAAIAAAAAAAEAAAAGAAIAAAAAAAEAAAAHAAIAAAAAAAEAAAAIAAIAAAAAAAEAAAAJAAIAAAAAAAEAAAAKAAIAAAAAAAEAAAALAAIAAAAAAAAAAAAMAAIAAAAAAAEAAAANAAIAAAAAAAEAAAAOAAIAAAAAAAAAAAAPAAIAAAAAAAEAAAAQAAIAAAAAAAEAAAAQAAMAAAAAAAEAAAAPAAMAAAAAAAEAAAAOAAMAAAAAAAEAAAANAAMAAAAAAAAAAAANAAQAAAAAAAAAAAAMAAQAAAAAAAEAAAALAAQAAAAAAAEAAAAKAAQAAAAAAAEAAAAJAAQAAAAAAAAAAAAJAAMAAAAAAAAAAAAIAAMAAAAAAAAAAAAHAAMAAAAAAAEAAAAGAAMAAAAAAAAAAAAFAAMAAAAAAAEAAAAEAAMAAAAAAAEAAAABAAMAAAAAAAEAAAAAAAMAAAAAAAEAAAAAAAQAAAAAAAAAAAABAAQAAAAAAAEAAAACAAQAAAAAAAAAAAADAAQAAAAAAAAAAAAEAAQAAAAAAAEAAAAFAAQAAAAAAAAAAAAGAAQAAAAAAAAAAAAHAAQAAAAAAAAAAAAIAAQAAAAAAAEAAAAOAAQAAAAAAAEAAAAPAAQAAAAAAAEAAAAQAAQAAAAAAAEAAAAMAAMAAAAAAAAAAAALAAMAAAAAAAEAAAAKAAMAAAAAAAEAAAABAAUAAAAAAAEAAAAAAAUAAAAAAAAAAAACAAUAAAAAAAEAAAADAAUAAAAAAAEAAAAEAAUAAAAAAAEAAAAFAAUAAAAAAAEAAAAGAAUAAAAAAAEAAAAHAAUAAAAAAAEAAAAIAAUAAAAAAAEAAAAJAAUAAAAAAAEAAAAKAAUAAAAAAAAAAAALAAUAAAAAAAAAAAAMAAUAAAAAAAAAAAANAAUAAAAAAAAAAAAOAAUAAAAAAAEAAAAPAAUAAAAAAAAAAAAQAAUAAAAAAAAAAAAQAAYAAAAAAAEAAAAPAAYAAAAAAAAAAAAPAAcAAAAAAAAAAAAOAAcAAAAAAAAAAAAOAAYAAAAAAAAAAAANAAYAAAAAAAAAAAAMAAYAAAAAAAAAAAALAAYAAAAAAAEAAAAKAAYAAAAAAAEAAAAJAAYAAAAAAAEAAAAIAAYAAAAAAAEAAAAHAAYAAAAAAAAAAAAGAAYAAAAAAAEAAAAFAAYAAAAAAAAAAAAEAAYAAAAAAAEAAAADAAYAAAAAAAEAAAACAAYAAAAAAAEAAAABAAYAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAcAAAAAAAAAAAABAAcAAAAAAAAAAAACAAcAAAAAAAAAAAADAAcAAAAAAAAAAAAEAAcAAAAAAAEAAAAFAAcAAAAAAAAAAAAGAAcAAAAAAAAAAAAHAAcAAAAAAAAAAAAIAAcAAAAAAAEAAAAJAAcAAAAAAAAAAAAKAAcAAAAAAAEAAAALAAcAAAAAAAAAAAAMAAcAAAAAAAAAAAANAAcAAAAAAAEAAAAQAAcAAAAAAAAAAAARAAAAAAABAAEAAAARAAEAAAABAAEAAAARAAIAAAABAAEAAAARAAMAAAABAAEAAAARAAQAAAABAAEAAAARAAUAAAABAAEAAAARAAYAAAABAAEAAAARAAcAAAABAAEAAAD//wAAAAABAAAAAAD//wEAAAABAAAAAAD//wIAAAABAAAAAAD//wMAAAABAAAAAAD//wQAAAABAAAAAAD//wUAAAABAAAAAAD//wYAAAABAAAAAAD//wcAAAABAAAAAAAAAP//AAAAAAIAAAABAP//AAAAAAIAAAACAP//AAAAAAIAAAADAP//AAAAAAIAAAAEAP//AAAAAAIAAAAFAP//AAAAAAIAAAAGAP//AAAAAAIAAAAHAP//AAAAAAIAAAAIAP//AAAAAAIAAAAJAP//AAAAAAIAAAAKAP//AAAAAAIAAAALAP//AAAAAAIAAAAMAP//AAAAAAIAAAANAP//AAAAAAIAAAAOAP//AAAAAAIAAAAPAP//AAAAAAIAAAAQAP//AAAAAAIAAAD/////AAACAAIAAAARAP//AAADAAIAAAD//wgAAAADAAAAAAARAAgAAAAEAAAAAAAQAAgAAAACAAAAAAAPAAgAAAACAAAAAAAOAAgAAAACAAAAAAANAAgAAAACAAAAAAAMAAgAAAACAAAAAAALAAgAAAACAAAAAAAKAAgAAAACAAAAAAAJAAgAAAACAAAAAAAIAAgAAAACAAAAAAAHAAgAAAACAAAAAAAGAAgAAAACAAAAAAAFAAgAAAACAAAAAAAEAAgAAAACAAAAAAADAAgAAAACAAAAAAACAAgAAAACAAAAAAABAAgAAAACAAAAAAAAAAgAAAACAAAAAAA=") -tile_set = ExtResource("1_khkq2") - -[node name="BuildRect" type="Marker2D" parent="." node_paths=PackedStringArray("grid_controller")] -script = ExtResource("2_wpmwa") -building_rect = Rect2(0, 0, 272, 128) -grid_controller = NodePath("../EntityHolder") - -[node name="EntityHolder" type="Node2D" parent="." node_paths=PackedStringArray("building_zone")] -script = ExtResource("3_6hjoe") -building_zone = NodePath("../BuildRect") -metadata/_custom_type_script = "uid://x5edy155eg0s" diff --git a/scenes/structures/conveyor.tscn b/scenes/structures/conveyor.tscn deleted file mode 100644 index d5d0d64..0000000 --- a/scenes/structures/conveyor.tscn +++ /dev/null @@ -1,99 +0,0 @@ -[gd_scene load_steps=16 format=3 uid="uid://b0h8dd82b3ox5"] - -[ext_resource type="Texture2D" uid="uid://gfkhedfdi7ug" path="res://sprites/atlasses/Popekko.png" id="1_kqxj7"] -[ext_resource type="Script" uid="uid://bbd7o2st8kmgl" path="res://scripts/structure.gd" id="1_y326v"] -[ext_resource type="Script" uid="uid://bd4ojfqrl8idm" path="res://scripts/inventory/inventory_slot.gd" id="2_54w8r"] -[ext_resource type="Script" uid="uid://v0hkuo3gda1b" path="res://scripts/inventory/belt_inventory.gd" id="3_ruvuk"] -[ext_resource type="Script" uid="uid://bp341eiwvfvyl" path="res://scripts/structures/belt.gd" id="5_54w8r"] -[ext_resource type="Script" uid="uid://lchhqigib2t0" path="res://scripts/structures/directional_sprite.gd" id="5_ruvuk"] -[ext_resource type="Script" uid="uid://drsty3i1820ha" path="res://scripts/structures/belt_animation_sync.gd" id="7_t4je2"] - -[sub_resource type="Resource" id="Resource_t4je2"] -resource_local_to_scene = true -script = ExtResource("3_ruvuk") -capacity = 4 -pop_treshold = 0.95 -internal_array = Array[ExtResource("2_54w8r")]([Object(RefCounted,"script":ExtResource("2_54w8r"),"held_item":null,"amount":0,"filter":null,"updated":null) -, Object(RefCounted,"script":ExtResource("2_54w8r"),"held_item":null,"amount":0,"filter":null,"updated":null) -, Object(RefCounted,"script":ExtResource("2_54w8r"),"held_item":null,"amount":0,"filter":null,"updated":null) -, Object(RefCounted,"script":ExtResource("2_54w8r"),"held_item":null,"amount":0,"filter":null,"updated":null) -]) -metadata/_custom_type_script = "uid://v0hkuo3gda1b" - -[sub_resource type="AtlasTexture" id="AtlasTexture_54w8r"] -atlas = ExtResource("1_kqxj7") -region = Rect2(16, 0, 16, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_crbfm"] -atlas = ExtResource("1_kqxj7") -region = Rect2(32, 64, 16, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_t4je2"] -atlas = ExtResource("1_kqxj7") -region = Rect2(32, 0, 16, 64) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ruvuk"] -atlas = ExtResource("1_kqxj7") -region = Rect2(16, 64, 16, 64) - -[sub_resource type="Animation" id="Animation_ruvuk"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [0] -} - -[sub_resource type="Animation" id="Animation_54w8r"] -resource_name = "right" -length = 1.000025 -loop_mode = 1 -step = 0.25 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.25, 0.5, 0.75), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 1, -"values": [0, 1, 2, 3] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_crbfm"] -_data = { -&"RESET": SubResource("Animation_ruvuk"), -&"right": SubResource("Animation_54w8r") -} - -[node name="Conveyor" type="Node2D" groups=["buildings"]] -script = ExtResource("1_y326v") -inventory = SubResource("Resource_t4je2") -maximum_directions = 4 - -[node name="Sprite2D" type="Sprite2D" parent="." node_paths=PackedStringArray("structure")] -texture = SubResource("AtlasTexture_54w8r") -vframes = 4 -script = ExtResource("5_ruvuk") -textures = Array[Texture]([SubResource("AtlasTexture_54w8r"), SubResource("AtlasTexture_crbfm"), SubResource("AtlasTexture_t4je2"), SubResource("AtlasTexture_ruvuk")]) -structure = NodePath("..") - -[node name="Conveyor" type="Node2D" parent="."] -z_index = 1 -script = ExtResource("5_54w8r") - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -&"": SubResource("AnimationLibrary_crbfm") -} -autoplay = "right" -script = ExtResource("7_t4je2") diff --git a/scenes/structures/debug_assembler.tscn b/scenes/structures/debug_assembler.tscn deleted file mode 100644 index 2e4cd68..0000000 --- a/scenes/structures/debug_assembler.tscn +++ /dev/null @@ -1,56 +0,0 @@ -[gd_scene load_steps=13 format=3 uid="uid://dfatkxv6n55dw"] - -[ext_resource type="Script" uid="uid://bbd7o2st8kmgl" path="res://scripts/structure.gd" id="1_k5y3y"] -[ext_resource type="Texture2D" uid="uid://gfkhedfdi7ug" path="res://sprites/atlasses/Popekko.png" id="2_4befw"] -[ext_resource type="Script" uid="uid://bd4ojfqrl8idm" path="res://scripts/inventory/inventory_slot.gd" id="2_p1cyh"] -[ext_resource type="Script" uid="uid://m6b6vawdqgqb" path="res://scripts/inventory/in_out_inventory.gd" id="3_wqoim"] -[ext_resource type="Script" uid="uid://c7mx3uatj6ulm" path="res://scripts/structures/assembler.gd" id="5_0x00x"] -[ext_resource type="Script" uid="uid://lchhqigib2t0" path="res://scripts/structures/directional_sprite.gd" id="5_kno0u"] -[ext_resource type="Resource" uid="uid://d2lbc1qqkayaa" path="res://generic/recipes/test_recipe.tres" id="6_wqoim"] - -[sub_resource type="Resource" id="Resource_kno0u"] -resource_local_to_scene = true -script = ExtResource("3_wqoim") -input_capacity = 2 -output_capacity = 1 -input_array = Array[ExtResource("2_p1cyh")]([Object(RefCounted,"script":ExtResource("2_p1cyh"),"held_item":null,"amount":0,"filter":null) -, Object(RefCounted,"script":ExtResource("2_p1cyh"),"held_item":null,"amount":0,"filter":null) -]) -output_slot = Object(RefCounted,"script":ExtResource("2_p1cyh"),"held_item":null,"amount":0,"filter":null) - -metadata/_custom_type_script = "uid://m6b6vawdqgqb" - -[sub_resource type="AtlasTexture" id="AtlasTexture_xh4eg"] -atlas = ExtResource("2_4befw") -region = Rect2(48, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_0x00x"] -atlas = ExtResource("2_4befw") -region = Rect2(48, 32, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_dr8in"] -atlas = ExtResource("2_4befw") -region = Rect2(48, 96, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_kno0u"] -atlas = ExtResource("2_4befw") -region = Rect2(48, 64, 32, 32) - -[node name="DebugAssembler" type="Node2D"] -script = ExtResource("1_k5y3y") -dimensions = Rect2i(0, 0, 2, 2) -inventory = SubResource("Resource_kno0u") -direction = 1.571 -maximum_directions = 4 - -[node name="Sprite2D" type="Sprite2D" parent="." node_paths=PackedStringArray("structure")] -texture = SubResource("AtlasTexture_xh4eg") -offset = Vector2(8, 8) -script = ExtResource("5_kno0u") -textures = Array[Texture]([SubResource("AtlasTexture_0x00x"), SubResource("AtlasTexture_xh4eg"), SubResource("AtlasTexture_dr8in"), SubResource("AtlasTexture_kno0u")]) -structure = NodePath("..") - -[node name="Assembler" type="Node2D" parent="."] -position = Vector2(16, 16) -script = ExtResource("5_0x00x") -selected_recipe = ExtResource("6_wqoim") diff --git a/scenes/structures/debug_item_deposit.tscn b/scenes/structures/debug_item_deposit.tscn deleted file mode 100644 index 87e5c19..0000000 --- a/scenes/structures/debug_item_deposit.tscn +++ /dev/null @@ -1,21 +0,0 @@ -[gd_scene load_steps=5 format=3 uid="uid://cteh8r405wqwk"] - -[ext_resource type="Script" uid="uid://bbd7o2st8kmgl" path="res://scripts/structure.gd" id="1_uhivg"] -[ext_resource type="Texture2D" uid="uid://gfkhedfdi7ug" path="res://sprites/atlasses/Popekko.png" id="2_evk1q"] -[ext_resource type="Script" uid="uid://v3j1d3qyg30i" path="res://scripts/structures/debug_item_deposit.gd" id="5_nh3xp"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_wxqk4"] -atlas = ExtResource("2_evk1q") -region = Rect2(16, 0, 16, 16) - -[node name="DebugItemDeposit" type="Node2D"] -script = ExtResource("1_uhivg") -metadata/_custom_type_script = "uid://bbd7o2st8kmgl" - -[node name="Sprite2D" type="Sprite2D" parent="."] -self_modulate = Color(1, 0, 0, 1) -texture = SubResource("AtlasTexture_wxqk4") - -[node name="ItemDeposit" type="Node2D" parent="."] -script = ExtResource("5_nh3xp") -metadata/_custom_type_script = "uid://iidfsh0lirc2" diff --git a/scenes/structures/splitter.tscn b/scenes/structures/splitter.tscn deleted file mode 100644 index 856dc95..0000000 --- a/scenes/structures/splitter.tscn +++ /dev/null @@ -1,69 +0,0 @@ -[gd_scene load_steps=17 format=3 uid="uid://bp4uvx2sdunfr"] - -[ext_resource type="Script" uid="uid://bbd7o2st8kmgl" path="res://scripts/structure.gd" id="1_0ta8r"] -[ext_resource type="Script" uid="uid://bd4ojfqrl8idm" path="res://scripts/inventory/inventory_slot.gd" id="2_lbove"] -[ext_resource type="Script" uid="uid://dlt3mbu6hk572" path="res://scripts/inventory/splitter_inventory.gd" id="3_2ulpw"] -[ext_resource type="Texture2D" uid="uid://gfkhedfdi7ug" path="res://sprites/atlasses/Popekko.png" id="4_iov8t"] -[ext_resource type="Script" uid="uid://lchhqigib2t0" path="res://scripts/structures/directional_sprite.gd" id="5_mimwr"] -[ext_resource type="Script" uid="uid://bml2n6vo5my0c" path="res://scripts/inventory/advanced_rotation.gd" id="6_mimwr"] -[ext_resource type="Script" uid="uid://bac6ei0tpoiqe" path="res://scripts/structures/splitter.gd" id="7_0dkfh"] - -[sub_resource type="Resource" id="Resource_iov8t"] -resource_local_to_scene = true -script = ExtResource("3_2ulpw") -capacity = 1 -upper_array = Array[ExtResource("2_lbove")]([Object(RefCounted,"script":ExtResource("2_lbove"),"held_item":null,"amount":0,"filter":null) -]) -down_array = Array[ExtResource("2_lbove")]([Object(RefCounted,"script":ExtResource("2_lbove"),"held_item":null,"amount":0,"filter":null) -]) -metadata/_custom_type_script = "uid://dlt3mbu6hk572" - -[sub_resource type="AtlasTexture" id="AtlasTexture_0dkfh"] -atlas = ExtResource("4_iov8t") -region = Rect2(80, 16, 16, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_04mjq"] -atlas = ExtResource("4_iov8t") -region = Rect2(80, 16, 16, 32) - -[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_41jic"] -load_path = "res://.godot/imported/Popekko.png-5c34a5f2a8c85fcf59453310fa6553d9.ctex" - -[sub_resource type="AtlasTexture" id="AtlasTexture_ksqgd"] -atlas = SubResource("CompressedTexture2D_41jic") -region = Rect2(80, 64, 32, 16) - -[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_f7n4f"] -load_path = "res://.godot/imported/Popekko.png-5c34a5f2a8c85fcf59453310fa6553d9.ctex" - -[sub_resource type="AtlasTexture" id="AtlasTexture_0x331"] -atlas = SubResource("CompressedTexture2D_f7n4f") -region = Rect2(96, 16, 16, 32) - -[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_hmwxr"] -load_path = "res://.godot/imported/Popekko.png-5c34a5f2a8c85fcf59453310fa6553d9.ctex" - -[sub_resource type="AtlasTexture" id="AtlasTexture_upfxh"] -atlas = SubResource("CompressedTexture2D_hmwxr") -region = Rect2(80, 48, 32, 16) - -[node name="Splitter" type="Node2D"] -script = ExtResource("1_0ta8r") -dimensions = Rect2i(0, 0, 1, 2) -inventory = SubResource("Resource_iov8t") -maximum_directions = 4 - -[node name="Sprite2D" type="Sprite2D" parent="." node_paths=PackedStringArray("structure")] -texture = SubResource("AtlasTexture_0dkfh") -offset = Vector2(0, 8) -script = ExtResource("5_mimwr") -textures = Array[Texture]([SubResource("AtlasTexture_04mjq"), SubResource("AtlasTexture_ksqgd"), SubResource("AtlasTexture_0x331"), SubResource("AtlasTexture_upfxh")]) -structure = NodePath("..") - -[node name="AdvancedRotation" type="Node" parent="." node_paths=PackedStringArray("structure", "sprite")] -script = ExtResource("6_mimwr") -structure = NodePath("..") -sprite = NodePath("../Sprite2D") - -[node name="Splitter" type="Node2D" parent="."] -script = ExtResource("7_0dkfh") diff --git a/scenes/structures/trash_can.tscn b/scenes/structures/trash_can.tscn deleted file mode 100644 index 3037501..0000000 --- a/scenes/structures/trash_can.tscn +++ /dev/null @@ -1,20 +0,0 @@ -[gd_scene load_steps=6 format=3 uid="uid://dpsrwmum6rbmi"] - -[ext_resource type="Script" uid="uid://bbd7o2st8kmgl" path="res://scripts/structure.gd" id="1_818vg"] -[ext_resource type="Script" uid="uid://conadqnb0asi0" path="res://scripts/inventory/void_inventory.gd" id="3_y1ram"] -[ext_resource type="Texture2D" uid="uid://gfkhedfdi7ug" path="res://sprites/atlasses/Popekko.png" id="5_y1ram"] - -[sub_resource type="Resource" id="Resource_818vg"] -script = ExtResource("3_y1ram") -metadata/_custom_type_script = "uid://conadqnb0asi0" - -[sub_resource type="AtlasTexture" id="AtlasTexture_lldoj"] -atlas = ExtResource("5_y1ram") -region = Rect2(80, 0, 16, 16) - -[node name="TrashCan" type="Node2D"] -script = ExtResource("1_818vg") -inventory = SubResource("Resource_818vg") - -[node name="Sprite2D" type="Sprite2D" parent="."] -texture = SubResource("AtlasTexture_lldoj") diff --git a/scripts/autoloads/belt_manager.gd b/scripts/autoloads/belt_manager.gd deleted file mode 100644 index 3e4f8da..0000000 --- a/scripts/autoloads/belt_manager.gd +++ /dev/null @@ -1,10 +0,0 @@ -extends Node - -# TODO: Use this autoload for conveyor optimizations - -var sync_time : float - -func _process(delta: float) -> void: - sync_time += delta - if sync_time > 1: - sync_time -= 1 diff --git a/scripts/autoloads/belt_manager.gd.uid b/scripts/autoloads/belt_manager.gd.uid deleted file mode 100644 index 0b0f993..0000000 --- a/scripts/autoloads/belt_manager.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://damurnhtipmga diff --git a/scripts/autoloads/registry.gd b/scripts/autoloads/registry.gd deleted file mode 100644 index 76dbf46..0000000 --- a/scripts/autoloads/registry.gd +++ /dev/null @@ -1,2 +0,0 @@ -## Global class for runtime -extends Node diff --git a/scripts/autoloads/registry.gd.uid b/scripts/autoloads/registry.gd.uid deleted file mode 100644 index 7622181..0000000 --- a/scripts/autoloads/registry.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://coqgbea1uchn4 diff --git a/scripts/autoloads/runtime_player_data.gd b/scripts/autoloads/runtime_player_data.gd deleted file mode 100644 index 4f199b3..0000000 --- a/scripts/autoloads/runtime_player_data.gd +++ /dev/null @@ -1,12 +0,0 @@ -## Global class for player in-game data - -extends Node - -func _ready() -> void: - get_tree().scene_changed.connect(cleanup_runtime_cache) - -## Method to cleanup all data that will be nulled -func cleanup_runtime_cache(): - build_zones.clear() - -var build_zones : Array[PlacementZone] diff --git a/scripts/autoloads/runtime_player_data.gd.uid b/scripts/autoloads/runtime_player_data.gd.uid deleted file mode 100644 index 932a60a..0000000 --- a/scripts/autoloads/runtime_player_data.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bmowwtsy0f8mf diff --git a/scripts/autoloads/ticker.gd b/scripts/autoloads/ticker.gd deleted file mode 100644 index 6a6a1a6..0000000 --- a/scripts/autoloads/ticker.gd +++ /dev/null @@ -1,16 +0,0 @@ -extends Timer - -const tics_per_second :float = 32.0 -signal tick(current_tick: int) - -var current_tick: int - -func _ready() -> void: - start(1.0/tics_per_second) - timeout.connect(make_tick) - -func make_tick(): - current_tick += 1 - if current_tick >= tics_per_second: - current_tick -= int(tics_per_second) - tick.emit(current_tick) diff --git a/scripts/autoloads/ticker.gd.uid b/scripts/autoloads/ticker.gd.uid deleted file mode 100644 index 16fc4de..0000000 --- a/scripts/autoloads/ticker.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://cl3bqbr52mwfl diff --git a/scripts/globals.gd b/scripts/globals.gd deleted file mode 100644 index 1706fcb..0000000 --- a/scripts/globals.gd +++ /dev/null @@ -1,13 +0,0 @@ -@abstract -extends Object - -class_name Globals - -const GRID_SIZE : Vector2 = Vector2(16,16) - -enum Sides { - RIGHT, - DOWN, - LEFT, - UP -} diff --git a/scripts/globals.gd.uid b/scripts/globals.gd.uid deleted file mode 100644 index 4bb6907..0000000 --- a/scripts/globals.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bnmjkc8vfd7mo diff --git a/scripts/grid_controller.gd b/scripts/grid_controller.gd deleted file mode 100644 index ccfee4e..0000000 --- a/scripts/grid_controller.gd +++ /dev/null @@ -1,54 +0,0 @@ -extends Node2D - -# TODO: Make able to hold multiple placement zones, supporting uniform forms - -## Class that contains all structures of platform - -class_name GridController - - -## Building zone controller uses for checks and capacity -@export var building_zone : PlacementZone - -## Internal structure storage -var structures : Array[Structure] - -func _ready() -> void: - structures.resize(building_zone.get_capacity()) - -## Tries to add structure to its internal storage [br] -## Returns false if has colliding structures -func add_structure(structure : Structure) -> bool: - var structure_dp = structure.get_dimension_points() - for point in structure_dp: - if structures[building_zone.indexify_global_point(structure.global_position + point)]: - return false - structure.reparent(self) - structure.global_position = building_zone.get_placement_position(structure.global_position) - - for point in structure_dp: - structures[building_zone.indexify_global_point(structure.global_position + point)] = structure - return true - -## Returns structure at point. [br] -## Returns null if no structure is at point -func get_at(point : Vector2) -> Structure: - var index = building_zone.indexify_global_point(point) - if index == -1: - return null - return structures[index] - -func destroy_at(point : Vector2) -> void: - var index = building_zone.indexify_global_point(point) - if index == -1: - return - - var found: Structure = structures[index] - - for dim_point in found.get_dimension_points(): - structures[building_zone.indexify_global_point(found.global_position+dim_point)] = null - - found.queue_free() - -func is_point_occupied(point : Vector2) -> bool: - return get_at(point) != null diff --git a/scripts/grid_controller.gd.uid b/scripts/grid_controller.gd.uid deleted file mode 100644 index bdbbaf2..0000000 --- a/scripts/grid_controller.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://x5edy155eg0s diff --git a/scripts/gui/construction_button.gd b/scripts/gui/construction_button.gd deleted file mode 100644 index 6e1ec9d..0000000 --- a/scripts/gui/construction_button.gd +++ /dev/null @@ -1,13 +0,0 @@ -extends Button - -class_name ConstructionButton - -var prototype : Prototype: - set(value): - prototype = value - icon = prototype.preview - get: - return prototype - -func _pressed() -> void: - GuiEventBus.construction_selected.emit(prototype) diff --git a/scripts/gui/construction_button.gd.uid b/scripts/gui/construction_button.gd.uid deleted file mode 100644 index 9a1f1fd..0000000 --- a/scripts/gui/construction_button.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://db37xmo8ygwhg diff --git a/scripts/gui/construction_buttons_generator.gd b/scripts/gui/construction_buttons_generator.gd deleted file mode 100644 index c90afd3..0000000 --- a/scripts/gui/construction_buttons_generator.gd +++ /dev/null @@ -1,11 +0,0 @@ -extends Node - -const button = preload("res://scenes/gui/construction_button.tscn") - -func _ready() -> void: - for file in ResourceLoader.list_directory("res://generic/prototypes/"): - var btn = button.instantiate() - var loaded_prototype : Prototype = ResourceLoader.load("res://generic/prototypes/"+file) - - btn.get_node("Button").prototype = loaded_prototype - add_child(btn) diff --git a/scripts/gui/construction_buttons_generator.gd.uid b/scripts/gui/construction_buttons_generator.gd.uid deleted file mode 100644 index c591d53..0000000 --- a/scripts/gui/construction_buttons_generator.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bnjwg4rlcfd8k diff --git a/scripts/gui/gui_event_bus.gd b/scripts/gui/gui_event_bus.gd deleted file mode 100644 index eee3359..0000000 --- a/scripts/gui/gui_event_bus.gd +++ /dev/null @@ -1,6 +0,0 @@ -extends Node - -@warning_ignore_start("unused_signal") - -signal construction_selected(prototype : Prototype) -signal construction_placed(prototype : Prototype) diff --git a/scripts/gui/gui_event_bus.gd.uid b/scripts/gui/gui_event_bus.gd.uid deleted file mode 100644 index 6d15cfc..0000000 --- a/scripts/gui/gui_event_bus.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://x5eghpenp777 diff --git a/scripts/inventory/advanced_rotation.gd b/scripts/inventory/advanced_rotation.gd deleted file mode 100644 index f55a2b6..0000000 --- a/scripts/inventory/advanced_rotation.gd +++ /dev/null @@ -1,15 +0,0 @@ -extends Node - -@export var structure : Structure -@export var sprite : Sprite2D - -@onready var initial_dimensions : Rect2i = structure.dimensions -@onready var initial_offset : Vector2 = sprite.offset - -func _ready() -> void: - structure.changed_direction.connect(on_changed_direction) - -func on_changed_direction(to: float,max_directions : int): - var calculated_size = Vector2(initial_dimensions.size).rotated(to).abs().ceil() - structure.dimensions = Rect2i(initial_dimensions.position,calculated_size) - sprite.offset = initial_offset.rotated(to).abs() diff --git a/scripts/inventory/advanced_rotation.gd.uid b/scripts/inventory/advanced_rotation.gd.uid deleted file mode 100644 index f79c940..0000000 --- a/scripts/inventory/advanced_rotation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bml2n6vo5my0c diff --git a/scripts/inventory/belt_inventory.gd b/scripts/inventory/belt_inventory.gd deleted file mode 100644 index 9f673ea..0000000 --- a/scripts/inventory/belt_inventory.gd +++ /dev/null @@ -1,101 +0,0 @@ -@tool -extends Inventory - -class_name BeltInventory - -## Amount of stacks that can be held in storage -@export var capacity : int: - set(value): - if value < 0: - return - if value == capacity: - return - capacity = value - get: - return capacity - -@export var pop_treshold : float = 0.99 - -## :3 -@export_storage var internal_array : Array[InventorySlot] = [] - -func _init() -> void: - super() - deferred_init.call_deferred() - -func deferred_init(): - internal_array.resize(capacity) - for i in range(capacity): - internal_array[i] = InventorySlot.new() - -## Finds first entry of item. Returns -1 if no item found -func find(item : Item) -> int: - for i in range(capacity): - if internal_array[i].can_be_merged(item): - return i - return -1 - -## Tries to add an item into inventory. Returns not stored stack of item. -func add(stack: Stack, context: InventoryContext = null) -> Stack: - if context != null: - var ang_diff = (context.position - context.source.global_position).angle()-context.target.direction - if is_equal_approx(abs(ang_diff),PI/2): - if internal_array[capacity/2].amount != 0: - return null - stack_added.emit(stack,capacity/2) - internal_array[capacity/2].merge_stack(stack) - return stack - elif is_equal_approx(abs(ang_diff), PI): - if internal_array[capacity-1].amount != 0: - return null - stack_added.emit(stack,capacity-1) - internal_array[capacity-1].merge_stack(stack) - return stack - if internal_array[0].amount != 0: - return null - stack_added.emit(stack,0) - internal_array[0].merge_stack(stack) - return stack - - -func can_add(_item : Item = null, context : InventoryContext = null) -> bool: - if context != null: - var ang_diff = (context.position - context.source.global_position).angle()-context.target.direction - if is_equal_approx(abs(ang_diff),PI/2): - return internal_array[capacity/2].amount == 0 - elif is_equal_approx(abs(ang_diff),PI): - return internal_array[capacity-1].amount == 0 - return internal_array[0].amount == 0 - -## Tries to take first item. Returns null if no items in inventory -func pop() -> Stack: - if internal_array[capacity-1].amount == 0: - return null - stack_taken.emit(internal_array[capacity-1], capacity-1) - return internal_array[capacity-1].extract() - -func peek() -> Stack: - if internal_array[capacity-1].amount == 0: - return null - return internal_array[capacity-1].as_stack() - -func advance() -> void: - for i in range(capacity-1,0,-1): - if internal_array[i].amount == 0 and internal_array[0].updated == false: - var extracted_stack = internal_array[i-1].extract() - internal_array[i].merge_stack(extracted_stack) - if extracted_stack != null and extracted_stack.is_valid(): - internal_array[i-1].merge_stack(extracted_stack) - -## Tries to take certain item from inventory. Returns null if no item found -func take(item: Item,amount: int) -> Stack: - var found = find(item) - if found == -1: - return null - var extracted = internal_array[found].extract_stack(amount) - stack_taken.emit(extracted,found) - return extracted - -func refresh() -> void: - for i in range(capacity): - internal_array[i].updated = false diff --git a/scripts/inventory/belt_inventory.gd.uid b/scripts/inventory/belt_inventory.gd.uid deleted file mode 100644 index 20d29ae..0000000 --- a/scripts/inventory/belt_inventory.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://v0hkuo3gda1b diff --git a/scripts/inventory/in_out_inventory.gd b/scripts/inventory/in_out_inventory.gd deleted file mode 100644 index 27ef63b..0000000 --- a/scripts/inventory/in_out_inventory.gd +++ /dev/null @@ -1,77 +0,0 @@ -@tool -extends Inventory - -class_name InOutInventory - -@export var input_capacity : int -@export var output_capacity : int - -@export_storage var input_array : Array[InventorySlot] -@export_storage var output_slot : InventorySlot - -func resize() -> void: - input_array.resize(input_capacity) - for i in range(input_capacity): - input_array[i] = InventorySlot.new() - output_slot = InventorySlot.new() - -func _init() -> void: - super() - resize.call_deferred() - -func add(stack : Stack, _context: InventoryContext = null) -> Stack: - if stack == null: - return stack - for i in range(input_capacity): - if input_array[i].can_be_merged(stack.held_item): - stack_added.emit(stack,i) - input_array[i].merge_stack(stack) - if stack.is_valid() == false: - return null - return stack - -func can_add(item : Item = null, _context: InventoryContext = null) -> bool: - if item == null: - return false - else: - for i in range(input_capacity): - if input_array[i].can_be_merged(item): - return true - return false - - -## Tries to take first item. Returns null if no items in inventory -func pop() -> Stack: - if output_slot.held_item != null: - var extracted = output_slot.extract() - stack_taken.emit(extracted,0) - return extracted - return null - -func peek() -> Stack: - if output_slot.held_item != null: - var peeked = output_slot.as_stack() - return peeked - return null - -## Tries to take certain item from inventory. Returns null if no item found -func take(item: Item,amount: int) -> Stack: - if item != output_slot.filter: - return null - var extracted = output_slot.extract_stack(amount) - return extracted - -func find_input(item : Item) -> int: - for i in range(input_capacity): - if input_array[i].held_item == item: - return i - return -1 - -func find(item : Item) -> int: - if output_slot.held_item == item: - return 0 - return -1 - -func refresh() -> void: - for i in range(input_capacity): - input_array[i].updated = false diff --git a/scripts/inventory/in_out_inventory.gd.uid b/scripts/inventory/in_out_inventory.gd.uid deleted file mode 100644 index ce6b965..0000000 --- a/scripts/inventory/in_out_inventory.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://m6b6vawdqgqb diff --git a/scripts/inventory/inventory.gd b/scripts/inventory/inventory.gd deleted file mode 100644 index d2d0c05..0000000 --- a/scripts/inventory/inventory.gd +++ /dev/null @@ -1,41 +0,0 @@ -@abstract -extends Resource - -## Class that can hold items in it -class_name Inventory - -signal stack_added(item : Stack,position : int) -signal stack_taken(item : Stack,position : int) - -func _init() -> void: - resource_local_to_scene = true - -## Tries to add an item into inventory. Returns not stored stack of item. -@abstract -func add(stack : Stack, context: InventoryContext = null) -> Stack - -## Returns if conditions of adding are met -@abstract -func can_add(item : Item = null, context: InventoryContext = null) -> bool - -## Tries to take first item. Returns null if no items in inventory -@abstract -func pop() -> Stack - -@abstract -func peek() -> Stack - -## Tries to take certain item from inventory. Returns null if no item found -@abstract -func take(item : Item,amount: int) -> Stack - -## Finds first entry of item. Returns -1 if no item found -@abstract -func find(item : Item) -> int - -@abstract -func refresh() -> void - -## Does inventory have certain item? -func has(item : Item) -> bool: - return find(item) != -1 diff --git a/scripts/inventory/inventory.gd.uid b/scripts/inventory/inventory.gd.uid deleted file mode 100644 index 7f054ab..0000000 --- a/scripts/inventory/inventory.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://01aqkh38trcr diff --git a/scripts/inventory/inventory_context.gd b/scripts/inventory/inventory_context.gd deleted file mode 100644 index 9a77177..0000000 --- a/scripts/inventory/inventory_context.gd +++ /dev/null @@ -1,13 +0,0 @@ -extends RefCounted - -class_name InventoryContext - -func _init(_source: Structure, _target: Structure,_position: Vector2) -> void: - self.source = _source - self.target = _target - self.position = _position - - -var source : Structure -var target : Structure -var position : Vector2 diff --git a/scripts/inventory/inventory_context.gd.uid b/scripts/inventory/inventory_context.gd.uid deleted file mode 100644 index 2ce56c7..0000000 --- a/scripts/inventory/inventory_context.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://d3ytipk4nt11d diff --git a/scripts/inventory/inventory_slot.gd b/scripts/inventory/inventory_slot.gd deleted file mode 100644 index ee599b2..0000000 --- a/scripts/inventory/inventory_slot.gd +++ /dev/null @@ -1,105 +0,0 @@ -@tool -extends RefCounted - -class_name InventorySlot - -@export_storage var held_item : Item: - set(value): - if held_item == null and value != null: - held_item = value - amount += 1 - return - held_item = value - get: - return held_item - -@export_storage var amount : int: - set(value): - if value <= 0: - held_item = null - amount = 0 - return - if held_item == null: - amount = 0 - return - if value > held_item.stack_size: - amount = held_item.stack_size - return - amount = value - get: - return amount - -@export_storage var filter : Comparable -@export_storage var updated : bool - -## Get some amount of items from slot. Returns null if slot is empty -func extract_stack(extract_amount: int) -> Stack: - if amount == 0 or updated: - return null - - updated = true - - var return_stack : Stack - if extract_amount > amount: - return_stack = Stack.new(held_item,amount) - else: - return_stack = Stack.new(held_item,extract_amount) - - self.amount = 0 - - return return_stack - -## Extract entire stack from slot. Returns null if slot is empty -func extract() -> Stack: - if amount == 0 or updated: - return null - - updated = true - - var return_stack : Stack = Stack.new(held_item,amount) - self.amount = 0 - - return return_stack - -func as_stack() -> Stack: - if amount == 0: - return null - - var return_stack : Stack = Stack.new(held_item,amount) - - return return_stack - -func can_be_merged(item : Item) -> bool: - if updated: - return false - if filter != null: - return filter.is_equal(item) - if amount <= 0: - return true - return item == held_item - -## Add provided stack's amount to this amount. Returns null if stack is empty or items arent matching -func merge_stack(stack: Stack) -> bool: - if stack == null or stack.is_valid() == false or updated: - return false - - if filter and filter.is_equal(stack.held_item) == false: - return false - - updated = true - - if held_item == null: - held_item = stack.held_item - amount = stack.amount - stack.invalidate() - return true - - var delta_amount = stack.amount - (held_item.stack_size - amount) - amount += stack.amount - - if delta_amount <= 0: - stack.invalidate() - return true - - stack.amount = delta_amount - return true diff --git a/scripts/inventory/inventory_slot.gd.uid b/scripts/inventory/inventory_slot.gd.uid deleted file mode 100644 index ef6794d..0000000 --- a/scripts/inventory/inventory_slot.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bd4ojfqrl8idm diff --git a/scripts/inventory/splitter_inventory.gd b/scripts/inventory/splitter_inventory.gd deleted file mode 100644 index 3b1dca5..0000000 --- a/scripts/inventory/splitter_inventory.gd +++ /dev/null @@ -1,79 +0,0 @@ -@tool - -extends Inventory - -class_name SplitterInventory - -@export var capacity : int: - set(value): - if value < 0: - return - if value == capacity: - return - capacity = value - get: - return capacity - -@export_storage var upper_array : Array[InventorySlot] -@export_storage var down_array : Array[InventorySlot] - -func _init() -> void: - super() - deferred_init.call_deferred() - -func deferred_init(): - upper_array.resize(capacity) - down_array.resize(capacity) - for i in range(capacity): - upper_array[i] = InventorySlot.new() - down_array[i] = InventorySlot.new() - -func add(stack : Stack, context: InventoryContext = null) -> Stack: - if context == null or stack == null: - return stack - if context.position == context.target.global_position: - return add_to_array(stack,upper_array,context) - return add_to_array(stack,down_array,context) - -func add_to_array(stack: Stack, array: Array[InventorySlot], context: InventoryContext = null) -> Stack: - for i in range(len(array)): - if array[i].held_item == null or array[i].held_item == stack.held_item: - stack_added.emit(stack,i) - array[i].merge_stack(stack) - if stack.is_valid() == false: - return null - return stack - -func can_add(item : Item = null, context: InventoryContext = null) -> bool: - if context == null: - return false - if item == null: - for i in range(capacity): - if upper_array[i].amount == 0 or down_array[i].amount == 0: - return true - else: - for i in range(capacity): - if upper_array[i].amount == 0: - return upper_array[i].can_be_merged(item) - if down_array[i].amount ==0: - return down_array[i].can_be_merged(item) - return false - -func pop() -> Stack: - return null - -func peek() -> Stack: - return null - -## Tries to take certain item from inventory. Returns null if no item found -func take(item : Item,amount: int) -> Stack: - return null - -## Finds first entry of item. Returns -1 if no item found -func find(item : Item) -> int: - return -1 - -func refresh() -> void: - for i in range(capacity): - upper_array[i].updated = false - down_array[i].updated = false diff --git a/scripts/inventory/splitter_inventory.gd.uid b/scripts/inventory/splitter_inventory.gd.uid deleted file mode 100644 index d335a56..0000000 --- a/scripts/inventory/splitter_inventory.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://dlt3mbu6hk572 diff --git a/scripts/inventory/stack.gd b/scripts/inventory/stack.gd deleted file mode 100644 index 93767a2..0000000 --- a/scripts/inventory/stack.gd +++ /dev/null @@ -1,22 +0,0 @@ -extends RefCounted - -## Structure of item and amount of it. Basic object that more complex exchange - -class_name Stack - -func _init(item: Item = null, amount: int = 0) -> void: - held_item = item - self.amount = amount - -## Item in stack -@export_storage var held_item : Item - -## Amount of items in stack -@export_storage var amount : int - -func invalidate() -> void: - held_item = null - amount = 0 - -func is_valid() -> bool: - return held_item != null or amount > 0 diff --git a/scripts/inventory/stack.gd.uid b/scripts/inventory/stack.gd.uid deleted file mode 100644 index 582e453..0000000 --- a/scripts/inventory/stack.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://h78lmbi3vbfe diff --git a/scripts/inventory/storage.gd b/scripts/inventory/storage.gd deleted file mode 100644 index 8c43b85..0000000 --- a/scripts/inventory/storage.gd +++ /dev/null @@ -1,93 +0,0 @@ -@tool -extends Inventory - -## Base class for simple storages with no differentiation. - -class_name Storage - -## Amount of stacks that can be held in storage -@export var capacity : int: - set(value): - if value < 0: - return - if value == capacity: - return - capacity = value - get: - return capacity - -## :3 -@export_storage var internal_array : Array[InventorySlot] = [] - -func _init() -> void: - super() - deferred_init.call_deferred() - -func deferred_init(): - internal_array.resize(capacity) - for i in range(capacity): - internal_array[i] = InventorySlot.new() - -## Finds first entry of item. Returns -1 if no item found -func find(item : Item) -> int: - for i in range(len(internal_array)): - if internal_array[i].held_item == item: - return i - return -1 - -## Tries to add an item into inventory. Returns not stored stack of item. -func add(stack: Stack, _context: InventoryContext = null) -> Stack: - var found_index : int = find(stack.held_item) - if found_index != -1: - stack_added.emit(stack,found_index) - internal_array[found_index].merge_stack(stack) - if stack.is_valid() == false: - return null - for i in range(len(internal_array)): - if internal_array[i].can_be_merged(stack.held_item): - stack_added.emit(stack,i) - internal_array[i].merge_stack(stack) - if stack.is_valid() == false: - return null - return stack - -func can_add(item : Item = null, _context: InventoryContext = null) -> bool: - if item == null: - for i in range(capacity): - if internal_array[i].can_be_merged(item): - return true - return false - else: - for i in range(capacity): - if internal_array[i].can_be_merged(item): - return true - return false - -## Tries to take first item. Returns null if no items in inventory -func pop() -> Stack: - for i in range(len(internal_array)): - if internal_array[i].held_item != null: - var extracted = internal_array[i].extract() - stack_taken.emit(extracted,i) - return extracted - return null - -func peek() -> Stack: - for i in range(len(internal_array)): - if internal_array[i].held_item != null: - var peeked = internal_array[i].as_stack() - return peeked - return null - -## Tries to take certain item from inventory. Returns null if no item found -func take(item: Item,amount: int) -> Stack: - var found = find(item) - if found == -1: - return null - var extracted = internal_array[found].extract_stack(amount) - stack_taken.emit(extracted,found) - return extracted - -func refresh() -> void: - for i in range(capacity): - internal_array[i].updated = false diff --git a/scripts/inventory/storage.gd.uid b/scripts/inventory/storage.gd.uid deleted file mode 100644 index c57e4f9..0000000 --- a/scripts/inventory/storage.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://1scdy7mttx5h diff --git a/scripts/inventory/void_inventory.gd b/scripts/inventory/void_inventory.gd deleted file mode 100644 index 9b47eeb..0000000 --- a/scripts/inventory/void_inventory.gd +++ /dev/null @@ -1,32 +0,0 @@ -extends Inventory - -## Base class for simple storages with no differentiation. - -class_name VoidInventory - - -## Tries to add an item into inventory. Returns not stored stack of item. -func add(stack : Stack, context: InventoryContext = null) -> Stack: - return null - -## Returns if conditions of adding are met -func can_add(item : Item = null, context: InventoryContext = null) -> bool: - return true - -## Tries to take first item. Returns null if no items in inventory -func pop() -> Stack: - return null - -func peek() -> Stack: - return null - -## Tries to take certain item from inventory. Returns null if no item found -func take(item : Item,amount: int) -> Stack: - return null - -## Finds first entry of item. Returns -1 if no item found -func find(item : Item) -> int: - return -1 - -func refresh(): - pass diff --git a/scripts/inventory/void_inventory.gd.uid b/scripts/inventory/void_inventory.gd.uid deleted file mode 100644 index 17a3494..0000000 --- a/scripts/inventory/void_inventory.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://conadqnb0asi0 diff --git a/scripts/item.gd b/scripts/item.gd deleted file mode 100644 index f7c5a06..0000000 --- a/scripts/item.gd +++ /dev/null @@ -1,23 +0,0 @@ -extends Comparable - -## Base unit of manipulated objects - -class_name Item - -## Name of item that is displayed -@export var display_name : StringName - -## Preview in UI -@export var preview : Texture2D - -## Maximum amount of items that can be held in inventory -@export var stack_size : int - -@export var scene : PackedScene - -func is_equal(to: Comparable) -> bool: - if to is Item: - return to == self - elif to is ItemTag: - return self in to.items - return false diff --git a/scripts/item.gd.uid b/scripts/item.gd.uid deleted file mode 100644 index 182ac96..0000000 --- a/scripts/item.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://p5327ibxtyfs diff --git a/scripts/placement_manager.gd b/scripts/placement_manager.gd deleted file mode 100644 index 81a8e62..0000000 --- a/scripts/placement_manager.gd +++ /dev/null @@ -1,75 +0,0 @@ -extends Node2D - -## Currently held structure -var held_construction : Structure -var selected_prototype : Prototype -var delete_mode : bool = false - -func _ready() -> void: - GuiEventBus.construction_selected.connect(on_construction_selected) - -func _input(event: InputEvent) -> void: - - if event.is_action_pressed("plc_remove_toggle"): - delete_mode = not delete_mode - if held_construction: - held_construction.queue_free() - selected_prototype = null - - if event.is_action_pressed("plc_place") and delete_mode: - var zone : PlacementZone = try_get_zone(global_position) - if zone != null and zone.grid_controller.is_point_occupied(global_position): - zone.grid_controller.destroy_at(global_position) - - if event.is_action_pressed("plc_cancel") and delete_mode: - delete_mode = false - - if held_construction == null or delete_mode: - return - - if event.is_action_pressed("plc_place"): - var zone = try_get_zone(held_construction.global_position) - if zone != null and held_construction.try_place(zone): - var direction = held_construction.direction - held_construction = selected_prototype.scene.instantiate() - add_child(held_construction) - held_construction.set_direction(direction) - - if event.is_action_pressed("plc_rotate_up"): - if held_construction != null: - held_construction.increment_direction() - - if event.is_action_pressed("plc_rotate_down"): - if held_construction != null: - held_construction.decrement_direction() - - if event.is_action_pressed("plc_cancel"): - held_construction.queue_free() - selected_prototype = null - -func on_construction_selected(constructible : Prototype): - if delete_mode: - return - if held_construction: - held_construction.queue_free() - held_construction = constructible.scene.instantiate() - add_child(held_construction) - selected_prototype = constructible - - -func _process(_delta: float) -> void: - var mouse_pos = get_global_mouse_position() - if held_construction == null: - global_position = mouse_pos - return - var zone = try_get_zone(mouse_pos) - if zone and held_construction.can_be_placed(zone): - global_position = zone.get_placement_position(mouse_pos) - else: - global_position = mouse_pos - -func try_get_zone(point : Vector2) -> PlacementZone: - for zone in RuntimePlayerData.build_zones: - if zone.is_global_point_in_zone(point): - return zone - return null diff --git a/scripts/placement_manager.gd.uid b/scripts/placement_manager.gd.uid deleted file mode 100644 index c3447b2..0000000 --- a/scripts/placement_manager.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://b4nkk0ndqcto diff --git a/scripts/placement_zone.gd b/scripts/placement_zone.gd deleted file mode 100644 index 84d1efa..0000000 --- a/scripts/placement_zone.gd +++ /dev/null @@ -1,61 +0,0 @@ -@tool -@warning_ignore_start("integer_division") - -## Class that helps to manage construction sites -extends Marker2D - -class_name PlacementZone - -## Rect that used for bounds check and conversions -@export var building_rect : Rect2: - set(value): - building_rect = value - if Engine.is_editor_hint(): - queue_redraw() - get: - return building_rect - -@export var grid_controller : GridController - -func _ready() -> void: - if not Engine.is_editor_hint(): - RuntimePlayerData.build_zones.append(self) - -func _draw() -> void: - if Engine.is_editor_hint() and EditorInterface.get_inspector().get_edited_object() == self: - draw_rect(building_rect,Color.CYAN,false,1) - -## Returns true if point (local coordinates) in rect, else return false -func is_point_in_zone(point : Vector2) -> bool: - return building_rect.has_point(point) - -## Returns true if point (global coordinates) in rect, else return false -func is_global_point_in_zone(point: Vector2) -> bool: - return is_point_in_zone(to_local(point)) - -## Returns index of point (local coordinates) to be used in array -func indexify_point(point : Vector2) -> int: - if is_point_in_zone(point) == false: - return -1 - return int(point.x) / int(Globals.GRID_SIZE.x) + int(building_rect.size.x/Globals.GRID_SIZE.x)*(int(point.y) / int(Globals.GRID_SIZE.y)) - -## Returns index of point (global coordinates) to be used in array -func indexify_global_point(point : Vector2) -> int: - return indexify_point(to_local(point)) - -## Inverses indexification of point, returning snapped position -func inverse_index(index: int) -> Vector2: - return to_global(Vector2(index%int(building_rect.size.x/Globals.GRID_SIZE.x)*Globals.GRID_SIZE.x,index / int(building_rect.size.x/Globals.GRID_SIZE.x) * Globals.GRID_SIZE.y)) - -## Returns snapped position of point (global coordinates). -## Equivalent of [code] -## inverse_index(indexify_global_point(point)) -## [/code] -func get_placement_position(point : Vector2) -> Vector2: - if is_global_point_in_zone(point) == false: - return Vector2.ZERO - return to_global((to_local(point) / Globals.GRID_SIZE).floor()*Globals.GRID_SIZE + Globals.GRID_SIZE/2.0) - -## Returns capacity of building zone to be used in the array -func get_capacity() -> int: - return int(building_rect.size.x/Globals.GRID_SIZE.x)*int(building_rect.size.y/Globals.GRID_SIZE.y) diff --git a/scripts/placement_zone.gd.uid b/scripts/placement_zone.gd.uid deleted file mode 100644 index 76b0a4a..0000000 --- a/scripts/placement_zone.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://lw1ya3iu14uf diff --git a/scripts/prototype.gd b/scripts/prototype.gd deleted file mode 100644 index 83f60a9..0000000 --- a/scripts/prototype.gd +++ /dev/null @@ -1,11 +0,0 @@ -extends Resource - -## Player instantiatable resource - -class_name Prototype - -## Scene to instantiate -@export var scene : PackedScene - -## UI Preview -@export var preview : Texture2D diff --git a/scripts/prototype.gd.uid b/scripts/prototype.gd.uid deleted file mode 100644 index 01c18e4..0000000 --- a/scripts/prototype.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://c80sp6f77l5ha diff --git a/scripts/recipe/comparable.gd b/scripts/recipe/comparable.gd deleted file mode 100644 index 14c9cdf..0000000 --- a/scripts/recipe/comparable.gd +++ /dev/null @@ -1,7 +0,0 @@ -@abstract -extends Resource - -class_name Comparable - -@abstract -func is_equal(to: Comparable) -> bool diff --git a/scripts/recipe/comparable.gd.uid b/scripts/recipe/comparable.gd.uid deleted file mode 100644 index 4fa1576..0000000 --- a/scripts/recipe/comparable.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bqcyt8qnxvonj diff --git a/scripts/recipe/item_tag.gd b/scripts/recipe/item_tag.gd deleted file mode 100644 index 2202497..0000000 --- a/scripts/recipe/item_tag.gd +++ /dev/null @@ -1,12 +0,0 @@ -extends Comparable - -class_name ItemTag - -@export var items : Array[Item] - -func is_equal(to: Comparable) -> bool: - if to is Item: - return to in self.items - elif to is ItemTag: - return to == self - return false diff --git a/scripts/recipe/item_tag.gd.uid b/scripts/recipe/item_tag.gd.uid deleted file mode 100644 index e7448d8..0000000 --- a/scripts/recipe/item_tag.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://iasxpubh7f3i diff --git a/scripts/recipe/recipe.gd b/scripts/recipe/recipe.gd deleted file mode 100644 index 610c1fb..0000000 --- a/scripts/recipe/recipe.gd +++ /dev/null @@ -1,6 +0,0 @@ -extends Resource - -class_name Recipe - -@export var ingridients : Array[RecipePart] -@export var result : RecipePart diff --git a/scripts/recipe/recipe.gd.uid b/scripts/recipe/recipe.gd.uid deleted file mode 100644 index ea1d160..0000000 --- a/scripts/recipe/recipe.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://dl0i68ut0lw70 diff --git a/scripts/recipe/recipe_part.gd b/scripts/recipe/recipe_part.gd deleted file mode 100644 index 94b17a2..0000000 --- a/scripts/recipe/recipe_part.gd +++ /dev/null @@ -1,22 +0,0 @@ -extends Resource - -class_name RecipePart - -@export var item : Comparable -@export var amount : int - -func is_stack_sufficient(stack: Stack) -> bool: - return item.is_equal(stack.held_item) and stack.amount >= amount - -func consume_stack(stack: Stack) -> bool: - if is_stack_sufficient(stack) == false: - return false - stack.amount -= amount - return true - -func create_stack() -> Stack: - if item is Item: - return Stack.new(item,amount) - elif item is ItemTag: - return Stack.new(item.items[randi_range(0,len(item.items))],amount) - return null diff --git a/scripts/recipe/recipe_part.gd.uid b/scripts/recipe/recipe_part.gd.uid deleted file mode 100644 index fcc318d..0000000 --- a/scripts/recipe/recipe_part.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://w4v6jqv1ygqb diff --git a/scripts/structure.gd b/scripts/structure.gd deleted file mode 100644 index 004ed74..0000000 --- a/scripts/structure.gd +++ /dev/null @@ -1,86 +0,0 @@ -@tool -extends Node2D - -## Game object that interact with other structures in its grid space -class_name Structure - -signal changed_direction(to: float,max_directions : int) - -## Dimensions of structure in grid tiles -@export var dimensions : Rect2i = Rect2i(0,0,1,1): - set(value): - dimensions = value - if Engine.is_editor_hint(): - queue_redraw() - get: - return dimensions - -## Inventory of this structure -@export var inventory : Inventory -@export var direction : float -@export var maximum_directions : int - -## Debug draw of points -func _draw() -> void: - if Engine.is_editor_hint(): - for x in range(dimensions.size.x): - for y in range(dimensions.size.y): - draw_circle((dimensions.position+Vector2i(x,y)) * Vector2i(Globals.GRID_SIZE),2,Color.AQUA) - -## Get structure at tile coordinates relative to this structure [br] -## dv : Vector2 - get position in tiles [br] -func get_relative(dv : Vector2) -> Structure: - if get_parent() is GridController: - return get_parent().get_at(relative_tile_as_global(dv)) - return null - -func relative_tile_as_global(dv: Vector2) -> Vector2: - return global_position+dv*Globals.GRID_SIZE - -## Check structure is in zone and does not collide with any other structures [br] -## Returns true if structure is in zone and does not collide with any other structure [br] -## Returns false if structure is not in zone or does not collide with any other structure -func can_be_placed(zone : PlacementZone) -> bool: - for dp in get_dimension_points(): - var point = global_position + dp - if zone.is_global_point_in_zone(point) == false: - return false - if zone.grid_controller.is_point_occupied(point): - return false - return true - -## Tries to place structure in zone's grid controller -## Returns false if structure is not in zone or collides with any structure -func try_place(zone : PlacementZone) -> bool: - if can_be_placed(zone) == false: - return false - - return zone.grid_controller.add_structure(self) - -## Returns array of integer points in dimensions -func get_dimension_points() -> Array[Vector2]: - var result : Array[Vector2] = [] - result.resize(dimensions.size.x*dimensions.size.y) - for x in range(dimensions.size.x): - for y in range(dimensions.size.y): - result[x + y * dimensions.size.x] = (Vector2(x,y)*Globals.GRID_SIZE + Vector2(dimensions.position)) - return result - -func set_direction(to : float) -> void: - direction = to - changed_direction.emit(direction,maximum_directions) - -func increment_direction() -> void: - set_direction(wrapf(direction + TAU/maximum_directions,0,TAU)) - -func decrement_direction() -> void: - set_direction(wrapf(direction - TAU/maximum_directions,0,TAU)) - -func direction_vector() -> Vector2: - return Vector2.from_angle(direction) - -func direction_to(structure: Structure): - return (structure.global_position-global_position).angle() - -func direction_difference(structure: Structure): - return direction-structure.direction diff --git a/scripts/structure.gd.uid b/scripts/structure.gd.uid deleted file mode 100644 index ae15e42..0000000 --- a/scripts/structure.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bbd7o2st8kmgl diff --git a/scripts/structure_behaviour.gd b/scripts/structure_behaviour.gd deleted file mode 100644 index 8d845d1..0000000 --- a/scripts/structure_behaviour.gd +++ /dev/null @@ -1,12 +0,0 @@ -@abstract -extends Node2D - -class_name StructureBehaviour - -@onready var structure_parent : Structure = get_parent() - -func _ready() -> void: - Ticker.tick.connect(_tick) - -@abstract -func _tick(current_tick : int) -> void diff --git a/scripts/structure_behaviour.gd.uid b/scripts/structure_behaviour.gd.uid deleted file mode 100644 index f69df85..0000000 --- a/scripts/structure_behaviour.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://iidfsh0lirc2 diff --git a/scripts/structures/assembler.gd b/scripts/structures/assembler.gd deleted file mode 100644 index a39f447..0000000 --- a/scripts/structures/assembler.gd +++ /dev/null @@ -1,51 +0,0 @@ -extends StructureBehaviour - -@onready var inventory : InOutInventory = structure_parent.inventory -@export var selected_recipe : Recipe - - -func _ready() -> void: - inventory.stack_added.connect(check_for_recipe) - switch_recipe.call_deferred(selected_recipe) - -func switch_recipe(recipe: Recipe) -> void: - selected_recipe = recipe - inventory.input_capacity = len(selected_recipe.ingridients) - inventory.resize() - for i in range(len(selected_recipe.ingridients)): - inventory.input_array[i].filter = selected_recipe.ingridients[i].item - -func _tick(_current_tick : int) -> void: - if inventory.output_slot.amount <= 0: - return - inventory.refresh() - var output : Structure = get_output_structure() - if output == null: - return - var transfer_context : InventoryContext = InventoryContext.new(structure_parent,output,structure_parent.relative_tile_as_global(get_output_position())) - if output.inventory.can_add(inventory.output_slot.held_item,transfer_context): - inventory.output_slot.merge_stack(output.inventory.add(inventory.output_slot.extract(),transfer_context)) - -func get_output_structure() -> Structure: - var rotated = Vector2(1.5,-0.5).rotated(structure_parent.direction) - return structure_parent.get_relative(rotated+Vector2(0.5,0.5)) - -func get_output_position() -> Vector2: - return to_global(Vector2(1.5,-0.5).rotated(structure_parent.direction)+Vector2(0.5,0.5)) - -func check_for_recipe(_stack : Stack, _position : int) -> void: - var flag:bool = false - for i in range(inventory.input_capacity): - if inventory.input_array[i].can_be_merged(_stack.held_item): - flag = true - if flag == false: - return - for i in range(len(selected_recipe.ingridients)): - if inventory.input_array[i].amount < selected_recipe.ingridients[i].amount: - return - craft() - -func craft() -> void: - for i in range(len(selected_recipe.ingridients)): - inventory.input_array[i].extract_stack(selected_recipe.ingridients[i].amount) - inventory.output_slot.merge_stack(Stack.new(selected_recipe.result.item,selected_recipe.result.amount)) diff --git a/scripts/structures/assembler.gd.uid b/scripts/structures/assembler.gd.uid deleted file mode 100644 index c708baf..0000000 --- a/scripts/structures/assembler.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://c7mx3uatj6ulm diff --git a/scripts/structures/belt.gd b/scripts/structures/belt.gd deleted file mode 100644 index 46ca366..0000000 --- a/scripts/structures/belt.gd +++ /dev/null @@ -1,35 +0,0 @@ -extends StructureBehaviour - -@onready var inventory : BeltInventory = structure_parent.inventory - -func _draw() -> void: - for i in range(inventory.capacity): - if inventory.internal_array[i].amount > 0: - var calculated_position = calculate_position(i) - inventory.internal_array[i].held_item.preview.get_size()/2.0 - draw_texture(inventory.internal_array[i].held_item.preview,calculated_position) - -func _tick(current_tick: int) -> void: - queue_redraw() - if current_tick % 8 != 0: - return - inventory.refresh() - inventory.advance() - var next : Structure = get_next() - try_transfer(next) - -func calculate_position(index: int) -> Vector2: - var indexed_part = 16.0 / inventory.capacity - - return -structure_parent.direction_vector()*8 + structure_parent.direction_vector() * indexed_part * index - -func get_next() -> Structure: - return structure_parent.get_relative(structure_parent.direction_vector()) - -func try_transfer(structure : Structure) -> void: - if structure == null or inventory.internal_array[inventory.capacity-1].amount == 0: - return - var last_slot = inventory.internal_array[inventory.capacity-1] - var transfer_context : InventoryContext = InventoryContext.new(structure_parent,structure,to_global(structure_parent.direction_vector())) - if structure.inventory.can_add(last_slot.held_item,transfer_context) == false: - return - last_slot.merge_stack(structure.inventory.add(last_slot.extract(),transfer_context)) diff --git a/scripts/structures/belt.gd.uid b/scripts/structures/belt.gd.uid deleted file mode 100644 index 6ad2d67..0000000 --- a/scripts/structures/belt.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bp341eiwvfvyl diff --git a/scripts/structures/belt_animation_sync.gd b/scripts/structures/belt_animation_sync.gd deleted file mode 100644 index 8e5c11b..0000000 --- a/scripts/structures/belt_animation_sync.gd +++ /dev/null @@ -1,4 +0,0 @@ -extends AnimationPlayer - -func _ready() -> void: - seek.call_deferred(BeltManager.sync_time, true) diff --git a/scripts/structures/belt_animation_sync.gd.uid b/scripts/structures/belt_animation_sync.gd.uid deleted file mode 100644 index ac8565e..0000000 --- a/scripts/structures/belt_animation_sync.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://drsty3i1820ha diff --git a/scripts/structures/debug_item_deposit.gd b/scripts/structures/debug_item_deposit.gd deleted file mode 100644 index 1d1a4ff..0000000 --- a/scripts/structures/debug_item_deposit.gd +++ /dev/null @@ -1,15 +0,0 @@ -extends StructureBehaviour - -const inp1 := preload("res://generic/items/dbg_input1.tres") -const inp2 := preload("res://generic/items/dbg_input2.tres") -const out := preload("res://generic/items/dbg_output.tres") - -func _tick(_current_tick: int) -> void: - try_add(Vector2.UP,Stack.new(inp1,1)) - try_add(Vector2.DOWN,Stack.new(inp2,1)) - try_add(Vector2.RIGHT,Stack.new(out,1)) - -func try_add(dir: Vector2,stack : Stack): - var found = structure_parent.get_relative(dir) - if found != null and found.inventory != null: - found.inventory.add(stack) diff --git a/scripts/structures/debug_item_deposit.gd.uid b/scripts/structures/debug_item_deposit.gd.uid deleted file mode 100644 index ac93d72..0000000 --- a/scripts/structures/debug_item_deposit.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://v3j1d3qyg30i diff --git a/scripts/structures/directional_sprite.gd b/scripts/structures/directional_sprite.gd deleted file mode 100644 index d3a6c00..0000000 --- a/scripts/structures/directional_sprite.gd +++ /dev/null @@ -1,12 +0,0 @@ -extends Sprite2D - -@export var textures : Array[Texture] -@export var structure : Structure - -func _ready() -> void: - structure.changed_direction.connect(on_direction_changed) - -func on_direction_changed(to: float, max_directions: int) -> void: - var indexed_direction = to*max_directions/TAU - - texture = textures[indexed_direction] diff --git a/scripts/structures/directional_sprite.gd.uid b/scripts/structures/directional_sprite.gd.uid deleted file mode 100644 index cd56126..0000000 --- a/scripts/structures/directional_sprite.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://lchhqigib2t0 diff --git a/scripts/structures/splitter.gd b/scripts/structures/splitter.gd deleted file mode 100644 index 4c51bd0..0000000 --- a/scripts/structures/splitter.gd +++ /dev/null @@ -1,47 +0,0 @@ -extends StructureBehaviour - -@onready var inventory: SplitterInventory = structure_parent.inventory -var split: bool = true - -func get_upper_next() -> Vector2: - return Vector2.RIGHT.rotated(structure_parent.direction) - -func get_down_next() -> Vector2: - var base = get_upper_next() - return base + base.rotated(PI/2).abs() - -func _tick(current_tick: int) -> void: - if current_tick % 8 != 0: - return - inventory.refresh() - if has_non_empty(inventory.upper_array) == false and has_non_empty(inventory.down_array) == false: - return - var transfer_upper = try_transfer(get_upper_next(),false) - var transfer_down = try_transfer(get_down_next(),true) - if transfer_upper or transfer_down or not (transfer_down or transfer_upper): - inverse_split() - -func try_transfer(point:Vector2,down:bool) -> bool: - var next :Structure = structure_parent.get_relative(point) - - var array : Array[InventorySlot] = inventory.down_array if split != down else inventory.upper_array - if next == null: - return false - var context : InventoryContext = InventoryContext.new(structure_parent,next,to_global(point)) - for i in range(inventory.capacity): - if array[i].amount > 0 and next.inventory.can_add(array[i].held_item,context): - var stack = array[i].extract() - stack = next.inventory.add(stack,context) - array[i].merge_stack(stack) - - return true - return false - -func inverse_split() -> void: - split = not split - -func has_non_empty(array:Array[InventorySlot]) -> bool: - for i in range(inventory.capacity): - if array[i].amount > 0: - return true - return false diff --git a/scripts/structures/splitter.gd.uid b/scripts/structures/splitter.gd.uid deleted file mode 100644 index c2032d1..0000000 --- a/scripts/structures/splitter.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bac6ei0tpoiqe