A little folders cleanup

This commit is contained in:
2ndbeam 2024-05-14 22:01:33 +03:00
commit 545da7be1f
90 changed files with 68 additions and 1661 deletions

View file

@ -0,0 +1,49 @@
[gd_scene load_steps=3 format=3 uid="uid://c7is7y341f6wa"]
[sub_resource type="Theme" id="Theme_d8vjy"]
default_font_size = 48
[sub_resource type="GDScript" id="GDScript_6uw1d"]
resource_name = "pause_controller"
script/source = "extends Control
# TODO: implement save
## Resumes game
func _on_resume_button_up():
get_tree().current_scene.unpause()
## Saves profile and exits game
func _on_exit_button_up():
get_tree().current_scene.unpause()
get_tree().change_scene_to_file(\"res://scenes/MainMenu.tscn\")
#Game.profile_save(get_tree().current_scene)
"
[node name="PauseController" type="Control"]
process_mode = 2
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
theme = SubResource("Theme_d8vjy")
script = SubResource("GDScript_6uw1d")
[node name="Resume" type="Button" parent="."]
layout_mode = 0
offset_left = 444.0
offset_top = 254.0
offset_right = 779.0
offset_bottom = 329.0
text = "Resume game"
[node name="Exit" type="Button" parent="."]
layout_mode = 0
offset_left = 449.0
offset_top = 357.0
offset_right = 763.0
offset_bottom = 432.0
text = "Save and exit"
[connection signal="button_up" from="Resume" to="." method="_on_resume_button_up"]
[connection signal="button_up" from="Exit" to="." method="_on_exit_button_up"]

View file

@ -0,0 +1,51 @@
[gd_scene load_steps=11 format=3 uid="uid://kyuhwil8vq7n"]
[ext_resource type="Texture2D" uid="uid://bf8treonq7va1" path="res://sprites/star/star1.png" id="1_g74du"]
[ext_resource type="Texture2D" uid="uid://dbl6rw04dnuho" path="res://sprites/star/star2.png" id="2_pxcya"]
[ext_resource type="Texture2D" uid="uid://vndhtc8ymg2k" path="res://sprites/star/star3.png" id="3_plj80"]
[ext_resource type="Texture2D" uid="uid://cays6dmt6ucv7" path="res://sprites/star/star4.png" id="4_21ld8"]
[ext_resource type="Texture2D" uid="uid://du274dr3lf2es" path="res://sprites/star/star5.png" id="5_pyjfw"]
[ext_resource type="Texture2D" uid="uid://bm8tx4w1irp7s" path="res://sprites/star/star6.png" id="6_uxgjf"]
[ext_resource type="Texture2D" uid="uid://jbcvgid8o5f6" path="res://sprites/star/star7.png" id="7_3kjtu"]
[ext_resource type="Texture2D" uid="uid://dgp48jj1knk1y" path="res://sprites/star/star8.png" id="8_5xmav"]
[ext_resource type="Script" path="res://scripts/Star System/star.gd" id="9_kew3k"]
[sub_resource type="SpriteFrames" id="SpriteFrames_oggfj"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("1_g74du")
}, {
"duration": 1.0,
"texture": ExtResource("2_pxcya")
}, {
"duration": 1.0,
"texture": ExtResource("3_plj80")
}, {
"duration": 1.0,
"texture": ExtResource("4_21ld8")
}, {
"duration": 1.0,
"texture": ExtResource("5_pyjfw")
}, {
"duration": 1.0,
"texture": ExtResource("6_uxgjf")
}, {
"duration": 1.0,
"texture": ExtResource("7_3kjtu")
}, {
"duration": 1.0,
"texture": ExtResource("8_5xmav")
}],
"loop": true,
"name": &"default",
"speed": 8.0
}]
[node name="Star" type="AnimatedSprite2D"]
z_index = -19
sprite_frames = SubResource("SpriteFrames_oggfj")
autoplay = "default"
frame = 1
frame_progress = 0.66336
script = ExtResource("9_kew3k")

View file

