conforms file names to consistant standard

This commit is contained in:
2026-02-21 04:24:04 +11:00
parent 6b67dd9755
commit 5a4ad8633a
1991 changed files with 3836 additions and 7976 deletions

View File

@@ -0,0 +1,86 @@
class_name cassetteSelectionBox
extends Control
var cassette: Cassette
@export var icon: TextureRect
@export var tags: VBoxContainer
@export var cost_label: Label
@export var unselected_style_box: StyleBoxFlat
@export var selected_style_box: StyleBoxFlat
@export var amount_label: Label
func set_amount(num: int) -> void:
amount_label.text = "x" + str(num)
func set_cassette(new_cassette: Cassette) -> void:
cassette = new_cassette
icon.texture = cassette.icon
cost_label.text = str(cassette.cost)
for i: int in tags.get_child_count():
tags.get_child(i).queue_free()
for tag: Data.cassetteTags in cassette.tags:
var tag_icon: TextureRect = icon.duplicate()
if tag == Data.cassetteTags.DAMAGE:
tag_icon.texture = load("res://Assets/Textures/damage_icon.png")
if tag == Data.cassetteTags.UTILITY:
tag_icon.texture = load("res://Assets/Textures/utility_icon.png")
if tag == Data.cassetteTags.TARGETS_FLYING:
tag_icon.modulate = Color.FIREBRICK
tag_icon.texture = load("res://Assets/Textures/flight_icon.png")
tags.add_child(tag_icon)
func set_key(slot: int) -> void:
match(slot):
0:
$Label.text = parse_action_tag("#Equip 1#")
1:
$Label.text = parse_action_tag("#Equip 2#")
2:
$Label.text = parse_action_tag("#Equip 3#")
3:
$Label.text = parse_action_tag("#Equip 4#")
4:
$Label.text = parse_action_tag("#Equip 5#")
5:
$Label.text = parse_action_tag("#Equip 6#")
6:
$Label.text = parse_action_tag("#Equip 7#")
7:
$Label.text = parse_action_tag("#Equip 8#")
8:
$Label.text = parse_action_tag("#Equip 9#")
9:
$Label.text = parse_action_tag("#Equip 10#")
func parse_action_tag(text: String) -> String:
var string_array: PackedStringArray = text.split("#")
var output: Array[String] = []
if string_array.size() > 1:
for i: int in InputMap.action_get_events(string_array[1]).size():
var event: InputEvent = InputMap.action_get_events(string_array[1])[i]
if InputMap.action_get_events(string_array[1]).size() > 1:
var last: bool = true if i == InputMap.action_get_events(string_array[1]).size() - 1 else false
var first: bool = true if i == 0 else false
if last:
output.append(" or ")
elif !first:
output.append(", ")
if event is InputEventKey:
output.append("[img=top,50]%s[/img]" % KeyIconMap.keys[str(event.physical_keycode)])
if event is InputEventMouseButton:
output.append("[img=top,50]%s[/img]" % KeyIconMap.mouse_buttons[str(event.button_index)])
string_array[1] = "".join(output)
text = "".join(string_array)
return text
func select() -> void:
$PanelContainer.add_theme_stylebox_override("panel", selected_style_box)
func deselect() -> void:
$PanelContainer.add_theme_stylebox_override("panel", unselected_style_box)

View File

@@ -0,0 +1 @@
uid://87h0a76hdx4b

View File

@@ -0,0 +1,89 @@
[gd_scene format=3 uid="uid://gdd1xupf4oxx"]
[ext_resource type="Texture2D" uid="uid://b165eh481oodf" path="res://assets/textures/damage_icon.png" id="1_k8442"]
[ext_resource type="Script" uid="uid://87h0a76hdx4b" path="res://ui/cassette_selection_box/cassette_selection_box.gd" id="1_m0g3h"]
[ext_resource type="StyleBox" uid="uid://c4ye5r2xdsocm" path="res://ui/cassette_selection_box/unselected_style_box.tres" id="2_0817q"]
[ext_resource type="StyleBox" uid="uid://csbgndc6vfayf" path="res://ui/cassette_selection_box/selected_style_box.tres" id="2_ek0dh"]
[ext_resource type="Texture2D" uid="uid://bpcyxdpog3w85" path="res://assets/textures/assault_icon.png" id="2_m0g3h"]
[node name="Control" type="Control" unique_id=1902446173 node_paths=PackedStringArray("icon", "tags", "cost_label", "amount_label")]
custom_minimum_size = Vector2(170, 0)
layout_mode = 3
anchors_preset = 0
mouse_filter = 2
script = ExtResource("1_m0g3h")
icon = NodePath("PanelContainer/VBoxContainer/HBoxContainer/Icon")
tags = NodePath("PanelContainer/VBoxContainer/HBoxContainer/MarginContainer/Tags")
cost_label = NodePath("PanelContainer/VBoxContainer/HBoxContainer/Stats/Cost")
unselected_style_box = ExtResource("2_0817q")
selected_style_box = ExtResource("2_ek0dh")
amount_label = NodePath("PanelContainer/VBoxContainer/Label")
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=446154374]
layout_mode = 0
offset_right = 127.0
offset_bottom = 85.0
mouse_filter = 2
theme_override_styles/panel = ExtResource("2_ek0dh")
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer" unique_id=1943920264]
layout_mode = 2
mouse_filter = 2
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer" unique_id=1368087917]
layout_mode = 2
size_flags_vertical = 3
mouse_filter = 2
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/VBoxContainer/HBoxContainer" unique_id=1701565775]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 2
theme_override_constants/margin_top = 10
theme_override_constants/margin_bottom = 10
[node name="Tags" type="VBoxContainer" parent="PanelContainer/VBoxContainer/HBoxContainer/MarginContainer" unique_id=285846509]
layout_mode = 2
[node name="Icon2" type="TextureRect" parent="PanelContainer/VBoxContainer/HBoxContainer/MarginContainer/Tags" unique_id=1347175404]
layout_mode = 2
size_flags_horizontal = 3
texture = ExtResource("1_k8442")
stretch_mode = 5
[node name="Icon" type="TextureRect" parent="PanelContainer/VBoxContainer/HBoxContainer" unique_id=734804766]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 2
texture = ExtResource("2_m0g3h")
stretch_mode = 5
[node name="Stats" type="VBoxContainer" parent="PanelContainer/VBoxContainer/HBoxContainer" unique_id=728262348]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 2
[node name="Cost" type="Label" parent="PanelContainer/VBoxContainer/HBoxContainer/Stats" unique_id=421650336]
layout_mode = 2
size_flags_vertical = 7
text = "3"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer" unique_id=1294496215]
layout_mode = 2
size_flags_vertical = 8
text = "x2"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Label" type="RichTextLabel" parent="." unique_id=697403033]
layout_mode = 1
offset_left = -25.0
offset_top = 100.0
offset_right = 25.0
offset_bottom = 150.0
mouse_filter = 2
bbcode_enabled = true
fit_content = true
vertical_alignment = 2

View File

@@ -0,0 +1,8 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://csbgndc6vfayf"]
[resource]
content_margin_left = 8.0
content_margin_top = 0.0
content_margin_right = 8.0
content_margin_bottom = 0.0
bg_color = Color(0.430763, 0.633388, 0.725502, 1)

View File

@@ -0,0 +1,6 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://c4ye5r2xdsocm"]
[resource]
content_margin_left = 8.0
content_margin_right = 8.0
bg_color = Color(0.292, 0.292, 0.292, 0.89)