1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-10 13:47:12 +08:00

feat: 添加武器升华系统及相关UI组件

实现武器升华功能,包括:
- 新增SublimateOption类处理升华选项
- 添加SublimateOptionHandler UI组件
- 在武器卡片中集成升华界面
- 重构武器描述生成逻辑
- 新增钻石资源消耗机制
- 优化UI布局和样式
- 修复多处类型引用错误
This commit is contained in:
2026-05-10 11:49:17 +08:00
parent 1071e87da6
commit 7a0cf96d7d
39 changed files with 558 additions and 147 deletions
+9 -11
View File
@@ -1,22 +1,20 @@
[gd_scene load_steps=5 format=3 uid="uid://bt370a1djjg5p"]
[gd_scene format=3 uid="uid://bt370a1djjg5p"]
[ext_resource type="Script" uid="uid://qllscdsldcpq" path="res://scripts/Statemachine/FeedName.gd" id="1_wfxme"]
[ext_resource type="Theme" uid="uid://bje5cd08dyok7" path="res://themes/bigTextAndBold.tres" id="2_k71he"]
[sub_resource type="LabelSettings" id="LabelSettings_j8acg"]
font_size = 12
font_color = Color(1, 0.442751, 0, 1)
[sub_resource type="LabelSettings" id="LabelSettings_268ry"]
font_size = 12
font_color = Color(1, 0, 0.585938, 1)
[node name="FeedName" type="HBoxContainer"]
[node name="FeedName" type="HBoxContainer" unique_id=803617181]
offset_right = 205.0
offset_bottom = 25.0
alignment = 1
script = ExtResource("1_wfxme")
quality = 4
qualityColorMap = {
0: Color(0.5, 0.5, 0.5, 1),
1: Color(1, 1, 1, 1),
@@ -26,26 +24,26 @@ qualityColorMap = {
}
topicColorMap = {
0: Color(1, 0, 0.585938, 1),
1: Color(0, 0.414063, 1, 1),
1: Color(0, 0.6829064, 1, 1),
2: Color(0.60183, 0.349817, 0, 1),
3: Color(0.40625, 1, 0, 1),
4: Color(1, 0, 0, 1),
4: Color(0.7543956, 0.4408114, 1, 1),
5: Color(1, 0.421875, 0, 1),
6: Color(1, 1, 1, 1),
7: Color(0.449219, 0.449219, 0.449219, 1),
8: Color(1, 0.816993, 0, 1),
9: Color(0, 1, 0.7435255, 1)
9: Color(0, 1, 0.60952187, 1)
}
metadata/_edit_horizontal_guides_ = [25.0]
[node name="quality" type="Label" parent="."]
[node name="quality" type="Label" parent="." unique_id=959908885]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 0
text = "[传说]"
text = "[普通]"
label_settings = SubResource("LabelSettings_j8acg")
[node name="label" type="RichTextLabel" parent="."]
[node name="label" type="RichTextLabel" parent="." unique_id=425020540]
unique_name_in_owner = true
layout_mode = 2
theme = ExtResource("2_k71he")
@@ -54,7 +52,7 @@ text = "[b]未命名饲料[/b]"
fit_content = true
autowrap_mode = 0
[node name="topic" type="Label" parent="."]
[node name="topic" type="Label" parent="." unique_id=588425068]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 8
+7 -9
View File
@@ -9,8 +9,8 @@
font_size = 13
[node name="FieldShow" type="HBoxContainer" unique_id=1958616813]
offset_right = 144.0
offset_bottom = 18.0
offset_right = 106.0
offset_bottom = 20.0
alignment = 1
script = ExtResource("1_gwocj")
metadata/_edit_horizontal_guides_ = [20.0]
@@ -28,23 +28,21 @@ stretch_mode = 5
[node name="name" type="Label" parent="." unique_id=452024197]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 11
size_flags_horizontal = 0
theme = ExtResource("2_x62bb")
text = "生命上限"
horizontal_alignment = 1
[node name="sep" type="ColorRect" parent="." unique_id=947351883]
custom_minimum_size = Vector2(20, 1)
[node name="sep" type="HSeparator" parent="." unique_id=2087003931]
custom_minimum_size = Vector2(20, 0)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
size_flags_stretch_ratio = 16.0
[node name="value" type="Label" parent="." unique_id=1521326049]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 10
text = "+10.0"
size_flags_horizontal = 8
text = "0.0"
label_settings = SubResource("LabelSettings_imrgm")
horizontal_alignment = 1
+60
View File
@@ -0,0 +1,60 @@
[gd_scene format=3 uid="uid://dsqq55w2twlp6"]
[ext_resource type="Script" uid="uid://qpx600iiwgae" path="res://scripts/Statemachine/SublimateOptionHandler.gd" id="1_kwr7c"]
[ext_resource type="Texture2D" uid="uid://bqdfnupy16x1k" path="res://resources/ui/sublimate-icon.png" id="1_xsbjn"]
[ext_resource type="PackedScene" uid="uid://bbm8l3hr4ihar" path="res://components/UI/ItemShow.tscn" id="2_68c0g"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_kwr7c"]
content_margin_left = 15.0
content_margin_top = 6.0
content_margin_right = 15.0
content_margin_bottom = 6.0
bg_color = Color(0, 0, 0, 0.3)
border_width_left = 4
border_width_top = 1
border_width_right = 4
border_width_bottom = 1
border_color = Color(1, 1, 1, 1)
corner_radius_top_left = 10
corner_radius_bottom_right = 10
[sub_resource type="LabelSettings" id="LabelSettings_kwr7c"]
font_size = 18
outline_size = 1
[node name="SublimateOption" type="PanelContainer" unique_id=1944124947]
offset_right = 285.0
offset_bottom = 32.0
theme_override_styles/panel = SubResource("StyleBoxFlat_kwr7c")
script = ExtResource("1_kwr7c")
[node name="container" type="HBoxContainer" parent="." unique_id=1689302184]
layout_mode = 2
theme_override_constants/separation = 10
[node name="HBoxContainer" type="HBoxContainer" parent="container" unique_id=703603476]
layout_mode = 2
theme_override_constants/separation = 5
[node name="name" type="Label" parent="container/HBoxContainer" unique_id=1606683475]
unique_name_in_owner = true
layout_mode = 2
text = "name"
label_settings = SubResource("LabelSettings_kwr7c")
[node name="costItem" parent="container/HBoxContainer" unique_id=583849471 instance=ExtResource("2_68c0g")]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
type = 6
[node name="separator" type="HSeparator" parent="container" unique_id=1982068530]
custom_minimum_size = Vector2(40, 0)
layout_mode = 2
size_flags_horizontal = 3
[node name="applyBtn" type="Button" parent="container" unique_id=262085363]
unique_name_in_owner = true
layout_mode = 2
text = "description"
icon = ExtResource("1_xsbjn")