Equipment menu

This commit is contained in:
gotfishmakesticks 2024-01-13 10:58:44 +03:00
commit bef15301cb
28 changed files with 809 additions and 48 deletions

View file

@ -31,6 +31,8 @@ metadata/_edit_horizontal_guides_ = []
[node name="SecondaryWeapon" type="Node2D" parent="."]
[node name="SingleLaser" parent="SecondaryWeapon" instance=ExtResource("4_s724s")]
[node name="Shield" parent="." instance=ExtResource("6_nihas")]
[node name="Camera" type="Camera2D" parent="."]

View file

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=3 uid="uid://c02jesitrkrm5"]
[ext_resource type="PackedScene" uid="uid://bbho4h6tg4jca" path="res://scenes/hulls/starterhull.tscn" id="1_miiwm"]
[node name="Hull" instance=ExtResource("1_miiwm")]
max_hp = 40.0
max_fuel = 9000.0
max_weight = 150.0
id = "HullMk2"

View file

@ -8,5 +8,6 @@ script = ExtResource("1_em4j0")
max_fuel = 6000
[node name="HullSprite" type="Sprite2D" parent="."]
z_index = -1
position = Vector2(16, 0)
texture = ExtResource("2_tvpkh")

View file

@ -77,7 +77,8 @@ layout_mode = 0
offset_top = 576.0
offset_right = 640.0
offset_bottom = 640.0
text = "Fly off base to exit this menu."
text = "Press [TAB] to show / hide menu
Fly off the base to exit menu"
horizontal_alignment = 1
vertical_alignment = 1
@ -114,49 +115,50 @@ script = ExtResource("2_ld3o5")
[node name="SellList" type="ItemList" parent="TradingMenu"]
layout_mode = 0
offset_left = 1.0
offset_top = 64.0
offset_right = 320.0
offset_bottom = 512.0
offset_bottom = 576.0
[node name="BuyList" type="ItemList" parent="TradingMenu"]
layout_mode = 0
offset_left = 320.0
offset_top = 64.0
offset_right = 640.0
offset_bottom = 512.0
offset_right = 639.0
offset_bottom = 576.0
[node name="SellInput" type="LineEdit" parent="TradingMenu"]
layout_mode = 0
offset_left = 1.0
offset_top = 512.0
offset_top = 576.0
offset_right = 160.0
offset_bottom = 576.0
offset_bottom = 639.0
placeholder_text = "Amount to buy"
alignment = 1
[node name="BuyInput" type="LineEdit" parent="TradingMenu"]
layout_mode = 0
offset_left = 320.0
offset_top = 512.0
offset_top = 576.0
offset_right = 480.0
offset_bottom = 576.0
offset_bottom = 639.0
placeholder_text = "Amount to sell"
alignment = 1
[node name="BuyButton" type="Button" parent="TradingMenu"]
layout_mode = 0
offset_left = 160.0
offset_top = 512.0
offset_top = 576.0
offset_right = 320.0
offset_bottom = 576.0
offset_bottom = 639.0
text = "Buy selected item"
[node name="SellButton" type="Button" parent="TradingMenu"]
layout_mode = 0
offset_left = 480.0
offset_top = 512.0
offset_top = 576.0
offset_right = 639.0
offset_bottom = 576.0
offset_bottom = 639.0
text = "Sell selected item"
[node name="QuestMenu" type="NinePatchRect" parent="."]
@ -294,7 +296,6 @@ offset_bottom = 511.0
text = "Accept quest"
[node name="EquipmentMenu" type="NinePatchRect" parent="."]
visible = false
layout_mode = 0
offset_left = 320.0
offset_top = 40.0
@ -324,6 +325,138 @@ offset_bottom = 40.0
text = "X"
script = ExtResource("2_ld3o5")
[node name="AvailableItems" type="ItemList" parent="EquipmentMenu"]
layout_mode = 0
offset_left = 1.0
offset_top = 128.0
offset_right = 320.0
offset_bottom = 368.0
[node name="BuyableItems" type="ItemList" parent="EquipmentMenu"]
layout_mode = 0
offset_left = 1.0
offset_top = 400.0
offset_right = 320.0
offset_bottom = 639.0
[node name="LabelAvailable" type="Label" parent="EquipmentMenu"]
layout_mode = 0
offset_top = 96.0
offset_right = 320.0
offset_bottom = 128.0
text = "Available modules"
horizontal_alignment = 1
vertical_alignment = 1
[node name="LabelBuyable" type="Label" parent="EquipmentMenu"]
layout_mode = 0
offset_top = 368.0
offset_right = 320.0
offset_bottom = 400.0
text = "Buyable modules"
horizontal_alignment = 1
vertical_alignment = 1
[node name="LabelSelectedItemInfo" type="Label" parent="EquipmentMenu"]
layout_mode = 0
offset_left = 320.0
offset_top = 96.0
offset_right = 640.0
offset_bottom = 128.0
text = "Selected module info:"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HullSelect" type="Button" parent="EquipmentMenu"]
layout_mode = 0
offset_left = 1.0
offset_top = 64.0
offset_right = 160.0
offset_bottom = 96.0
disabled = true
text = "Hull"
[node name="EngineSelect" type="Button" parent="EquipmentMenu"]
layout_mode = 0
offset_left = 160.0
offset_top = 64.0
offset_right = 320.0
offset_bottom = 96.0
text = "Engine"
[node name="ShieldSelect" type="Button" parent="EquipmentMenu"]
layout_mode = 0
offset_left = 320.0
offset_top = 64.0
offset_right = 480.0
offset_bottom = 96.0
text = "Shield"
[node name="WeaponSelect" type="Button" parent="EquipmentMenu"]
layout_mode = 0
offset_left = 480.0
offset_top = 64.0
offset_right = 639.0
offset_bottom = 96.0
text = "Weapon"
[node name="LabelInfoBlock" type="Label" parent="EquipmentMenu"]
layout_mode = 0
offset_left = 320.0
offset_top = 128.0
offset_right = 640.0
offset_bottom = 368.0
text = "Select a module to receive info about it."
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 1
[node name="LabelSelectedItemInfo2" type="Label" parent="EquipmentMenu"]
layout_mode = 0
offset_left = 320.0
offset_top = 368.0
offset_right = 640.0
offset_bottom = 400.0
text = "Selected module actions:"
horizontal_alignment = 1
vertical_alignment = 1
[node name="BuySellButton" type="Button" parent="EquipmentMenu"]
layout_mode = 0
offset_left = 320.0
offset_top = 400.0
offset_right = 639.0
offset_bottom = 464.0
disabled = true
text = "Buy / Sell selected"
[node name="EquipButton" type="Button" parent="EquipmentMenu"]
layout_mode = 0
offset_left = 320.0
offset_top = 464.0
offset_right = 639.0
offset_bottom = 528.0
disabled = true
text = "Equip selected"
[node name="EquipPrimaryButton" type="Button" parent="EquipmentMenu"]
layout_mode = 0
offset_left = 320.0
offset_top = 528.0
offset_right = 639.0
offset_bottom = 584.0
disabled = true
text = "Equip selected as primary weapon"
[node name="EquipSecondaryButton" type="Button" parent="EquipmentMenu"]
layout_mode = 0
offset_left = 320.0
offset_top = 584.0
offset_right = 639.0
offset_bottom = 639.0
disabled = true
text = "Equip selected as secondary weapon"
[node name="InfoMenu" type="NinePatchRect" parent="."]
visible = false
layout_mode = 0
@ -354,3 +487,13 @@ offset_right = 639.0
offset_bottom = 40.0
text = "X"
script = ExtResource("2_ld3o5")
[node name="Label" type="Label" parent="InfoMenu"]
layout_mode = 0
offset_top = 64.0
offset_right = 640.0
offset_bottom = 640.0
text = "Actually, this section is WIP.
Part of the factions system."
horizontal_alignment = 1
vertical_alignment = 1

View file

@ -12,6 +12,7 @@ ammo_type = "Laser Energy"
ammo_consumption = 2.0
shoot_timer = NodePath("ShootingTimer")
spawner_points = [NodePath("SpawnerSprite1/Spawner1"), NodePath("SpawnerSprite2/Spawner2")]
id = "DoubleLaserMk1"
[node name="SpawnerSprite1" type="Sprite2D" parent="."]
position = Vector2(4, -12)

View file

@ -12,6 +12,7 @@ ammo_type = "Rockets"
ammo_consumption = 1.0
shoot_timer = NodePath("ShootingTimer")
spawner_points = [NodePath("Spawner")]
id = "SingleRocketMk1"
[node name="ShootingTimer" type="Timer" parent="."]
wait_time = 0.5