@ -0,0 +1,22 @@
[gd_scene load_steps=3 format=3 uid="uid://dpggye27ln436"]
[ext_resource type="Script" path="res://scripts/Star System/stars_generator.gd" id="1_uxmpu"]
[ext_resource type="PackedScene" uid="uid://kyuhwil8vq7n" path="res://scenes/Star System/Required Scenes/star.tscn" id="2_ypr5c"]
[node name="Stars" type="ParallaxBackground"]
process_mode = 1
layer = -5
scroll_ignore_camera_zoom = true
script = ExtResource("1_uxmpu")
star = ExtResource("2_ypr5c")
[node name="CloseStars" type="ParallaxLayer" parent="."]
scale = Vector2(2, 2)
motion_scale = Vector2(0.9, 0.9)
[node name="DistinctStars" type="ParallaxLayer" parent="."]
scale = Vector2(1.5, 1.5)
motion_scale = Vector2(0.5, 0.5)
[node name="FarAwayStars" type="ParallaxLayer" parent="."]
motion_scale = Vector2(0.1, 0.1)

View file

@ -0,0 +1,20 @@
[gd_scene load_steps=3 format=3 uid="uid://crneq2enhxsw5"]
[ext_resource type="PackedScene" uid="uid://bsnrcw64qr2hr" path="res://scenes/Star Systems/star_system_template.tscn" id="1_2ai1l"]
[ext_resource type="PackedScene" uid="uid://dok3i8u5t1ka4" path="res://scenes/Ships/player_ship.tscn" id="7_jyplv"]
[node name="StarSystem" instance=ExtResource("1_2ai1l")]
width = 16384
height = 16384
[node name="Stars" parent="." index="0"]
scroll_offset = Vector2(681.667, 317.783)
stars_amount = 4000
[node name="Nebula" parent="Background" index="0" node_paths=PackedStringArray("tracked_node")]
tracked_node = NodePath("../../PlayerShip")
color_background = Color(0.276474, 0.0962249, 0.200656, 1)
[node name="PlayerShip" parent="." index="4" instance=ExtResource("7_jyplv")]
process_mode = 0
position = Vector2(19, 10)

View file

@ -0,0 +1,20 @@
[gd_scene load_steps=3 format=3 uid="uid://crneq2enhxsw5"]
[ext_resource type="PackedScene" uid="uid://bsnrcw64qr2hr" path="res://scenes/Star Systems/star_system_template.tscn" id="1_2ai1l"]
[ext_resource type="PackedScene" uid="uid://dok3i8u5t1ka4" path="res://scenes/Ships/player_ship.tscn" id="7_jyplv"]
[node name="StarSystem" instance=ExtResource("1_2ai1l")]
width = 16384
height = 16384
[node name="Stars" parent="." index="0"]
scroll_offset = Vector2(681.667, 317.783)
stars_amount = 4000
[node name="Nebula" parent="Background" index="0" node_paths=PackedStringArray("tracked_node")]
tracked_node = NodePath("../../PlayerShip")
color_background = Color(0.276474, 0.0962249, 0.200656, 1)
[node name="PlayerShip" parent="." index="4" instance=ExtResource("7_jyplv")]
process_mode = 0
position = Vector2(19, 10)

View file

@ -0,0 +1,32 @@
[gd_scene load_steps=6 format=3 uid="uid://crneq2enhxsw5"]
[ext_resource type="PackedScene" uid="uid://bsnrcw64qr2hr" path="res://scenes/Star System/star_system_template.tscn" id="1_2ai1l"]
[ext_resource type="PackedScene" uid="uid://dk3nvl8f0v24e" path="res://scenes/Base/base_template.tscn" id="3_m5ica"]
[ext_resource type="PackedScene" uid="uid://pev6k21vqaem" path="res://scenes/Ships/NPC Ships/kamikaze_ship.tscn" id="4_i6rbg"]
[ext_resource type="PackedScene" uid="uid://yso8f0y5kg50" path="res://scenes/Ships/NPC Ships/shooter_ship.tscn" id="5_o3ny8"]
[ext_resource type="PackedScene" uid="uid://dok3i8u5t1ka4" path="res://scenes/Ships/player_ship.tscn" id="7_jyplv"]
[node name="StarSystem" instance=ExtResource("1_2ai1l")]
width = 16384
height = 16384
[node name="Stars" parent="." index="0"]
scroll_offset = Vector2(681.667, 317.783)
stars_amount = 4000
[node name="Nebula" parent="Background" index="0" node_paths=PackedStringArray("tracked_node")]
tracked_node = NodePath("../../FactionPlayer/PlayerShip")
color_background = Color(0.276474, 0.0962249, 0.200656, 1)
[node name="PlayerShip" parent="FactionPlayer" index="0" instance=ExtResource("7_jyplv")]
process_mode = 0
position = Vector2(19, 10)
[node name="Base" parent="FactionPeaceful" index="0" instance=ExtResource("3_m5ica")]
position = Vector2(1706, -5)
[node name="KamikazeShip" parent="FactionAggressive" index="0" instance=ExtResource("4_i6rbg")]
position = Vector2(-244, -914)
[node name="ShooterShip" parent="FactionAggressive" index="1" instance=ExtResource("5_o3ny8")]
position = Vector2(-833, 1073)

