Initial commit (1/2)

This commit is contained in:
Алкесей Мирнеков 2023-11-05 16:23:18 +03:00 committed by GitHub
commit 3411c5796d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 2261 additions and 0 deletions

24
scenes/Bounty.tscn Normal file
View file

@ -0,0 +1,24 @@
[gd_scene load_steps=3 format=3 uid="uid://d1bhrxmr0oo0n"]
[ext_resource type="Script" path="res://scripts/Bounty.gd" id="1_450ye"]
[sub_resource type="CircleShape2D" id="CircleShape2D_xkl60"]
radius = 32.0
[node name="Bounty" type="Area2D"]
collision_layer = 4
script = ExtResource("1_450ye")
[node name="Label" type="Label" parent="."]
offset_left = -27.0
offset_top = -13.0
offset_right = 28.0
offset_bottom = 13.0
text = "7-8 MU"
horizontal_alignment = 1
vertical_alignment = 1
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_xkl60")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

38
scenes/MainMenu.gd Normal file
View file

@ -0,0 +1,38 @@
extends Node2D
var MapWidth = 1280
var MapHeight = 720
var MenuID = 0
@onready var b1 = $Control/MenuButton1
@onready var b2 = $Control/MenuButton2
@onready var b3 = $Control/MenuButton3
@onready var b4 = $Control/MenuButton4
@onready var b5 = $Control/MenuButton5
func change_menu(id):
match id:
0:
b1.ID = "NewGame"
b2.ID = "Profiles"
b3.ID = "Settings"
b4.ID = "Credits"
b5.ID = "ExitGame"
1:
b1.ID = "CreateProfile"
b2.ID = "LoadProfile"
b3.ID = "DeleteProfile"
b4.ID = "Back"
b5.ID = "Null"
2:
b1.ID = ""
b2.ID = ""
b3.ID = ""
b4.ID = ""
b5.ID = ""
b1.change_name()
b2.change_name()
b3.change_name()
b4.change_name()
b5.change_name()

84
scenes/MainMenu.tscn Normal file
View file

