Done refactoring

This commit is contained in:
2ndbeam 2023-11-05 21:51:47 +03:00
commit 2176e9d798
88 changed files with 821 additions and 880 deletions

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://d1bhrxmr0oo0n"]
[ext_resource type="Script" path="res://scripts/Bounty.gd" id="1_450ye"]
[ext_resource type="Script" path="res://scripts/objects/Bounty.gd" id="1_450ye"]
[sub_resource type="CircleShape2D" id="CircleShape2D_xkl60"]
radius = 32.0

View file

@ -1,38 +0,0 @@
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()

View file

@ -1,10 +1,10 @@
[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="Script" path="res://scripts/menu/MainMenu.gd" id="1_2wax0"]
[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"]
[ext_resource type="Script" path="res://scripts/menu/MainMenuButton.gd" id="5_q6x10"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_rtgkw"]
frequency = 0.001
@ -20,7 +20,7 @@ shader = ExtResource("1_on8wy")
shader_parameter/penis = SubResource("NoiseTexture2D_vkqxf")
[node name="MainMenu" type="Node2D"]
script = ExtResource("1_3gb4s")
script = ExtResource("1_2wax0")
[node name="ColorRect" type="ColorRect" parent="."]
z_index = -20
@ -30,7 +30,7 @@ offset_bottom = 720.0
[node name="Stars" parent="." instance=ExtResource("4_g7254")]
position = Vector2(640, 360)
StarsAmount = 100
stars_amount = 100
[node name="Control" type="Control" parent="."]
layout_mode = 3
@ -44,8 +44,7 @@ offset_left = 9.0
offset_top = 209.0
offset_right = 382.0
offset_bottom = 262.0
script = ExtResource("5_io856")
ID = "NewGame"
script = ExtResource("5_q6x10")
[node name="MenuButton2" type="Button" parent="Control"]
layout_mode = 0
@ -53,8 +52,7 @@ offset_left = 9.0
offset_top = 276.0
offset_right = 382.0
offset_bottom = 329.0
script = ExtResource("5_io856")
ID = "CreateProfile"
script = ExtResource("5_q6x10")
[node name="MenuButton3" type="Button" parent="Control"]
layout_mode = 0
@ -62,8 +60,7 @@ offset_left = 9.0
offset_top = 345.0
offset_right = 382.0
offset_bottom = 398.0
script = ExtResource("5_io856")
ID = "LoadProfile"
script = ExtResource("5_q6x10")
[node name="MenuButton4" type="Button" parent="Control"]
layout_mode = 0
@ -71,8 +68,7 @@ offset_left = 9.0
offset_top = 417.0
offset_right = 382.0
offset_bottom = 470.0
script = ExtResource("5_io856")
ID = "Settings"
script = ExtResource("5_q6x10")
[node name="MenuButton5" type="Button" parent="Control"]
layout_mode = 0
@ -80,5 +76,4 @@ offset_left = 8.0
offset_top = 488.0
offset_right = 381.0
offset_bottom = 541.0
script = ExtResource("5_io856")
ID = "ExitGame"
script = ExtResource("5_q6x10")

View file

@ -1,47 +0,0 @@
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

View file

@ -1,18 +1,14 @@
[gd_scene load_steps=16 format=3 uid="uid://ccrs28h3b2tfy"]
[gd_scene load_steps=12 format=3 uid="uid://ccrs28h3b2tfy"]
[ext_resource type="Script" path="res://scripts/MainShipScript.gd" id="1_h7kne"]
[ext_resource type="Script" path="res://scripts/objects/MainShip.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="Script" path="res://scripts/misc/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="Script" path="res://scripts/misc/CameraTweaks.gd" id="7_5jx81"]
[ext_resource type="Script" path="res://scripts/misc/Counter.gd" id="8_udmcu"]
[ext_resource type="Script" path="res://scripts/misc/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"]
@ -96,7 +92,8 @@ offset_bottom = -69.0
grow_horizontal = 2
grow_vertical = 2
text = "Fuel: 1000/1000 units"
script = ExtResource("10_0lke7")
script = ExtResource("8_udmcu")
counter_id = "fuel"
[node name="AmmoCounter" type="Label" parent="GUI/Interface"]
layout_mode = 1
@ -114,7 +111,8 @@ grow_vertical = 0
text = "ammo"
horizontal_alignment = 2
vertical_alignment = 2
script = ExtResource("9_h1i5f")
script = ExtResource("8_udmcu")
counter_id = "ammo"
[node name="ShieldCounter" type="Label" parent="GUI/Interface"]
layout_mode = 0
@ -123,7 +121,8 @@ offset_top = 580.0
offset_right = 239.0
offset_bottom = 606.0
text = "Shield Capacity: 8 / 8 units"
script = ExtResource("10_2l5pr")
script = ExtResource("8_udmcu")
counter_id = "shield"
[node name="HPCounter" type="Label" parent="GUI/Interface"]
layout_mode = 0
@ -132,7 +131,8 @@ offset_top = 602.0
offset_right = 209.0
offset_bottom = 625.0
text = "Hull Strength: 30 / 30 units"
script = ExtResource("11_ouonv")
script = ExtResource("8_udmcu")
counter_id = "hp"
[node name="MoneyCounter" type="Label" parent="GUI/Interface"]
layout_mode = 0
@ -141,7 +141,8 @@ offset_top = 558.0
offset_right = 250.0
offset_bottom = 584.0
text = "Available Money: 1000 units"
script = ExtResource("11_8f548")
script = ExtResource("8_udmcu")
counter_id = "money"
[node name="PauseController" type="Control" parent="GUI/Interface"]
process_mode = 2

View file

@ -1,6 +1,6 @@
[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="Script" path="res://scripts/objects/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"]
@ -13,7 +13,7 @@ grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("1_8abec")
MarkerPack = ExtResource("2_u2t3y")
marker = ExtResource("2_u2t3y")
[node name="Sprite" type="Sprite2D" parent="."]
position = Vector2(96, 96)

View file

@ -1,6 +1,6 @@
[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="Script" path="res://scripts/objects/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"]

View file

@ -3,10 +3,10 @@
[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="Script" path="res://scripts/misc/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="Script" path="res://scripts/misc/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"]

View file

@ -1,9 +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="Script" path="res://scripts/misc/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")
star = ExtResource("2_ypr5c")

View file

@ -1,11 +1,11 @@
[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="Script" path="res://scripts/misc/StarterBase.gd" id="1_5xhqy"]
[ext_resource type="Script" path="res://scripts/misc/BaseCollider.gd" id="2_18w83"]
[ext_resource type="Script" path="res://scripts/misc/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"]
[ext_resource type="Script" path="res://scripts/misc/BaseNPCRotator.gd" id="5_kecih"]
[node name="StarterBase" type="Node2D"]
process_mode = 1
@ -32,7 +32,7 @@ polygon = PackedVector2Array(129, -32, 129, 32, 256, 63, 256, 61, 131, 30, 131,
[node name="MenuCollider" type="Area2D" parent="."]
collision_layer = 8
script = ExtResource("2_53766")
Menu = ExtResource("4_jlcsy")
menu = ExtResource("4_jlcsy")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="MenuCollider"]
polygon = PackedVector2Array(129, 32, 256, 63, 256, -63, 129, -32)

View file

@ -1,9 +1,9 @@
[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="Script" path="res://scripts/objects/ShipEngine.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"]
[ext_resource type="Script" path="res://scripts/misc/EngineParticles.gd" id="3_fxngd"]
[ext_resource type="Script" path="res://scripts/misc/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]
@ -53,8 +53,7 @@ scale_curve = SubResource("CurveTexture_ot3qw")
[node name="Engine" type="Node2D"]
script = ExtResource("1_jvcps")
SpeedAcceleration = 100.0
RotationSpeed = 120
rotation_speed = 120
[node name="EngineSprite" type="Sprite2D" parent="."]
position = Vector2(-4, 0)

View file

@ -1,11 +1,11 @@
[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="Script" path="res://scripts/objects/Hull.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
max_hp = 15
[node name="HullSprite" type="Sprite2D" parent="."]
position = Vector2(16, 0)

View file

@ -1,11 +1,11 @@
[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="Script" path="res://scripts/objects/Hull.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
max_fuel = 6000
[node name="HullSprite" type="Sprite2D" parent="."]
position = Vector2(16, 0)

View file

@ -1,12 +0,0 @@
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

@ -1,29 +0,0 @@
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

@ -1,16 +0,0 @@
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

@ -1,9 +0,0 @@
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

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

View file

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

View file

@ -1,12 +1,8 @@
[gd_scene load_steps=9 format=3 uid="uid://dj8iw5305ujrc"]
[gd_scene load_steps=5 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"]
[ext_resource type="Script" path="res://scripts/menu/BuyMenuButton.gd" id="2_rfxij"]
[ext_resource type="Script" path="res://scripts/menu/OptionsColors.gd" id="7_m7aa1"]
[sub_resource type="LabelSettings" id="LabelSettings_7bj0u"]
font_size = 14
@ -35,7 +31,7 @@ patch_margin_top = 2
patch_margin_right = 2
patch_margin_bottom = 2
[node name="Option1" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("Clickable")]
[node name="Option1" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
@ -54,9 +50,13 @@ 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")
script = ExtResource("2_rfxij")
data = {
"amount": 1000.0,
"id": "fuel"
}
price = 50.0
clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="BuyMenu/Option1"]
layout_mode = 1
@ -74,7 +74,7 @@ label_settings = SubResource("LabelSettings_7bj0u")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Option2" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("Clickable")]
[node name="Option2" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
@ -93,9 +93,12 @@ 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")
script = ExtResource("2_rfxij")
data = {
"id": "hp"
}
price = 2.0
clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="BuyMenu/Option2"]
layout_mode = 1
@ -113,7 +116,7 @@ label_settings = SubResource("LabelSettings_7bj0u")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Option3" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("Clickable")]
[node name="Option3" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
@ -132,9 +135,13 @@ 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")
script = ExtResource("2_rfxij")
data = {
"amount": 5,
"id": "rockets"
}
price = 20.0
clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="BuyMenu/Option3"]
layout_mode = 1
@ -152,7 +159,7 @@ label_settings = SubResource("LabelSettings_7bj0u")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Option4" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("Clickable")]
[node name="Option4" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
@ -171,12 +178,15 @@ 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")
script = ExtResource("2_rfxij")
data = {
"id": "weapon",
"position": Vector2(8, 0),
"slot": "secondary",
"weapon": "SingleRocketMk1"
}
price = 200.0
clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="BuyMenu/Option4"]
layout_mode = 1
@ -194,7 +204,7 @@ label_settings = SubResource("LabelSettings_7bj0u")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Option5" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("Clickable")]
[node name="Option5" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
@ -213,11 +223,15 @@ 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")
script = ExtResource("2_rfxij")
data = {
"id": "weapon",
"position": Vector2(8, 0),
"slot": "primary",
"weapon": "DoubleLaserMk1"
}
price = 300.0
clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="BuyMenu/Option5"]
layout_mode = 1
@ -235,7 +249,7 @@ label_settings = SubResource("LabelSettings_7bj0u")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Option6" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("Clickable")]
[node name="Option6" type="NinePatchRect" parent="BuyMenu" node_paths=PackedStringArray("clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
@ -254,10 +268,14 @@ 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")
script = ExtResource("2_rfxij")
data = {
"id": "weapon",
"position": Vector2(16, 0),
"slot": "primary",
"weapon": "SingleLaserMk1"
}
clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="BuyMenu/Option6"]
layout_mode = 1
@ -289,7 +307,7 @@ patch_margin_top = 2
patch_margin_right = 2
patch_margin_bottom = 2
[node name="Colors" type="NinePatchRect" parent="OptionsMenu" node_paths=PackedStringArray("Clickable")]
[node name="Colors" type="NinePatchRect" parent="OptionsMenu" node_paths=PackedStringArray("clickable")]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.008
@ -309,7 +327,7 @@ patch_margin_top = 2
patch_margin_right = 2
patch_margin_bottom = 2
script = ExtResource("7_m7aa1")
Clickable = NodePath("TextureButton")
clickable = NodePath("TextureButton")
[node name="TextureButton" type="TextureButton" parent="OptionsMenu/Colors"]
layout_mode = 1
@ -325,40 +343,3 @@ 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

@ -1,6 +1,6 @@
[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="Script" path="res://scripts/objects/npcship.gd" id="1_wioir"]
[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"]
@ -13,13 +13,13 @@ radius = 64.0
[sub_resource type="LabelSettings" id="LabelSettings_21pok"]
font_size = 12
[node name="DefaultShip" type="CharacterBody2D" node_paths=PackedStringArray("DestinationTimer")]
[node name="DefaultShip" type="CharacterBody2D" node_paths=PackedStringArray("destination_timer")]
process_mode = 1
collision_mask = 19
input_pickable = true
script = ExtResource("1_s20nu")
DestinationTimer = NodePath("DestinationTimer")
Bounty = ExtResource("2_6fdps")
script = ExtResource("1_wioir")
destination_timer = NodePath("DestinationTimer")
bounty = ExtResource("2_6fdps")
[node name="Shield" parent="." instance=ExtResource("3_47apr")]
@ -34,7 +34,6 @@ polygon = PackedVector2Array(0, -16, 32, 0, 0, 16, 0, 4, -4, 4, -8, 8, -8, -8, -
[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

View file

@ -1,14 +1,14 @@
[gd_scene load_steps=3 format=3 uid="uid://djmoij5kuou3j"]
[ext_resource type="Script" path="res://modules/projectile.gd" id="1_plpqo"]
[ext_resource type="Script" path="res://scripts/objects/projectile.gd" id="1_6nacn"]
[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="Laser" type="Node2D" node_paths=PackedStringArray("collider")]
script = ExtResource("1_6nacn")
speed = 600.0
collider = NodePath("Collision")
[node name="LaserBody" type="Line2D" parent="."]
points = PackedVector2Array(0, 0, 8, 0)

View file

@ -1,6 +1,6 @@
[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="Script" path="res://scripts/objects/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"]
@ -30,12 +30,12 @@ animations = [{
radius = 2.0
height = 12.0
[node name="Rocket" type="Node2D" node_paths=PackedStringArray("Collider")]
[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")
speed = 400.0
rotation_speed = 180.0
damage = 5.0
collider = NodePath("Collision")
[node name="RocketSprite" type="AnimatedSprite2D" parent="."]
position = Vector2(8, 0)

View file

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

View file

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

View file

@ -1,14 +1,14 @@
[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="Script" path="res://scripts/objects/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")]
[node name="DoubleLaser" type="Node2D" node_paths=PackedStringArray("shoot_timer", "spawner_points")]
script = ExtResource("1_u8yjv")
ShootingProjectile = ExtResource("2_cewjf")
ShootingTimer = NodePath("ShootingTimer")
SpawnerPoints = [NodePath("SpawnerSprite1/Spawner1"), NodePath("SpawnerSprite2/Spawner2")]
projectile = ExtResource("2_cewjf")
shoot_timer = NodePath("ShootingTimer")
spawner_points = [NodePath("SpawnerSprite1/Spawner1"), NodePath("SpawnerSprite2/Spawner2")]
[node name="SpawnerSprite1" type="Sprite2D" parent="."]
position = Vector2(4, -12)

View file

@ -1,15 +1,14 @@
[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="Script" path="res://scripts/objects/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")]
[node name="SingleLaser" type="Node2D" node_paths=PackedStringArray("shoot_timer", "spawner_points")]
script = ExtResource("1_4ig05")
ShootingProjectile = ExtResource("2_w1ina")
Spread = 5.0
ShootingTimer = NodePath("ShootingTimer")
SpawnerPoints = [NodePath("Spawner")]
projectile = ExtResource("2_w1ina")
shoot_timer = NodePath("ShootingTimer")
spawner_points = [NodePath("Spawner")]
[node name="ShootingTimer" type="Timer" parent="."]
wait_time = 0.25

View file

@ -1,16 +1,16 @@
[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="Script" path="res://scripts/objects/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")]
[node name="DoubleLaserMk1" type="Node2D" node_paths=PackedStringArray("shoot_timer", "spawner_points")]
script = ExtResource("1_ugbl6")
ShootingProjectile = ExtResource("2_b52h8")
AmmoType = "Laser Energy"
AmmoConsumption = 2.0
ShootingTimer = NodePath("ShootingTimer")
SpawnerPoints = [NodePath("SpawnerSprite1/Spawner1"), NodePath("SpawnerSprite2/Spawner2")]
projectile = ExtResource("2_b52h8")
ammo_type = "Laser Energy"
ammo_consumption = 2.0
shoot_timer = NodePath("ShootingTimer")
spawner_points = [NodePath("SpawnerSprite1/Spawner1"), NodePath("SpawnerSprite2/Spawner2")]
[node name="SpawnerSprite1" type="Sprite2D" parent="."]
position = Vector2(4, -12)

View file

@ -1,15 +1,14 @@
[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="Script" path="res://scripts/objects/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")]
[node name="SingleLaser" type="Node2D" node_paths=PackedStringArray("shoot_timer", "spawner_points")]
script = ExtResource("1_6r7e6")
ShootingProjectile = ExtResource("2_8akh2")
Spread = 3.0
ShootingTimer = NodePath("ShootingTimer")
SpawnerPoints = [NodePath("Spawner")]
projectile = ExtResource("2_8akh2")
shoot_timer = NodePath("ShootingTimer")
spawner_points = [NodePath("Spawner")]
[node name="ShootingTimer" type="Timer" parent="."]
wait_time = 0.25

View file

@ -1,17 +1,16 @@
[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="Script" path="res://scripts/objects/weapon.gd" id="1_dwcuc"]
[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="SingleLaser" type="Node2D" node_paths=PackedStringArray("shoot_timer", "spawner_points")]
script = ExtResource("1_dwcuc")
projectile = ExtResource("2_eiesu")
ammo_type = "Laser Energy"
ammo_consumption = 1.0
shoot_timer = NodePath("ShootingTimer")
spawner_points = [NodePath("Spawner")]
[node name="ShootingTimer" type="Timer" parent="."]
wait_time = 0.25

View file

@ -1,16 +1,16 @@
[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="Script" path="res://scripts/objects/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")]
[node name="SingleRocketMk1" type="Node2D" node_paths=PackedStringArray("shoot_timer", "spawner_points")]
script = ExtResource("1_wdpx2")
ShootingProjectile = ExtResource("2_fypwx")
AmmoType = "Rockets"
AmmoConsumption = 1.0
ShootingTimer = NodePath("ShootingTimer")
SpawnerPoints = [NodePath("Spawner")]
projectile = ExtResource("2_fypwx")
ammo_type = "Rockets"
ammo_consumption = 1.0
shoot_timer = NodePath("ShootingTimer")
spawner_points = [NodePath("Spawner")]
[node name="ShootingTimer" type="Timer" parent="."]
wait_time = 0.5