View file

@ -0,0 +1,102 @@
[gd_scene load_steps=10 format=3 uid="uid://bsnrcw64qr2hr"]
[ext_resource type="Script" path="res://scripts/Star System/star_system.gd" id="1_xx8w2"]
[ext_resource type="PackedScene" uid="uid://dpggye27ln436" path="res://scenes/Star System/Required Scenes/star_generator.tscn" id="2_iqrn0"]
[ext_resource type="Script" path="res://scripts/Star System/projectile_container.gd" id="3_h5cm3"]
[ext_resource type="Material" uid="uid://bawhivm5cr2w" path="res://shaders/materials/nebula_shader.tres" id="4_o0ld7"]
[ext_resource type="Script" path="res://scripts/Star System/nebula.gd" id="5_la84n"]
[ext_resource type="PackedScene" uid="uid://c7is7y341f6wa" path="res://scenes/Star System/Required Scenes/pause_controller.tscn" id="6_61vq5"]
[ext_resource type="Script" path="res://scripts/Star System/faction.gd" id="7_wm3vi"]
[sub_resource type="GDScript" id="GDScript_4yoh5"]
resource_name = "version_label"
script/source = "extends Label
func _ready():
text = \"cosmic {version}\".format({\"version\" : Game.gameversion})
if OS.has_feature(\"editor\"):
text += \" uncompiled\\ndebug/prerelease version\"
else:
if Game.beta:
text += \" beta\\nclosed beta\"
"
[sub_resource type="GDScript" id="GDScript_r38d8"]
resource_name = "get_border_points"
script/source = "extends Line2D
@onready var star_system = get_parent()
func _ready():
var halved_width = star_system.width / 2
var halved_height = star_system.height / 2
points = [
Vector2(-halved_width + width, -halved_height + width),
Vector2(halved_width - width, -halved_height + width),
Vector2(halved_width - width, halved_height - width),
Vector2(-halved_width + width, halved_height - width)
]
"
[node name="StarSystem" type="Node"]
process_mode = 3
script = ExtResource("1_xx8w2")
pause_controller_scene = ExtResource("6_61vq5")
[node name="Stars" parent="." instance=ExtResource("2_iqrn0")]
[node name="ProjectileContainer" type="Node" parent="."]
process_mode = 1
script = ExtResource("3_h5cm3")
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="Version" type="Label" parent="CanvasLayer"]
z_index = 4096
z_as_relative = false
offset_top = 6.0
offset_right = 1280.0
offset_bottom = 29.0
text = "GammaCosmicRays version Ifre 1.0"
horizontal_alignment = 1
script = SubResource("GDScript_4yoh5")
[node name="Background" type="CanvasLayer" parent="."]
process_mode = 1
layer = -10
[node name="Nebula" type="ColorRect" parent="Background"]
z_index = -100
material = ExtResource("4_o0ld7")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("5_la84n")
color_background = Color(0.36, 0.18612, 0.1116, 1)
[node name="FactionPlayer" type="Node" parent="."]
script = ExtResource("7_wm3vi")
faction = 1
[node name="FactionPeaceful" type="Node" parent="."]
script = ExtResource("7_wm3vi")
faction = 2
[node name="FactionNeutral" type="Node" parent="."]
script = ExtResource("7_wm3vi")
faction = 3
[node name="FactionAggressive" type="Node" parent="."]
script = ExtResource("7_wm3vi")
faction = 4
[node name="SystemBorder" type="Line2D" parent="."]
z_index = -99
points = PackedVector2Array(0, 0, 1280, 0, 1280, 720, 0, 720)
closed = true
width = 8.0
default_color = Color(1, 1, 1, 0.521569)
script = SubResource("GDScript_r38d8")