@ -0,0 +1,84 @@
[gd_scene load_steps=9 format=3 uid="uid://s14kegpsyost"]
[ext_resource type="Script" path="res://scenes/MainMenu.gd" id="1_3gb4s"]
[ext_resource type="Shader" uid="uid://f6lhks6rp5jw" path="res://testicles.tres" id="1_on8wy"]
[ext_resource type="Gradient" uid="uid://c6bcjydbwm5id" path="res://scenes/SpaceGradient.tres" id="2_7racd"]
[ext_resource type="PackedScene" uid="uid://dpggye27ln436" path="res://scenes/StarsController.tscn" id="4_g7254"]
[ext_resource type="Script" path="res://scenes/MainMenuButton.gd" id="5_io856"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_rtgkw"]
frequency = 0.001
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_vkqxf"]
width = 1280
height = 720
color_ramp = ExtResource("2_7racd")
noise = SubResource("FastNoiseLite_rtgkw")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_dawi1"]
shader = ExtResource("1_on8wy")
shader_parameter/penis = SubResource("NoiseTexture2D_vkqxf")
[node name="MainMenu" type="Node2D"]
script = ExtResource("1_3gb4s")
[node name="ColorRect" type="ColorRect" parent="."]
z_index = -20
material = SubResource("ShaderMaterial_dawi1")
offset_right = 1280.0
offset_bottom = 720.0
[node name="Stars" parent="." instance=ExtResource("4_g7254")]
position = Vector2(640, 360)
StarsAmount = 100
[node name="Control" type="Control" parent="."]
layout_mode = 3
anchors_preset = 0
offset_right = 1280.0
offset_bottom = 720.0
[node name="MenuButton1" type="Button" parent="Control"]
layout_mode = 0
offset_left = 9.0
offset_top = 209.0
offset_right = 382.0
offset_bottom = 262.0
script = ExtResource("5_io856")
ID = "NewGame"
[node name="MenuButton2" type="Button" parent="Control"]
layout_mode = 0
offset_left = 9.0
offset_top = 276.0
offset_right = 382.0
offset_bottom = 329.0
script = ExtResource("5_io856")
ID = "CreateProfile"
[node name="MenuButton3" type="Button" parent="Control"]
layout_mode = 0
offset_left = 9.0
offset_top = 345.0
offset_right = 382.0
offset_bottom = 398.0
script = ExtResource("5_io856")
ID = "LoadProfile"
[node name="MenuButton4" type="Button" parent="Control"]
layout_mode = 0
offset_left = 9.0
offset_top = 417.0
offset_right = 382.0
offset_bottom = 470.0
script = ExtResource("5_io856")
ID = "Settings"
[node name="MenuButton5" type="Button" parent="Control"]
layout_mode = 0
offset_left = 8.0
offset_top = 488.0
offset_right = 381.0
offset_bottom = 541.0
script = ExtResource("5_io856")
ID = "ExitGame"

47
scenes/MainMenuButton.gd Normal file
View file

@ -0,0 +1,47 @@
extends Button
@export var ID = ""
@onready var Controller = $"../.."
func _ready():
button_up.connect(_on_button_up)
change_name()
func _on_button_up():
match ID:
"NewGame":
get_tree().change_scene_to_file("res://scenes/Space.tscn")
"CreateProfile":
Game.profile_create("1")
"LoadProfile":
Game.profile_load("1")
"ExitGame":
get_tree().quit()
func change_name():
visible = true
match ID:
"NewGame":
text = "New Game"
"CreateProfile":
text = "Create Profile"
"LoadProfile":
text = "Load Profile"
"DeleteProfile":
text = "Delete Profile"
"ExitGame":
text = "Exit Game"
"Settings":
text = "Settings (WIP)"
"AudioSettings":
text = "Audio (WIP)"
"VideoSettings":
text = "Video (WIP)"
"Profiles":
text = "Profiles (WIP)"
"Back":
text = "Back"
"Null":
text = Game.gameversion
visible = false

215
scenes/MainShip.tscn Normal file
View file

@ -0,0 +1,215 @@
[gd_scene load_steps=16 format=3 uid="uid://ccrs28h3b2tfy"]
[ext_resource type="Script" path="res://scripts/MainShipScript.gd" id="1_h7kne"]
[ext_resource type="PackedScene" uid="uid://bbho4h6tg4jca" path="res://scenes/hulls/starterhull.tscn" id="2_r634y"]
[ext_resource type="PackedScene" uid="uid://20171x3gmn1j" path="res://scenes/engines/starterengine.tscn" id="3_upe7o"]
[ext_resource type="PackedScene" uid="uid://cf11711uqb42j" path="res://scenes/weapons/presets/SingleLaserMk1.tscn" id="4_s724s"]
[ext_resource type="Script" path="res://scripts/SpeedLine.gd" id="6_ckx3n"]
[ext_resource type="PackedScene" uid="uid://66m5gj2ufsop" path="res://scenes/shields/startershield.tscn" id="6_nihas"]
[ext_resource type="Script" path="res://scripts/CameraTweaks.gd" id="7_5jx81"]
[ext_resource type="Script" path="res://scripts/AmmoCounter.gd" id="9_h1i5f"]
[ext_resource type="Script" path="res://scripts/FuelCounter.gd" id="10_0lke7"]
[ext_resource type="Script" path="res://scripts/ShieldCounter.gd" id="10_2l5pr"]
[ext_resource type="Script" path="res://scripts/MoneyCounter.gd" id="11_8f548"]
[ext_resource type="Script" path="res://scripts/HPCounter.gd" id="11_ouonv"]
[ext_resource type="Script" path="res://scripts/PlayerPauseController.gd" id="13_8y0ow"]
[ext_resource type="PackedScene" uid="uid://dsmwg1rxedi3x" path="res://scenes/Minimap.tscn" id="14_o544g"]
[sub_resource type="LabelSettings" id="LabelSettings_hkik3"]
font_size = 48
[node name="MainShip" type="CharacterBody2D"]
process_mode = 1
collision_mask = 3
script = ExtResource("1_h7kne")
metadata/_edit_horizontal_guides_ = []
[node name="Hull" parent="." instance=ExtResource("2_r634y")]
[node name="Engine" parent="." instance=ExtResource("3_upe7o")]
[node name="PrimaryWeapon" type="Node2D" parent="."]
[node name="SingleLaser" parent="PrimaryWeapon" instance=ExtResource("4_s724s")]
position = Vector2(8, 0)
[node name="SecondaryWeapon" type="Node2D" parent="."]
[node name="Shield" parent="." instance=ExtResource("6_nihas")]
[node name="Camera" type="Camera2D" parent="."]
limit_left = -4096
limit_top = -4096
limit_right = 4096
limit_bottom = 4096
position_smoothing_speed = 200.0
script = ExtResource("7_5jx81")
[node name="Collision" type="CollisionPolygon2D" parent="."]
polygon = PackedVector2Array(0, -16, 32, 0, 0, 16, 0, 4, -4, 4, -8, 8, -8, -8, -4, -4, 0, -4)
[node name="GUI" type="CanvasLayer" parent="."]
[node name="Interface" type="Control" parent="GUI"]
z_index = 78
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="MainRectangle" type="Polygon2D" parent="GUI/Interface"]
position = Vector2(34, 651)
polygon = PackedVector2Array(0, 0, 175, 0, 175, 50, 0, 50)
[node name="InnerRectangle" type="Polygon2D" parent="GUI/Interface/MainRectangle"]
color = Color(0, 0, 0, 1)
polygon = PackedVector2Array(1, 1, 174, 1, 174, 49, 1, 49)
[node name="ZeroLine" type="Line2D" parent="GUI/Interface/MainRectangle"]
position = Vector2(-34, -651)
points = PackedVector2Array(59, 651, 59, 701)
width = 1.0
[node name="TurboLine" type="Line2D" parent="GUI/Interface/MainRectangle"]
position = Vector2(66, -651)
points = PackedVector2Array(59, 651, 59, 701)
width = 1.0
[node name="SpeedLine" type="Line2D" parent="GUI/Interface"]
position = Vector2(59, 676)
points = PackedVector2Array(0, 0, 0, 0)
width = 48.0
script = ExtResource("6_ckx3n")
[node name="FuelCounter" type="Label" parent="GUI/Interface"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 34.0
offset_top = 625.0
offset_right = -1071.0
offset_bottom = -69.0
grow_horizontal = 2
grow_vertical = 2
text = "Fuel: 1000/1000 units"
script = ExtResource("10_0lke7")
[node name="AmmoCounter" type="Label" parent="GUI/Interface"]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -63.0
offset_top = -42.0
offset_right = -13.0
offset_bottom = -16.0
grow_horizontal = 0
grow_vertical = 0
text = "ammo"
horizontal_alignment = 2
vertical_alignment = 2
script = ExtResource("9_h1i5f")
[node name="ShieldCounter" type="Label" parent="GUI/Interface"]
layout_mode = 0
offset_left = 34.0
offset_top = 580.0
offset_right = 239.0
offset_bottom = 606.0
text = "Shield Capacity: 8 / 8 units"
script = ExtResource("10_2l5pr")
[node name="HPCounter" type="Label" parent="GUI/Interface"]
layout_mode = 0
offset_left = 34.0
offset_top = 602.0
offset_right = 209.0
offset_bottom = 625.0
text = "Hull Strength: 30 / 30 units"
script = ExtResource("11_ouonv")
[node name="MoneyCounter" type="Label" parent="GUI/Interface"]
layout_mode = 0
offset_left = 34.0
offset_top = 558.0
offset_right = 250.0
offset_bottom = 584.0
text = "Available Money: 1000 units"
script = ExtResource("11_8f548")
[node name="PauseController" type="Control" parent="GUI/Interface"]
process_mode = 2
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("13_8y0ow")
[node name="UnpauseButton" type="Button" parent="GUI/Interface/PauseController"]
layout_mode = 0
offset_left = 311.0
offset_top = 253.0
offset_right = 982.0
offset_bottom = 365.0
mouse_filter = 1
text = "Resume"
[node name="ExitButton" type="Button" parent="GUI/Interface/PauseController"]
layout_mode = 0
offset_left = 312.0
offset_top = 378.0
offset_right = 983.0
offset_bottom = 492.0
text = "Quit to main menu"
[node name="Label" type="Label" parent="GUI/Interface/PauseController"]
layout_mode = 0
offset_left = 413.0
offset_top = 108.0
offset_right = 881.0
offset_bottom = 178.0
text = "The game is paused."
label_settings = SubResource("LabelSettings_hkik3")
[node name="VersionLabel" type="Label" parent="GUI/Interface"]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -153.0
offset_bottom = 26.0
grow_horizontal = 0
text = "GammaCosmicRays version Ictar 1.1 unbuilt
This is a debug version for internal usage."
horizontal_alignment = 2
[node name="CanvasLayer" type="CanvasLayer" parent="."]
layer = 2
[node name="Control" type="Control" parent="CanvasLayer"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="Minimap" parent="CanvasLayer/Control" instance=ExtResource("14_o544g")]
layout_mode = 1
offset_left = 543.0
offset_top = 528.0
offset_right = 543.0
offset_bottom = 527.76
[connection signal="button_up" from="GUI/Interface/PauseController/UnpauseButton" to="GUI/Interface/PauseController" method="_on_unpause_button_button_up"]
[connection signal="button_up" from="GUI/Interface/PauseController/ExitButton" to="GUI/Interface/PauseController" method="_on_exit_button_button_up"]

20
scenes/Minimap.tscn Normal file
View file

@ -0,0 +1,20 @@
[gd_scene load_steps=4 format=3 uid="uid://dsmwg1rxedi3x"]
[ext_resource type="Script" path="res://scripts/Minimap.gd" id="1_8abec"]
[ext_resource type="Texture2D" uid="uid://dmvfwcq7wewxt" path="res://sprites/minimapoverlay.png" id="1_705ro"]
[ext_resource type="PackedScene" uid="uid://c7iafvpoopwc0" path="res://scenes/MinimapMarker.tscn" id="2_u2t3y"]
[node name="Minimap" type="Control"]
layout_mode = 3
anchor_right = 0.15
anchor_bottom = 0.267
offset_bottom = -0.240021
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("1_8abec")
MarkerPack = ExtResource("2_u2t3y")
[node name="Sprite" type="Sprite2D" parent="."]
position = Vector2(96, 96)
texture = ExtResource("1_705ro")

31
scenes/MinimapMarker.tscn Normal file
View file

@ -0,0 +1,31 @@
[gd_scene load_steps=6 format=3 uid="uid://c7iafvpoopwc0"]
[ext_resource type="Script" path="res://scripts/MinimapMarker.gd" id="1_j37jj"]
[ext_resource type="Texture2D" uid="uid://bavanv7ua7qlx" path="res://sprites/minimaphostile.png" id="2_pfl45"]
[ext_resource type="Texture2D" uid="uid://bqn08woclyoj0" path="res://sprites/minimapbase.png" id="3_sgrhe"]
[ext_resource type="Texture2D" uid="uid://b1kf1jbsnw2m3" path="res://sprites/minimapbounty.png" id="4_4lyow"]
[sub_resource type="SpriteFrames" id="SpriteFrames_7tbqy"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_pfl45")
}, {
"duration": 1.0,
"texture": ExtResource("3_sgrhe")
}, {
"duration": 1.0,
"texture": ExtResource("4_4lyow")
}],
"loop": true,
"name": &"default",
"speed": 0.0
}]
[node name="MinimapMarker" type="Node2D"]
script = ExtResource("1_j37jj")
[node name="MarkerSprite" type="AnimatedSprite2D" parent="."]
position = Vector2(82, 0)
sprite_frames = SubResource("SpriteFrames_7tbqy")
speed_scale = 0.0

90
scenes/Space.tscn Normal file
View file

@ -0,0 +1,90 @@
[gd_scene load_steps=13 format=3 uid="uid://14k35mkjwi5i"]
[ext_resource type="PackedScene" uid="uid://ccrs28h3b2tfy" path="res://scenes/MainShip.tscn" id="1_6fvpc"]
[ext_resource type="Script" path="res://scripts/Space.gd" id="1_ppaw3"]
[ext_resource type="PackedScene" uid="uid://dpggye27ln436" path="res://scenes/StarsController.tscn" id="3_jbyyq"]
[ext_resource type="Script" path="res://scripts/ProjectilesContainer.gd" id="4_dtv2c"]
[ext_resource type="PackedScene" uid="uid://dbtrc26016xov" path="res://scenes/StarterBase.tscn" id="5_bjt5p"]
[ext_resource type="PackedScene" uid="uid://523dme3h6d6c" path="res://scenes/npcships/NPCShipDefault.tscn" id="6_67746"]
[ext_resource type="Script" path="res://scripts/FactionRecoloring.gd" id="7_w8i61"]
[ext_resource type="Shader" uid="uid://f6lhks6rp5jw" path="res://testicles.tres" id="9_h8ucp"]
[ext_resource type="Gradient" uid="uid://c6bcjydbwm5id" path="res://scenes/SpaceGradient.tres" id="10_ijadn"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_tgq2a"]
noise_type = 3
frequency = 0.001
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_43qve"]
width = 4096
height = 4096
seamless = true
color_ramp = ExtResource("10_ijadn")
noise = SubResource("FastNoiseLite_tgq2a")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_s2aaw"]
shader = ExtResource("9_h8ucp")
shader_parameter/penis = SubResource("NoiseTexture2D_43qve")
[node name="Space" type="Node2D"]
process_mode = 3
script = ExtResource("1_ppaw3")
[node name="MainShip" parent="." instance=ExtResource("1_6fvpc")]
[node name="Stars" parent="." instance=ExtResource("3_jbyyq")]
[node name="Projectiles" type="Node2D" parent="."]
process_mode = 1
script = ExtResource("4_dtv2c")
[node name="StarterBase" parent="." instance=ExtResource("5_bjt5p")]
position = Vector2(208, 5)
rotation = -3.14159
[node name="EnemyFaction" type="Node2D" parent="."]
process_mode = 1
script = ExtResource("7_w8i61")
[node name="DefaultShip" parent="EnemyFaction" instance=ExtResource("6_67746")]
position = Vector2(-600, 930)
[node name="DefaultShip2" parent="EnemyFaction" instance=ExtResource("6_67746")]
position = Vector2(595, 956)
[node name="DefaultShip3" parent="EnemyFaction" instance=ExtResource("6_67746")]
position = Vector2(-28, 1361)
[node name="DefaultShip4" parent="EnemyFaction" instance=ExtResource("6_67746")]
position = Vector2(-588, -1151)
[node name="DefaultShip5" parent="EnemyFaction" instance=ExtResource("6_67746")]
position = Vector2(46, -1625)
[node name="DefaultShip6" parent="EnemyFaction" instance=ExtResource("6_67746")]
position = Vector2(639, -1166)
[node name="DefaultShip7" parent="EnemyFaction" instance=ExtResource("6_67746")]
position = Vector2(-1195, -764)
[node name="DefaultShip8" parent="EnemyFaction" instance=ExtResource("6_67746")]
position = Vector2(-1786, -202)
[node name="DefaultShip9" parent="EnemyFaction" instance=ExtResource("6_67746")]
position = Vector2(-1254, 416)
[node name="DefaultShip10" parent="EnemyFaction" instance=ExtResource("6_67746")]
position = Vector2(1201, -766)
[node name="DefaultShip11" parent="EnemyFaction" instance=ExtResource("6_67746")]
position = Vector2(1877, -168)
[node name="DefaultShip12" parent="EnemyFaction" instance=ExtResource("6_67746")]
position = Vector2(1212, 518)
[node name="ColorRect" type="ColorRect" parent="."]
z_index = -20
material = SubResource("ShaderMaterial_s2aaw")
offset_left = -4096.0
offset_top = -4096.0
offset_right = 4096.0
offset_bottom = 4096.0

View file

@ -0,0 +1,5 @@
[gd_resource type="Gradient" format=3 uid="uid://c6bcjydbwm5id"]
[resource]
offsets = PackedFloat32Array(0, 0.357724, 0.878049, 1)
colors = PackedColorArray(0.129412, 0, 0.129412, 1, 0, 0, 0, 1, 0, 0, 0.129412, 1, 0.0235294, 0.0784314, 0, 1)

50
scenes/Star.tscn Normal file
View file

@ -0,0 +1,50 @@
[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.gd" id="9_dvpaw"]
[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"]
self_modulate = Color(1, 1, 1, 0.501961)
z_index = -19
sprite_frames = SubResource("SpriteFrames_oggfj")
autoplay = "default"
script = ExtResource("9_dvpaw")

View file

@ -0,0 +1,9 @@
[gd_scene load_steps=3 format=3 uid="uid://dpggye27ln436"]
[ext_resource type="Script" path="res://scripts/StarsGeneration.gd" id="1_rcdwc"]
[ext_resource type="PackedScene" uid="uid://kyuhwil8vq7n" path="res://scenes/Star.tscn" id="2_ypr5c"]
[node name="Stars" type="Node2D"]
process_mode = 1
script = ExtResource("1_rcdwc")
Star = ExtResource("2_ypr5c")

57
scenes/StarterBase.tscn Normal file
View file

@ -0,0 +1,57 @@
[gd_scene load_steps=7 format=3 uid="uid://dbtrc26016xov"]
[ext_resource type="Texture2D" uid="uid://deabc107bimdb" path="res://sprites/space station 1.png" id="1_3ssyj"]
[ext_resource type="Script" path="res://scripts/StarterBase.gd" id="1_5xhqy"]
[ext_resource type="Script" path="res://scripts/BaseCollider.gd" id="2_18w83"]
[ext_resource type="Script" path="res://scripts/StarterBaseMenu.gd" id="2_53766"]
[ext_resource type="PackedScene" uid="uid://dj8iw5305ujrc" path="res://scenes/menus/StarterBaseMenu.tscn" id="4_jlcsy"]
[ext_resource type="Script" path="res://scripts/BaseNPCRotator.gd" id="5_kecih"]
[node name="StarterBase" type="Node2D"]
process_mode = 1
script = ExtResource("1_5xhqy")
[node name="Sprite" type="Sprite2D" parent="."]
rotation = -1.5708
texture = ExtResource("1_3ssyj")
[node name="BaseCollider" type="StaticBody2D" parent="."]
collision_layer = 2
collision_mask = 5
script = ExtResource("2_18w83")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="BaseCollider"]
polygon = PackedVector2Array(129, -32, 129, 32, 256, 63, 225, 192, 192, 225, 67, 256, -67, 256, -192, 225, -225, 192, -256, 67, -256, -67, -225, -192, -192, -225, -67, -256, 67, -256, 192, -225, 225, -192, 256, -67, 256, -63)
[node name="BaseColliderDetector" type="Area2D" parent="BaseCollider"]
collision_layer = 2
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="BaseCollider/BaseColliderDetector"]
polygon = PackedVector2Array(129, -32, 129, 32, 256, 63, 256, 61, 131, 30, 131, -30, 256, -61, 256, -63)
[node name="MenuCollider" type="Area2D" parent="."]
collision_layer = 8
script = ExtResource("2_53766")
Menu = ExtResource("4_jlcsy")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="MenuCollider"]
polygon = PackedVector2Array(129, 32, 256, 63, 256, -63, 129, -32)
[node name="NPCBlocker" type="StaticBody2D" parent="."]
collision_layer = 16
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="NPCBlocker"]
polygon = PackedVector2Array(129, 32, 256, 63, 256, -63, 129, -32)
[node name="NPCRotator" type="Area2D" parent="."]
collision_layer = 16
monitorable = false
script = ExtResource("5_kecih")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="NPCRotator"]
polygon = PackedVector2Array(129, -32, 129, 32, 257, 63, 226, 193, 192, 226, 67, 257, -67, 257, -193, 226, -226, 193, -257, 67, -257, -67, -226, -193, -193, -226, -67, -257, 67, -257, 193, -226, 226, -193, 257, -67, 257, -63)
[connection signal="body_entered" from="BaseCollider/BaseColliderDetector" to="MenuCollider" method="onbcbodyentered"]
[connection signal="body_entered" from="MenuCollider" to="MenuCollider" method="_on_body_entered"]
[connection signal="body_exited" from="MenuCollider" to="MenuCollider" method="_on_body_exited"]
[connection signal="body_entered" from="NPCRotator" to="NPCRotator" method="_on_body_entered"]

View file

@ -0,0 +1,81 @@
[gd_scene load_steps=11 format=3 uid="uid://20171x3gmn1j"]
[ext_resource type="Script" path="res://scripts/MSEngine.gd" id="1_jvcps"]
[ext_resource type="Texture2D" uid="uid://hpcn75jlrbr3" path="res://sprites/ship engine mk1.png" id="2_mll00"]
[ext_resource type="Script" path="res://scripts/MSEngineParticles.gd" id="3_fxngd"]
[ext_resource type="Script" path="res://scripts/TurboParticles.gd" id="4_f11x7"]
[sub_resource type="Curve" id="Curve_grs2w"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), -1.30258, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_wagku"]
curve = SubResource("Curve_grs2w")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_al11x"]
lifetime_randomness = 0.5
emission_shape = 3
emission_box_extents = Vector3(8, 1, 1)
particle_flag_disable_z = true
direction = Vector3(0, 1, 0)
spread = 15.0
gravity = Vector3(0, 0, 0)
initial_velocity_min = 50.0
initial_velocity_max = 100.0
orbit_velocity_min = 0.0
orbit_velocity_max = 0.0
scale_min = 0.5
scale_max = 2.0
scale_curve = SubResource("CurveTexture_wagku")
[sub_resource type="Curve" id="Curve_r1iqm"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), -1.7156, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_ot3qw"]
curve = SubResource("Curve_r1iqm")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_gd3um"]
lifetime_randomness = 0.5
emission_shape = 1
emission_sphere_radius = 1102.0
particle_flag_disable_z = true
direction = Vector3(0, 1, 0)
spread = 0.0
gravity = Vector3(0, 0, 0)
initial_velocity_min = 500.0
initial_velocity_max = 600.0
orbit_velocity_min = 0.0
orbit_velocity_max = 0.0
scale_min = 1.5
scale_max = 1.5
scale_curve = SubResource("CurveTexture_ot3qw")
[node name="Engine" type="Node2D"]
script = ExtResource("1_jvcps")
SpeedAcceleration = 100.0
RotationSpeed = 120
[node name="EngineSprite" type="Sprite2D" parent="."]
position = Vector2(-4, 0)
texture = ExtResource("2_mll00")
[node name="EngineParticles" type="GPUParticles2D" parent="."]
position = Vector2(-8, 0)
rotation = 1.5708
emitting = false
amount = 16
process_material = SubResource("ParticleProcessMaterial_al11x")
fixed_fps = 50
script = ExtResource("3_fxngd")
[node name="TurboParticles" type="GPUParticles2D" parent="."]
rotation = 1.5708
emitting = false
amount = 64
process_material = SubResource("ParticleProcessMaterial_gd3um")
randomness = 0.5
fixed_fps = 50
local_coords = true
trail_enabled = true
script = ExtResource("4_f11x7")

View file

@ -0,0 +1,12 @@
[gd_scene load_steps=3 format=3 uid="uid://dtshhww5culu4"]
[ext_resource type="Script" path="res://scripts/MSHull.gd" id="1_x0f7x"]
[ext_resource type="Texture2D" uid="uid://dbwvej0c5bl52" path="res://sprites/ship mk1.png" id="2_wlkiy"]
[node name="Hull" type="Node2D"]
script = ExtResource("1_x0f7x")
MaxHP = 15
[node name="HullSprite" type="Sprite2D" parent="."]
position = Vector2(16, 0)
texture = ExtResource("2_wlkiy")

View file

@ -0,0 +1,12 @@
[gd_scene load_steps=3 format=3 uid="uid://bbho4h6tg4jca"]
[ext_resource type="Script" path="res://scripts/MSHull.gd" id="1_em4j0"]
[ext_resource type="Texture2D" uid="uid://dbwvej0c5bl52" path="res://sprites/ship mk1.png" id="2_tvpkh"]
[node name="Hull" type="Node2D"]
script = ExtResource("1_em4j0")
MaxFuel = 6000
[node name="HullSprite" type="Sprite2D" parent="."]
position = Vector2(16, 0)
texture = ExtResource("2_tvpkh")

View file

@ -0,0 +1,12 @@
extends BuyMenuButton
func bought_action():
if PlayerShip.Hull.HP >= PlayerShip.Hull.MaxHP:
PlayerShip.Hull.HP = PlayerShip.Hull.MaxHP
PlayerShip.Money += Price
return
PlayerShip.Hull.HP += 1
while(PlayerShip.Hull.HP < PlayerShip.Hull.MaxHP and PlayerShip.Money >= Price):
PlayerShip.Hull.HP += 1
PlayerShip.Money -= Price
if PlayerShip.Hull.HP > PlayerShip.Hull.MaxHP: PlayerShip.Hull.HP = PlayerShip.Hull.MaxHP

View file

@ -0,0 +1,29 @@
extends BuyMenuButton
class_name BuyWeaponMenuButton
@export var AddedWeapon : String
@export var Slot : String = "primary"
@export var Position : Vector2 = Vector2.ZERO
@onready var PrimarySlot = get_tree().current_scene.get_node("MainShip/PrimaryWeapon")
@onready var SecondarySlot = get_tree().current_scene.get_node("MainShip/SecondaryWeapon")
@onready var BoughtWeapon = get_tree().current_scene.BoughtWeapon
@onready var WeaponDict = get_tree().current_scene.WeaponDict
func bought_action():
var SlotInst = PrimarySlot if Slot == "primary" else SecondarySlot
if !BoughtWeapon[AddedWeapon]:
BoughtWeapon[AddedWeapon] = true
else:
PlayerShip.Money += Price
if SlotInst.get_child_count() == 0:
var AddingWeapon = load(WeaponDict[AddedWeapon]).instantiate()
SlotInst.add_child(AddingWeapon)
SlotInst.position = Position
else:
for node in SlotInst.get_children():
node.queue_free()
var AddingWeapon = load(WeaponDict[AddedWeapon]).instantiate()
SlotInst.add_child(AddingWeapon)
SlotInst.position = Position

View file

@ -0,0 +1,16 @@
extends BuyMenuButton
@export var RocketsAmount : float = 5
@onready var RocketPrice : float = Price / RocketsAmount
func bought_action():
if PlayerShip.Hull.Ammunition["Rockets"] == PlayerShip.Hull.MaxAmmunition["Rockets"]: PlayerShip.Money += Price
else:
if PlayerShip.Hull.Ammunition["Rockets"] + RocketsAmount > PlayerShip.Hull.MaxAmmunition["Rockets"]:
var RocketsLeft = PlayerShip.Hull.MaxAmmunition["Rockets"] - PlayerShip.Hull.Ammunition["Rockets"]
for i in range(RocketsLeft + 1):
PlayerShip.Money += RocketPrice
PlayerShip.Hull.Ammunition["Rockets"] = PlayerShip.Hull.MaxAmmunition["Rockets"]
else:
PlayerShip.Hull.Ammunition["Rockets"] += RocketsAmount

View file

@ -0,0 +1,9 @@
extends BuyMenuButton
@export var TurboAmount : float = 1000
func bought_action():
if PlayerShip.Hull.Fuel == PlayerShip.Hull.MaxFuel: PlayerShip.Money += Price
else:
if PlayerShip.Hull.Fuel + TurboAmount > PlayerShip.Hull.MaxFuel: PlayerShip.Hull.Fuel = PlayerShip.Hull.MaxFuel
else: PlayerShip.Hull.Fuel += TurboAmount

View file

@ -0,0 +1,4 @@
extends MenuDefaultButton
func action():
get_tree().current_scene.recolor()

4
scenes/menus/ResetMS.gd Normal file
View file

@ -0,0 +1,4 @@
extends MenuDefaultButton
func action():
PlayerShip.destroy()

View file

@ -0,0 +1,364 @@
[gd_scene load_steps=9 format=3 uid="uid://dj8iw5305ujrc"]
[ext_resource type="Texture2D" uid="uid://db4euprxhape0" path="res://sprites/9s.png" id="1_osomq"]
[ext_resource type="Script" path="res://scenes/menus/BuyMenuTurbo.gd" id="2_0mgmw"]
[ext_resource type="Script" path="res://scenes/menus/BuyMenuHealth.gd" id="3_ciur0"]
[ext_resource type="Script" path="res://scenes/menus/BuyMenuRockets.gd" id="4_aae7g"]
[ext_resource type="Script" path="res://scenes/menus/BuyMenuLaser.gd" id="5_45gom"]
[ext_resource type="Script" path="res://scenes/menus/OptionsColors.gd" id="7_m7aa1"]
[ext_resource type="Script" path="res://scenes/menus/ResetMS.gd" id="8_uifkj"]
[sub_resource type="LabelSettings" id="LabelSettings_7bj0u"]
font_size = 14
[node name="StarterBaseMenu" type="Control"]
process_mode = 1
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="BuyMenu" type="NinePatchRect" parent="."]
layout_mode = 1
anchors_preset = -1
offset_left = 295.0
offset_top = 92.0
offset_right = 551.0
offset_bottom = 348.0
texture = ExtResource("1_osomq")
region_rect = Rect2(0, 0, 5, 5)
patch_margin_left = 2
patch_margin_top = 2
patch_margin_right = 2
patch_margin_bottom = 2
[node name="Option1" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("Clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
anchor_top = 0.008
anchor_right = 0.992
anchor_bottom = 0.211
offset_left = -0.0480001
offset_top = -0.0480001
offset_right = 0.0479889
offset_bottom = -0.0160027
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_osomq")
region_rect = Rect2(0, 0, 5, 5)
patch_margin_left = 2
patch_margin_top = 2
patch_margin_right = 2
patch_margin_bottom = 2
script = ExtResource("2_0mgmw")
Price = 50.0
Clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="BuyMenu/Option1"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 1.0
[node name="Label" type="Label" parent="BuyMenu/Option1"]
layout_mode = 0
offset_right = 251.0
offset_bottom = 52.0
text = "50 Money Units >> 1k Fuel Units
No refund"
label_settings = SubResource("LabelSettings_7bj0u")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Option2" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("Clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
anchor_top = 0.008
anchor_right = 0.992
anchor_bottom = 0.211
offset_left = -0.0480001
offset_top = 69.952
offset_right = 0.0480042
offset_bottom = 69.984
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_osomq")
region_rect = Rect2(0, 0, 5, 5)
patch_margin_left = 2
patch_margin_top = 2
patch_margin_right = 2
patch_margin_bottom = 2
script = ExtResource("3_ciur0")
Price = 2.0
Clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="BuyMenu/Option2"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 1.0
[node name="Label" type="Label" parent="BuyMenu/Option2"]
layout_mode = 0
offset_right = 251.0
offset_bottom = 52.0
text = "2 Money Units >> 1 Hull Strength
Up to a maximum"
label_settings = SubResource("LabelSettings_7bj0u")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Option3" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("Clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
anchor_top = 0.008
anchor_right = 0.992
anchor_bottom = 0.211
offset_left = -0.0480001
offset_top = 137.952
offset_right = 0.0480042
offset_bottom = 137.984
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_osomq")
region_rect = Rect2(0, 0, 5, 5)
patch_margin_left = 2
patch_margin_top = 2
patch_margin_right = 2
patch_margin_bottom = 2
script = ExtResource("4_aae7g")
Price = 20.0
Clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="BuyMenu/Option3"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 1.0
[node name="Label" type="Label" parent="BuyMenu/Option3"]
layout_mode = 0
offset_right = 251.0
offset_bottom = 52.0
text = "20 Money Units >> 5 Rockets
Refund if too many"
label_settings = SubResource("LabelSettings_7bj0u")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Option4" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("Clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
anchor_top = 0.008
anchor_right = 0.992
anchor_bottom = 0.211
offset_left = -0.0480001
offset_top = 199.952
offset_right = -155.952
offset_bottom = 199.984
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_osomq")
region_rect = Rect2(0, 0, 5, 5)
patch_margin_left = 2
patch_margin_top = 2
patch_margin_right = 2
patch_margin_bottom = 2
script = ExtResource("5_45gom")
AddedWeapon = "SingleRocketMk1"
Slot = "secondary"
Position = Vector2(16, 0)
Price = 200.0
Clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="BuyMenu/Option4"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 1.0
[node name="Label" type="Label" parent="BuyMenu/Option4"]
layout_mode = 0
offset_right = 96.0
offset_bottom = 52.0
text = "200 MU >> Sin
gleRocketMk1"
label_settings = SubResource("LabelSettings_7bj0u")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Option5" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("Clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
anchor_top = 0.008
anchor_right = 0.992
anchor_bottom = 0.211
offset_left = 96.952
offset_top = 199.952
offset_right = -59.952
offset_bottom = 199.984
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_osomq")
region_rect = Rect2(0, 0, 5, 5)
patch_margin_left = 2
patch_margin_top = 2
patch_margin_right = 2
patch_margin_bottom = 2
script = ExtResource("5_45gom")
AddedWeapon = "DoubleLaserMk1"
Position = Vector2(8, 0)
Price = 300.0
Clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="BuyMenu/Option5"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 1.0
[node name="Label" type="Label" parent="BuyMenu/Option5"]
layout_mode = 0
offset_right = 95.0
offset_bottom = 52.0
text = "300 MU >> Do
ubleLaserMk1"
label_settings = SubResource("LabelSettings_7bj0u")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Option6" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("Clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
anchor_top = 0.008
anchor_right = 0.992
anchor_bottom = 0.211
offset_left = 193.952
offset_top = 199.952
offset_right = 0.0480042
offset_bottom = 199.984
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_osomq")
region_rect = Rect2(0, 0, 5, 5)
patch_margin_left = 2
patch_margin_top = 2
patch_margin_right = 2
patch_margin_bottom = 2
script = ExtResource("5_45gom")
AddedWeapon = "SingleLaserMk1"
Position = Vector2(8, 0)
Clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="BuyMenu/Option6"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 1.0
[node name="Label" type="Label" parent="BuyMenu/Option6"]
layout_mode = 0
offset_right = 58.0
offset_bottom = 52.0
text = "SingleLa
serMk1"
label_settings = SubResource("LabelSettings_7bj0u")
horizontal_alignment = 1
vertical_alignment = 1
[node name="OptionsMenu" type="NinePatchRect" parent="."]
layout_mode = 1
anchors_preset = -1
offset_left = 695.0
offset_top = 91.0
offset_right = 951.0
offset_bottom = 347.0
texture = ExtResource("1_osomq")
region_rect = Rect2(0, 0, 5, 5)
patch_margin_left = 2
patch_margin_top = 2
patch_margin_right = 2
patch_margin_bottom = 2
[node name="Colors" type="NinePatchRect" parent="OptionsMenu" node_paths=PackedStringArray("Clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
anchor_top = 0.008
anchor_right = 0.992
anchor_bottom = 0.211
offset_left = -0.0480001
offset_top = -0.0480001
offset_right = 0.0479889
offset_bottom = -0.0160027
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_osomq")
region_rect = Rect2(0, 0, 5, 5)
patch_margin_left = 2
patch_margin_top = 2
patch_margin_right = 2
patch_margin_bottom = 2
script = ExtResource("7_m7aa1")
Clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="OptionsMenu/Colors"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 1.0
[node name="Label" type="Label" parent="OptionsMenu/Colors"]
layout_mode = 0
offset_right = 251.0
offset_bottom = 52.0
text = "Randomize colors"
label_settings = SubResource("LabelSettings_7bj0u")
horizontal_alignment = 1
vertical_alignment = 1
[node name="ResetMS" type="NinePatchRect" parent="OptionsMenu" node_paths=PackedStringArray("Clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
anchor_top = 0.008
anchor_right = 0.992
anchor_bottom = 0.211
offset_left = -0.0480001
offset_top = 72.952
offset_right = 0.0479889
offset_bottom = 72.984
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_osomq")
region_rect = Rect2(0, 0, 5, 5)
patch_margin_left = 2
patch_margin_top = 2
patch_margin_right = 2
patch_margin_bottom = 2
script = ExtResource("8_uifkj")
Clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="OptionsMenu/ResetMS"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 1.0
[node name="Label" type="Label" parent="OptionsMenu/ResetMS"]
layout_mode = 0
offset_right = 251.0
offset_bottom = 52.0
text = "Reset Main Ship"
label_settings = SubResource("LabelSettings_7bj0u")
horizontal_alignment = 1
vertical_alignment = 1

View file

@ -0,0 +1,75 @@
[gd_scene load_steps=9 format=3 uid="uid://523dme3h6d6c"]
[ext_resource type="Script" path="res://modules/npcship.gd" id="1_s20nu"]
[ext_resource type="PackedScene" uid="uid://d1bhrxmr0oo0n" path="res://scenes/Bounty.tscn" id="2_6fdps"]
[ext_resource type="PackedScene" uid="uid://cyskycafymwx" path="res://scenes/shields/npcshield.tscn" id="3_47apr"]
[ext_resource type="PackedScene" uid="uid://dtshhww5culu4" path="res://scenes/hulls/npchullt1.tscn" id="4_1ne0s"]
[ext_resource type="PackedScene" uid="uid://20171x3gmn1j" path="res://scenes/engines/starterengine.tscn" id="4_tguk3"]
[ext_resource type="PackedScene" uid="uid://dse2xxx501xuj" path="res://scenes/weapons/presets/NPCSingleLaserMk1.tscn" id="6_wnekw"]
[sub_resource type="CircleShape2D" id="CircleShape2D_k2lwx"]
radius = 64.0
[sub_resource type="LabelSettings" id="LabelSettings_21pok"]
font_size = 12
[node name="DefaultShip" type="CharacterBody2D" node_paths=PackedStringArray("DestinationTimer")]
process_mode = 1
collision_mask = 19
input_pickable = true
script = ExtResource("1_s20nu")
DestinationTimer = NodePath("DestinationTimer")
Bounty = ExtResource("2_6fdps")
[node name="Shield" parent="." instance=ExtResource("3_47apr")]
[node name="Hull" parent="." instance=ExtResource("4_1ne0s")]
[node name="Engine" parent="." instance=ExtResource("4_tguk3")]
[node name="Collision" type="CollisionPolygon2D" parent="."]
polygon = PackedVector2Array(0, -16, 32, 0, 0, 16, 0, 4, -4, 4, -8, 8, -8, -8, -4, -4, 0, -4)
[node name="WeaponSlot" type="Node2D" parent="."]
[node name="SingleLaser" parent="WeaponSlot" instance=ExtResource("6_wnekw")]
position = Vector2(8, 0)
ShootingAction = "npc"
[node name="DestinationTimer" type="Timer" parent="."]
wait_time = 5.0
autostart = true
[node name="TargetSnap" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="TargetSnap"]
position = Vector2(16, 0)
shape = SubResource("CircleShape2D_k2lwx")
[node name="RemoteTransform2D" type="RemoteTransform2D" parent="."]
remote_path = NodePath("../Zalupa/ZalupaTwo")
update_rotation = false
update_scale = false
[node name="Zalupa" type="Node" parent="."]
[node name="ZalupaTwo" type="Node2D" parent="Zalupa"]
[node name="Health" type="Label" parent="Zalupa/ZalupaTwo"]
layout_direction = 1
offset_left = -43.0
offset_top = -45.0
offset_right = 43.0
offset_bottom = -25.0
size_flags_horizontal = 4
text = "7-8 HP + 7-8 SC"
label_settings = SubResource("LabelSettings_21pok")
horizontal_alignment = 1
vertical_alignment = 1
[node name="DebugLabel" type="Label" parent="."]
visible = false
offset_left = -11.0
offset_top = -38.0
offset_right = 29.0
offset_bottom = -15.0

View file

@ -0,0 +1,24 @@
[gd_scene load_steps=3 format=3 uid="uid://djmoij5kuou3j"]
[ext_resource type="Script" path="res://modules/projectile.gd" id="1_plpqo"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mo2if"]
size = Vector2(1, 8)
[node name="Laser" type="Node2D" node_paths=PackedStringArray("Collider")]
script = ExtResource("1_plpqo")
Speed = 600.0
Collider = NodePath("Collision")
[node name="LaserBody" type="Line2D" parent="."]
points = PackedVector2Array(0, 0, 8, 0)
width = 1.0
[node name="Collision" type="Area2D" parent="."]
collision_layer = 4
collision_mask = 3
[node name="CollisionShape2D" type="CollisionShape2D" parent="Collision"]
position = Vector2(4, 0)
rotation = -1.5708
shape = SubResource("RectangleShape2D_mo2if")

View file

@ -0,0 +1,52 @@
[gd_scene load_steps=8 format=3 uid="uid://qr1h87np4sn1"]
[ext_resource type="Script" path="res://scripts/projectiles/Rocket.gd" id="1_h8tie"]
[ext_resource type="Texture2D" uid="uid://dvnqx6habw8uc" path="res://sprites/rocket mk1 1.png" id="2_g3qcb"]
[ext_resource type="Texture2D" uid="uid://dgxlnp520q1tp" path="res://sprites/rocket mk1 2.png" id="3_q1u7q"]
[ext_resource type="Texture2D" uid="uid://fqcylid4oa6b" path="res://sprites/rocket mk1 3.png" id="4_f2hwy"]
[ext_resource type="Texture2D" uid="uid://3nxmmp826b1s" path="res://sprites/rocket mk1 4.png" id="5_xas58"]
[sub_resource type="SpriteFrames" id="SpriteFrames_pnkh5"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_g3qcb")
}, {
"duration": 1.0,
"texture": ExtResource("3_q1u7q")
}, {
"duration": 1.0,
"texture": ExtResource("4_f2hwy")
}, {
"duration": 1.0,
"texture": ExtResource("5_xas58")
}],
"loop": true,
"name": &"default",
"speed": 16.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_65eo7"]
radius = 2.0
height = 12.0
[node name="Rocket" type="Node2D" node_paths=PackedStringArray("Collider")]
script = ExtResource("1_h8tie")
Speed = 400.0
RotationSpeed = 180.0
Damage = 10.0
Collider = NodePath("Collision")
[node name="RocketSprite" type="AnimatedSprite2D" parent="."]
position = Vector2(8, 0)
sprite_frames = SubResource("SpriteFrames_pnkh5")
frame_progress = 0.740876
[node name="Collision" type="Area2D" parent="."]
collision_layer = 4
collision_mask = 3
[node name="CollisionShape2D" type="CollisionShape2D" parent="Collision"]
position = Vector2(10, 0)
rotation = -1.5708
shape = SubResource("CapsuleShape2D_65eo7")

View file

@ -0,0 +1,17 @@
[gd_scene load_steps=2 format=3 uid="uid://cyskycafymwx"]
[ext_resource type="Script" path="res://scripts/MSShield.gd" id="1_3t0v2"]
[node name="Shield" type="Node2D" node_paths=PackedStringArray("RechargeTimer", "LaserTimer")]
script = ExtResource("1_3t0v2")
MaxShieldCapacity = 5
RechargeTimer = NodePath("Timer")
LaserTimer = NodePath("Timer2")
[node name="Timer2" type="Timer" parent="."]
wait_time = 5.0
one_shot = true
[node name="Timer" type="Timer" parent="."]
wait_time = 5.0
one_shot = true

View file

@ -0,0 +1,19 @@
[gd_scene load_steps=2 format=3 uid="uid://66m5gj2ufsop"]
[ext_resource type="Script" path="res://scripts/MSShield.gd" id="1_6qr86"]
[node name="Shield" type="Node2D" node_paths=PackedStringArray("RechargeTimer", "LaserTimer")]
script = ExtResource("1_6qr86")
MaxShieldCapacity = 10
ShieldChargeRate = 2.0
RechargeTimer = NodePath("Timer")
LaserTimer = NodePath("Timer2")
LaserChargeRate = 40.0
[node name="Timer2" type="Timer" parent="."]
wait_time = 5.0
one_shot = true
[node name="Timer" type="Timer" parent="."]
wait_time = 5.0
one_shot = true

View file

@ -0,0 +1,31 @@
[gd_scene load_steps=4 format=3 uid="uid://cb1dnh014jmpb"]
[ext_resource type="Script" path="res://modules/weapon.gd" id="1_u8yjv"]
[ext_resource type="PackedScene" uid="uid://djmoij5kuou3j" path="res://scenes/projectiles/Laser.tscn" id="2_cewjf"]
[ext_resource type="Texture2D" uid="uid://c3gei46k8muk3" path="res://sprites/laserbox.png" id="3_14fq6"]
[node name="DoubleLaser" type="Node2D" node_paths=PackedStringArray("ShootingTimer", "SpawnerPoints")]
script = ExtResource("1_u8yjv")
ShootingProjectile = ExtResource("2_cewjf")
ShootingTimer = NodePath("ShootingTimer")
SpawnerPoints = [NodePath("SpawnerSprite1/Spawner1"), NodePath("SpawnerSprite2/Spawner2")]
[node name="SpawnerSprite1" type="Sprite2D" parent="."]
position = Vector2(4, -12)
rotation = 0.0174533
texture = ExtResource("3_14fq6")
[node name="Spawner1" type="Node2D" parent="SpawnerSprite1"]
position = Vector2(4, 0)
[node name="SpawnerSprite2" type="Sprite2D" parent="."]
position = Vector2(4, 12)
rotation = -0.0174533
texture = ExtResource("3_14fq6")
[node name="Spawner2" type="Node2D" parent="SpawnerSprite2"]
position = Vector2(4, 0)
[node name="ShootingTimer" type="Timer" parent="."]
wait_time = 0.2
one_shot = true

View file

@ -0,0 +1,22 @@
[gd_scene load_steps=4 format=3 uid="uid://do1soxs2phq3v"]
[ext_resource type="Script" path="res://modules/weapon.gd" id="1_4ig05"]
[ext_resource type="Texture2D" uid="uid://c3gei46k8muk3" path="res://sprites/laserbox.png" id="2_7vlpw"]
[ext_resource type="PackedScene" uid="uid://djmoij5kuou3j" path="res://scenes/projectiles/Laser.tscn" id="2_w1ina"]
[node name="SingleLaser" type="Node2D" node_paths=PackedStringArray("ShootingTimer", "SpawnerPoints")]
script = ExtResource("1_4ig05")
ShootingProjectile = ExtResource("2_w1ina")
Spread = 5.0
ShootingTimer = NodePath("ShootingTimer")
SpawnerPoints = [NodePath("Spawner")]
[node name="ShootingTimer" type="Timer" parent="."]
wait_time = 0.25
one_shot = true
[node name="SpawnerSprite" type="Sprite2D" parent="."]
texture = ExtResource("2_7vlpw")
[node name="Spawner" type="Node2D" parent="."]
position = Vector2(4, 0)

View file

@ -0,0 +1,33 @@
[gd_scene load_steps=4 format=3 uid="uid://b5ejm8antxfsm"]
[ext_resource type="Script" path="res://modules/weapon.gd" id="1_ugbl6"]
[ext_resource type="PackedScene" uid="uid://djmoij5kuou3j" path="res://scenes/projectiles/Laser.tscn" id="2_b52h8"]
[ext_resource type="Texture2D" uid="uid://c3gei46k8muk3" path="res://sprites/laserbox.png" id="3_ahhl5"]
[node name="DoubleLaserMk1" type="Node2D" node_paths=PackedStringArray("ShootingTimer", "SpawnerPoints")]
script = ExtResource("1_ugbl6")
ShootingProjectile = ExtResource("2_b52h8")
AmmoType = "Laser Energy"
AmmoConsumption = 2.0
ShootingTimer = NodePath("ShootingTimer")
SpawnerPoints = [NodePath("SpawnerSprite1/Spawner1"), NodePath("SpawnerSprite2/Spawner2")]
[node name="SpawnerSprite1" type="Sprite2D" parent="."]
position = Vector2(4, -12)
rotation = 0.0174533
texture = ExtResource("3_ahhl5")
[node name="Spawner1" type="Node2D" parent="SpawnerSprite1"]
position = Vector2(4, 0)
[node name="SpawnerSprite2" type="Sprite2D" parent="."]
position = Vector2(4, 12)
rotation = -0.0174533
texture = ExtResource("3_ahhl5")
[node name="Spawner2" type="Node2D" parent="SpawnerSprite2"]
position = Vector2(4, 0)
[node name="ShootingTimer" type="Timer" parent="."]
wait_time = 0.15
one_shot = true

View file

@ -0,0 +1,22 @@
[gd_scene load_steps=4 format=3 uid="uid://dse2xxx501xuj"]
[ext_resource type="Script" path="res://modules/weapon.gd" id="1_6r7e6"]
[ext_resource type="PackedScene" uid="uid://djmoij5kuou3j" path="res://scenes/projectiles/Laser.tscn" id="2_8akh2"]
[ext_resource type="Texture2D" uid="uid://c3gei46k8muk3" path="res://sprites/laserbox.png" id="3_ncnas"]
[node name="SingleLaser" type="Node2D" node_paths=PackedStringArray("ShootingTimer", "SpawnerPoints")]
script = ExtResource("1_6r7e6")
ShootingProjectile = ExtResource("2_8akh2")
Spread = 3.0
ShootingTimer = NodePath("ShootingTimer")
SpawnerPoints = [NodePath("Spawner")]
[node name="ShootingTimer" type="Timer" parent="."]
wait_time = 0.25
one_shot = true
[node name="SpawnerSprite" type="Sprite2D" parent="."]
texture = ExtResource("3_ncnas")
[node name="Spawner" type="Node2D" parent="."]
position = Vector2(4, 0)

View file

@ -0,0 +1,24 @@
[gd_scene load_steps=4 format=3 uid="uid://cf11711uqb42j"]
[ext_resource type="Script" path="res://modules/weapon.gd" id="1_smgrb"]
[ext_resource type="PackedScene" uid="uid://djmoij5kuou3j" path="res://scenes/projectiles/Laser.tscn" id="2_eiesu"]
[ext_resource type="Texture2D" uid="uid://c3gei46k8muk3" path="res://sprites/laserbox.png" id="3_n1sx7"]
[node name="SingleLaser" type="Node2D" node_paths=PackedStringArray("ShootingTimer", "SpawnerPoints")]
script = ExtResource("1_smgrb")
ShootingProjectile = ExtResource("2_eiesu")
Spread = 5.0
AmmoType = "Laser Energy"
AmmoConsumption = 1.0
ShootingTimer = NodePath("ShootingTimer")
SpawnerPoints = [NodePath("Spawner")]
[node name="ShootingTimer" type="Timer" parent="."]
wait_time = 0.25
one_shot = true
[node name="SpawnerSprite" type="Sprite2D" parent="."]
texture = ExtResource("3_n1sx7")
[node name="Spawner" type="Node2D" parent="."]
position = Vector2(4, 0)

View file

@ -0,0 +1,23 @@
[gd_scene load_steps=4 format=3 uid="uid://bhkuvj884yyan"]
[ext_resource type="Script" path="res://modules/weapon.gd" id="1_wdpx2"]
[ext_resource type="PackedScene" uid="uid://qr1h87np4sn1" path="res://scenes/projectiles/Rocket.tscn" id="2_fypwx"]
[ext_resource type="Texture2D" uid="uid://c3gei46k8muk3" path="res://sprites/laserbox.png" id="3_7gexv"]
[node name="SingleRocketMk1" type="Node2D" node_paths=PackedStringArray("ShootingTimer", "SpawnerPoints")]
script = ExtResource("1_wdpx2")
ShootingProjectile = ExtResource("2_fypwx")
AmmoType = "Rockets"
AmmoConsumption = 1.0
ShootingTimer = NodePath("ShootingTimer")
SpawnerPoints = [NodePath("Spawner")]
[node name="ShootingTimer" type="Timer" parent="."]
wait_time = 0.5
one_shot = true
[node name="SpawnerSprite" type="Sprite2D" parent="."]
texture = ExtResource("3_7gexv")
[node name="Spawner" type="Node2D" parent="."]
position = Vector2(4, 0)