diff --git a/components/Feeds/Cake.tscn b/components/Feeds/Cake.tscn index 9622af6..a28b0cc 100644 --- a/components/Feeds/Cake.tscn +++ b/components/Feeds/Cake.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=4 format=3 uid="uid://dl34e70hpckp0"] +[gd_scene load_steps=3 format=3 uid="uid://dl34e70hpckp0"] [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_f2mv8"] -[ext_resource type="Texture2D" uid="uid://b7vxserbhskol" path="res://resources/feeds/banana.svg" id="2_1wmlm"] [ext_resource type="Texture2D" uid="uid://bfioxi3ehf4kv" path="res://resources/feeds/cake-a.svg" id="2_ijk6h"] [node name="Cake" instance=ExtResource("1_f2mv8")] @@ -13,7 +12,7 @@ costs = Array[int]([1]) costCounts = Array[int]([70]) [node name="avatar" parent="container/info" index="0"] -texture = ExtResource("2_1wmlm") +texture = ExtResource("2_ijk6h") [node name="name" parent="container/info" index="1"] -text = "[b]香蕉[/b]" +text = "[b]生日蛋糕[/b]" diff --git a/components/Feeds/Cupcake.tscn b/components/Feeds/Cupcake.tscn index e7b7374..422de9b 100644 --- a/components/Feeds/Cupcake.tscn +++ b/components/Feeds/Cupcake.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://u58mo875ipgg"] +[gd_scene load_steps=3 format=3 uid="uid://u58mo875ipgg"] [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_x5oju"] -[ext_resource type="Texture2D" uid="uid://d3rkwlf75hvva" path="res://resources/feeds/jar-b.svg" id="2_jjjxx"] [ext_resource type="Texture2D" uid="uid://tp2scdjwalro" path="res://resources/feeds/muffin-a.svg" id="2_qojf3"] -[node name="FruitSalad" instance=ExtResource("1_x5oju")] +[node name="Cupcake" instance=ExtResource("1_x5oju")] avatarTexture = ExtResource("2_qojf3") displayName = "烘焙松糕" fields = Array[int]([12, 2]) @@ -13,7 +12,7 @@ costs = Array[int]([0]) costCounts = Array[int]([125]) [node name="avatar" parent="container/info" index="0"] -texture = ExtResource("2_jjjxx") +texture = ExtResource("2_qojf3") [node name="name" parent="container/info" index="1"] -text = "[b]蜂蜜果酱[/b]" +text = "[b]烘焙松糕[/b]" diff --git a/components/Feeds/Dango.tscn b/components/Feeds/Dango.tscn index b475cfa..72881a2 100644 --- a/components/Feeds/Dango.tscn +++ b/components/Feeds/Dango.tscn @@ -3,11 +3,11 @@ [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_mwo1u"] [ext_resource type="Texture2D" uid="uid://bvkjvgxabqyvg" path="res://resources/feeds/dango.svg" id="2_ckr7l"] -[node name="FruitSalad" instance=ExtResource("1_mwo1u")] +[node name="Dango" instance=ExtResource("1_mwo1u")] avatarTexture = ExtResource("2_ckr7l") displayName = "团子" -fields = Array[int]([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) -fieldValues = Array[float]([10.0, 0.1, 0.15, 0.12, 0.04, 0.1, 0.075, 5.0, 0.15, 3.0, 0.07, 0.15, 0.1, 0.4, 0.2]) +fields = Array[int]([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) +fieldValues = Array[float]([10.0, 0.1, 0.15, 0.12, 0.04, 0.1, 0.075, 5.0, 0.15, 3.0, 0.07, 0.15, 0.1, 0.4, 0.2, 2.0, 2.0]) costs = Array[int]([0, 1]) costCounts = Array[int]([2000, 1500]) diff --git a/components/Feeds/Donut.tscn b/components/Feeds/Donut.tscn index 2379ea4..0784749 100644 --- a/components/Feeds/Donut.tscn +++ b/components/Feeds/Donut.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=4 format=3 uid="uid://bbmjur6cjmffo"] +[gd_scene load_steps=3 format=3 uid="uid://bbmjur6cjmffo"] [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_7gqm6"] [ext_resource type="Texture2D" uid="uid://bxqax0anr5a45" path="res://resources/feeds/donut.svg" id="2_bv6j5"] -[ext_resource type="Texture2D" uid="uid://d3op67s1hysla" path="res://resources/feeds/cheesy puffs.png" id="2_q5fyh"] [node name="Donut" instance=ExtResource("1_7gqm6")] avatarTexture = ExtResource("2_bv6j5") @@ -12,8 +11,5 @@ fieldValues = Array[float]([1.0, -3.0]) costs = Array[int]([0]) costCounts = Array[int]([100]) -[node name="avatar" parent="container/info" index="0"] -texture = ExtResource("2_q5fyh") - [node name="name" parent="container/info" index="1"] -text = "[b]奶酪泡芙[/b]" +text = "[b]甜甜圈[/b]" diff --git a/components/Feeds/FruitPlatter.tscn b/components/Feeds/FruitPlatter.tscn index ecae9fe..dac28c6 100644 --- a/components/Feeds/FruitPlatter.tscn +++ b/components/Feeds/FruitPlatter.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=4 format=3 uid="uid://b45fcafxjacch"] +[gd_scene load_steps=3 format=3 uid="uid://b45fcafxjacch"] [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_rejfg"] [ext_resource type="Texture2D" uid="uid://b7g4nciiimp1t" path="res://resources/feeds/fruit platter.png" id="2_6i6sp"] -[ext_resource type="Texture2D" uid="uid://b8uh5md8o4ihf" path="res://resources/feeds/fortune cookie.png" id="2_n0rfa"] [node name="FruitPlatter" instance=ExtResource("1_rejfg")] avatarTexture = ExtResource("2_6i6sp") @@ -13,7 +12,7 @@ costs = Array[int]([0, 1]) costCounts = Array[int]([150, 200]) [node name="avatar" parent="container/info" index="0"] -texture = ExtResource("2_n0rfa") +texture = ExtResource("2_6i6sp") [node name="name" parent="container/info" index="1"] -text = "[b]幸运签语饼[/b]" +text = "[b]水果拼盘[/b]" diff --git a/components/Feeds/FruitSalad.tscn b/components/Feeds/FruitSalad.tscn index 95aed33..7266437 100644 --- a/components/Feeds/FruitSalad.tscn +++ b/components/Feeds/FruitSalad.tscn @@ -15,4 +15,4 @@ costCounts = Array[int]([200]) texture = ExtResource("2_2oxe7") [node name="name" parent="container/info" index="1"] -text = "[b]水果拼盘[/b]" +text = "[b]水果沙拉[/b]" diff --git a/components/Feeds/Milk.tscn b/components/Feeds/Milk.tscn index 4f209a7..f90ebb6 100644 --- a/components/Feeds/Milk.tscn +++ b/components/Feeds/Milk.tscn @@ -1,19 +1,18 @@ -[gd_scene load_steps=4 format=3 uid="uid://cx5o43i2untlo"] +[gd_scene load_steps=3 format=3 uid="uid://cx5o43i2untlo"] [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_y8pe8"] -[ext_resource type="Texture2D" uid="uid://d3rkwlf75hvva" path="res://resources/feeds/jar-b.svg" id="2_5p5xn"] [ext_resource type="Texture2D" uid="uid://dhvv8isqodfd5" path="res://resources/feeds/milk-a.svg" id="2_15plv"] -[node name="FruitSalad" instance=ExtResource("1_y8pe8")] +[node name="Milk" instance=ExtResource("1_y8pe8")] avatarTexture = ExtResource("2_15plv") displayName = "牛奶" -fields = Array[int]([13, 11]) +fields = Array[int]([13, 11, 7]) fieldValues = Array[float]([0.4, 0.24]) costs = Array[int]([0, 1]) costCounts = Array[int]([355, 200]) [node name="avatar" parent="container/info" index="0"] -texture = ExtResource("2_5p5xn") +texture = ExtResource("2_15plv") [node name="name" parent="container/info" index="1"] -text = "[b]蜂蜜果酱[/b]" +text = "[b]牛奶[/b]" diff --git a/components/Feeds/Orange.tscn b/components/Feeds/Orange.tscn index 0cdb1d5..5eb8462 100644 --- a/components/Feeds/Orange.tscn +++ b/components/Feeds/Orange.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://byfn3ruhh0fid"] +[gd_scene load_steps=3 format=3 uid="uid://byfn3ruhh0fid"] [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_w5eks"] -[ext_resource type="Texture2D" uid="uid://d3rkwlf75hvva" path="res://resources/feeds/jar-b.svg" id="2_0xfoo"] [ext_resource type="Texture2D" uid="uid://5xp54g568jbb" path="res://resources/feeds/orange2-b.svg" id="2_l6jnq"] -[node name="FruitSalad" instance=ExtResource("1_w5eks")] +[node name="Orange" instance=ExtResource("1_w5eks")] avatarTexture = ExtResource("2_l6jnq") displayName = "橘子" fields = Array[int]([10, 3]) @@ -13,7 +12,7 @@ costs = Array[int]([1]) costCounts = Array[int]([275]) [node name="avatar" parent="container/info" index="0"] -texture = ExtResource("2_0xfoo") +texture = ExtResource("2_l6jnq") [node name="name" parent="container/info" index="1"] -text = "[b]蜂蜜果酱[/b]" +text = "[b]橘子[/b]" diff --git a/components/Feeds/RedJam.tscn b/components/Feeds/RedJam.tscn index 61c9fc2..d1b27aa 100644 --- a/components/Feeds/RedJam.tscn +++ b/components/Feeds/RedJam.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://dhyjvrmcql6ay"] +[gd_scene load_steps=3 format=3 uid="uid://dhyjvrmcql6ay"] [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_a74ax"] [ext_resource type="Texture2D" uid="uid://wa3p5atf521t" path="res://resources/feeds/jar-a.svg" id="2_o2o56"] -[ext_resource type="Texture2D" uid="uid://doyq5mp7wvv7s" path="res://resources/feeds/glass water-a.svg" id="2_q67vo"] -[node name="FruitSalad" instance=ExtResource("1_a74ax")] +[node name="RedJam" instance=ExtResource("1_a74ax")] avatarTexture = ExtResource("2_o2o56") displayName = "草莓果酱" fields = Array[int]([3, 1]) @@ -13,7 +12,7 @@ costs = Array[int]([0, 1]) costCounts = Array[int]([100, 50]) [node name="avatar" parent="container/info" index="0"] -texture = ExtResource("2_q67vo") +texture = ExtResource("2_o2o56") [node name="name" parent="container/info" index="1"] -text = "[b]一杯水[/b]" +text = "[b]草莓果酱[/b]" diff --git a/components/Feeds/Strawberry.tscn b/components/Feeds/Strawberry.tscn index 6a88117..991d5a8 100644 --- a/components/Feeds/Strawberry.tscn +++ b/components/Feeds/Strawberry.tscn @@ -3,7 +3,7 @@ [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_wr2cd"] [ext_resource type="Texture2D" uid="uid://cbyfpwrg2e3ns" path="res://resources/feeds/strawberry-a.svg" id="2_82amy"] -[node name="FruitSalad" instance=ExtResource("1_wr2cd")] +[node name="Strawberry" instance=ExtResource("1_wr2cd")] avatarTexture = ExtResource("2_82amy") displayName = "草莓" fields = Array[int]([14]) diff --git a/components/Feeds/Taco.tscn b/components/Feeds/Taco.tscn index ef8e213..1205082 100644 --- a/components/Feeds/Taco.tscn +++ b/components/Feeds/Taco.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://c52nrkruwwhyd"] +[gd_scene load_steps=3 format=3 uid="uid://c52nrkruwwhyd"] [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_iixnt"] [ext_resource type="Texture2D" uid="uid://pvcwt58hsg5i" path="res://resources/feeds/Taco.svg" id="2_eed3c"] -[ext_resource type="Texture2D" uid="uid://cbyfpwrg2e3ns" path="res://resources/feeds/strawberry-a.svg" id="2_kd8ai"] -[node name="FruitSalad" instance=ExtResource("1_iixnt")] +[node name="Taco" instance=ExtResource("1_iixnt")] avatarTexture = ExtResource("2_eed3c") displayName = "塔克" fields = Array[int]([13]) @@ -13,7 +12,7 @@ costs = Array[int]([1]) costCounts = Array[int]([225]) [node name="avatar" parent="container/info" index="0"] -texture = ExtResource("2_kd8ai") +texture = ExtResource("2_eed3c") [node name="name" parent="container/info" index="1"] -text = "[b]草莓[/b]" +text = "[b]塔克[/b]" diff --git a/components/Feeds/WaterBottle.tscn b/components/Feeds/WaterBottle.tscn index 6ca94cf..9a4431d 100644 --- a/components/Feeds/WaterBottle.tscn +++ b/components/Feeds/WaterBottle.tscn @@ -3,7 +3,7 @@ [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_vfxjq"] [ext_resource type="Texture2D" uid="uid://doyq5mp7wvv7s" path="res://resources/feeds/glass water-a.svg" id="2_gsfud"] -[node name="FruitSalad" instance=ExtResource("1_vfxjq")] +[node name="WaterBottle" instance=ExtResource("1_vfxjq")] avatarTexture = ExtResource("2_gsfud") displayName = "一杯水" fields = Array[int]([3]) diff --git a/components/Feeds/Xigua-Full.tscn b/components/Feeds/Xigua-Full.tscn index fb52035..fb40231 100644 --- a/components/Feeds/Xigua-Full.tscn +++ b/components/Feeds/Xigua-Full.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://dmdfxv7p8d061"] +[gd_scene load_steps=3 format=3 uid="uid://dmdfxv7p8d061"] [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_sw8vc"] -[ext_resource type="Texture2D" uid="uid://d3rkwlf75hvva" path="res://resources/feeds/jar-b.svg" id="2_e5g35"] [ext_resource type="Texture2D" uid="uid://ddxq46crf8s0b" path="res://resources/feeds/watermelon-a.svg" id="2_j4m35"] -[node name="FruitSalad" instance=ExtResource("1_sw8vc")] +[node name="Xigua-Full" instance=ExtResource("1_sw8vc")] avatarTexture = ExtResource("2_j4m35") displayName = "西瓜" fields = Array[int]([2, 0]) @@ -13,7 +12,7 @@ costs = Array[int]([0, 1]) costCounts = Array[int]([100, 125]) [node name="avatar" parent="container/info" index="0"] -texture = ExtResource("2_e5g35") +texture = ExtResource("2_j4m35") [node name="name" parent="container/info" index="1"] -text = "[b]蜂蜜果酱[/b]" +text = "[b]西瓜[/b]" diff --git a/components/Feeds/Xigua-Half.tscn b/components/Feeds/Xigua-Half.tscn index e2be89f..49e8318 100644 --- a/components/Feeds/Xigua-Half.tscn +++ b/components/Feeds/Xigua-Half.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://ub2joo082noq"] +[gd_scene load_steps=3 format=3 uid="uid://ub2joo082noq"] [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_bbid3"] [ext_resource type="Texture2D" uid="uid://m2q78i18f1do" path="res://resources/feeds/watermelon-c.svg" id="2_htt7g"] -[ext_resource type="Texture2D" uid="uid://ddxq46crf8s0b" path="res://resources/feeds/watermelon-a.svg" id="2_nwypg"] -[node name="FruitSalad" instance=ExtResource("1_bbid3")] +[node name="Xigua-Half" instance=ExtResource("1_bbid3")] avatarTexture = ExtResource("2_htt7g") displayName = "一片西瓜" fields = Array[int]([0]) @@ -13,7 +12,7 @@ costs = Array[int]([0]) costCounts = Array[int]([50]) [node name="avatar" parent="container/info" index="0"] -texture = ExtResource("2_nwypg") +texture = ExtResource("2_htt7g") [node name="name" parent="container/info" index="1"] -text = "[b]西瓜[/b]" +text = "[b]一片西瓜[/b]" diff --git a/components/Feeds/YellowJam.tscn b/components/Feeds/YellowJam.tscn index 8f2f9cd..f23ff36 100644 --- a/components/Feeds/YellowJam.tscn +++ b/components/Feeds/YellowJam.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://cuggrw1eiwlox"] +[gd_scene load_steps=3 format=3 uid="uid://cuggrw1eiwlox"] [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_evi6p"] [ext_resource type="Texture2D" uid="uid://d3rkwlf75hvva" path="res://resources/feeds/jar-b.svg" id="2_bea7w"] -[ext_resource type="Texture2D" uid="uid://wa3p5atf521t" path="res://resources/feeds/jar-a.svg" id="2_hqcck"] -[node name="FruitSalad" instance=ExtResource("1_evi6p")] +[node name="YellowJam" instance=ExtResource("1_evi6p")] avatarTexture = ExtResource("2_bea7w") displayName = "蜂蜜果酱" fields = Array[int]([3, 1]) @@ -13,7 +12,7 @@ costs = Array[int]([0, 1]) costCounts = Array[int]([200, 125]) [node name="avatar" parent="container/info" index="0"] -texture = ExtResource("2_hqcck") +texture = ExtResource("2_bea7w") [node name="name" parent="container/info" index="1"] -text = "[b]草莓果酱[/b]" +text = "[b]蜂蜜果酱[/b]" diff --git a/components/Scenes/FullscreenPanels/MakeFeed.tscn b/components/Scenes/FullscreenPanels/MakeFeed.tscn index 6cf76ba..56c0eea 100644 --- a/components/Scenes/FullscreenPanels/MakeFeed.tscn +++ b/components/Scenes/FullscreenPanels/MakeFeed.tscn @@ -1,25 +1,8 @@ -[gd_scene load_steps=21 format=3 uid="uid://1n28ji5sl6bx"] +[gd_scene load_steps=4 format=3 uid="uid://1n28ji5sl6bx"] [ext_resource type="PackedScene" uid="uid://d3qojeqa3difn" path="res://components/Abstracts/FullscreenPanelBase.tscn" id="1_1wmro"] [ext_resource type="Script" path="res://scripts/Contents/Panels/MakeFeed.gd" id="2_pr610"] -[ext_resource type="PackedScene" uid="uid://btisbc7ehj4fo" path="res://components/Feeds/Banana.tscn" id="3_f2lyw"] -[ext_resource type="PackedScene" uid="uid://dl34e70hpckp0" path="res://components/Feeds/Cake.tscn" id="4_lykfv"] -[ext_resource type="PackedScene" uid="uid://u58mo875ipgg" path="res://components/Feeds/Cupcake.tscn" id="5_mxuyf"] -[ext_resource type="PackedScene" uid="uid://dvl7u4jkugkhk" path="res://components/Feeds/Puffs.tscn" id="5_qnkr0"] -[ext_resource type="PackedScene" uid="uid://b3aymxd848400" path="res://components/Feeds/Dango.tscn" id="6_5d328"] -[ext_resource type="PackedScene" uid="uid://bbmjur6cjmffo" path="res://components/Feeds/Donut.tscn" id="7_g48y4"] -[ext_resource type="PackedScene" uid="uid://b45fcafxjacch" path="res://components/Feeds/FruitPlatter.tscn" id="8_iymw5"] -[ext_resource type="PackedScene" uid="uid://d3oh03276434b" path="res://components/Feeds/FruitSalad.tscn" id="9_crw8u"] -[ext_resource type="PackedScene" uid="uid://cuxon4is2qqyp" path="res://components/Feeds/LuckyCookie.tscn" id="10_cgxof"] -[ext_resource type="PackedScene" uid="uid://cx5o43i2untlo" path="res://components/Feeds/Milk.tscn" id="11_h7ihy"] -[ext_resource type="PackedScene" uid="uid://byfn3ruhh0fid" path="res://components/Feeds/Orange.tscn" id="12_f7je7"] -[ext_resource type="PackedScene" uid="uid://dhyjvrmcql6ay" path="res://components/Feeds/RedJam.tscn" id="14_42njn"] -[ext_resource type="PackedScene" uid="uid://cjcefxdt72d0k" path="res://components/Feeds/Strawberry.tscn" id="15_x5tul"] -[ext_resource type="PackedScene" uid="uid://c52nrkruwwhyd" path="res://components/Feeds/Taco.tscn" id="16_ixrhm"] -[ext_resource type="PackedScene" uid="uid://droytqrm4swm1" path="res://components/Feeds/WaterBottle.tscn" id="17_ws3t4"] -[ext_resource type="PackedScene" uid="uid://dmdfxv7p8d061" path="res://components/Feeds/Xigua-Full.tscn" id="18_7ync6"] -[ext_resource type="PackedScene" uid="uid://ub2joo082noq" path="res://components/Feeds/Xigua-Half.tscn" id="19_ti1ni"] -[ext_resource type="PackedScene" uid="uid://cuggrw1eiwlox" path="res://components/Feeds/YellowJam.tscn" id="20_tf31w"] +[ext_resource type="Theme" uid="uid://dhvs6urgf6jr5" path="res://themes/main.tres" id="3_q1rym"] [node name="MakeFeed" instance=ExtResource("1_1wmro")] script = ExtResource("2_pr610") @@ -44,25 +27,45 @@ autowrap_mode = 0 layout_mode = 2 alignment = 1 -[node name="select" type="RichTextLabel" parent="content/wrapper/tips/tip" index="0"] +[node name="before" type="RichTextLabel" parent="content/wrapper/tips/tip" index="0"] layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 4 bbcode_enabled = true -text = "可选择" +text = "在第" fit_content = true autowrap_mode = 0 -[node name="count" type="RichTextLabel" parent="content/wrapper/tips/tip" index="1"] +[node name="wave" type="RichTextLabel" parent="content/wrapper/tips/tip" index="1"] +unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 4 bbcode_enabled = true -text = "1" +text = "0" fit_content = true autowrap_mode = 0 -[node name="feed" type="RichTextLabel" parent="content/wrapper/tips/tip" index="2"] +[node name="select" type="RichTextLabel" parent="content/wrapper/tips/tip" index="2"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +bbcode_enabled = true +text = "波开始前可选择" +fit_content = true +autowrap_mode = 0 + +[node name="count" type="RichTextLabel" parent="content/wrapper/tips/tip" index="3"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +bbcode_enabled = true +text = "0" +fit_content = true +autowrap_mode = 0 + +[node name="feed" type="RichTextLabel" parent="content/wrapper/tips/tip" index="4"] layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 4 @@ -71,65 +74,20 @@ text = "项增益" fit_content = true autowrap_mode = 0 +[node name="skipBtn" type="Button" parent="content/wrapper/tips/tip" index="5"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +theme = ExtResource("3_q1rym") +text = "跳过" + [node name="feedcards" type="HBoxContainer" parent="content/wrapper" index="1"] unique_name_in_owner = true layout_mode = 2 theme_override_constants/separation = 30 alignment = 1 -[node name="avaliableFeeds" type="Node" parent="content/wrapper" index="2"] +[node name="avaliableFeeds" type="Node2D" parent="content/wrapper" index="2"] unique_name_in_owner = true - -[node name="Banana" parent="content/wrapper/avaliableFeeds" index="0" instance=ExtResource("3_f2lyw")] -visible = false - -[node name="Cake" parent="content/wrapper/avaliableFeeds" index="1" instance=ExtResource("4_lykfv")] -visible = false - -[node name="FruitSalad" parent="content/wrapper/avaliableFeeds" index="2" instance=ExtResource("5_mxuyf")] -visible = false - -[node name="FruitSalad2" parent="content/wrapper/avaliableFeeds" index="3" instance=ExtResource("6_5d328")] -visible = false - -[node name="Donut" parent="content/wrapper/avaliableFeeds" index="4" instance=ExtResource("7_g48y4")] -visible = false - -[node name="FruitPlatter" parent="content/wrapper/avaliableFeeds" index="5" instance=ExtResource("8_iymw5")] -visible = false - -[node name="FruitSalad3" parent="content/wrapper/avaliableFeeds" index="6" instance=ExtResource("9_crw8u")] -visible = false - -[node name="LuckyCookie" parent="content/wrapper/avaliableFeeds" index="7" instance=ExtResource("10_cgxof")] -visible = false - -[node name="FruitSalad4" parent="content/wrapper/avaliableFeeds" index="8" instance=ExtResource("11_h7ihy")] -visible = false - -[node name="FruitSalad5" parent="content/wrapper/avaliableFeeds" index="9" instance=ExtResource("12_f7je7")] -visible = false - -[node name="Puffs" parent="content/wrapper/avaliableFeeds" index="10" instance=ExtResource("5_qnkr0")] -visible = false - -[node name="FruitSalad6" parent="content/wrapper/avaliableFeeds" index="11" instance=ExtResource("14_42njn")] -visible = false - -[node name="FruitSalad7" parent="content/wrapper/avaliableFeeds" index="12" instance=ExtResource("15_x5tul")] -visible = false - -[node name="FruitSalad8" parent="content/wrapper/avaliableFeeds" index="13" instance=ExtResource("16_ixrhm")] -visible = false - -[node name="FruitSalad9" parent="content/wrapper/avaliableFeeds" index="14" instance=ExtResource("17_ws3t4")] -visible = false - -[node name="FruitSalad10" parent="content/wrapper/avaliableFeeds" index="15" instance=ExtResource("18_7ync6")] -visible = false - -[node name="FruitSalad11" parent="content/wrapper/avaliableFeeds" index="16" instance=ExtResource("19_ti1ni")] -visible = false - -[node name="FruitSalad12" parent="content/wrapper/avaliableFeeds" index="17" instance=ExtResource("20_tf31w")] visible = false diff --git a/components/UI/ItemDropped.tscn b/components/UI/ItemDropped.tscn index 27216f1..70351b3 100644 --- a/components/UI/ItemDropped.tscn +++ b/components/UI/ItemDropped.tscn @@ -4,7 +4,7 @@ [ext_resource type="Texture2D" uid="uid://bks8jmctleina" path="res://resources/items/baseball.svg" id="2_4hl42"] [sub_resource type="CircleShape2D" id="CircleShape2D_7lt1c"] -radius = 7.0 +radius = 2.0 [node name="ItemDropped" type="RigidBody2D"] script = ExtResource("1_v2djl") diff --git a/scripts/Contents/Panels/MakeFeed.gd b/scripts/Contents/Panels/MakeFeed.gd index 7f8209b..6df175e 100644 --- a/scripts/Contents/Panels/MakeFeed.gd +++ b/scripts/Contents/Panels/MakeFeed.gd @@ -1,26 +1,51 @@ @tool extends FullscreenPanelBase -@onready var avaliableFeeds: Node = $"%avaliableFeeds" +var selectedCount: int = 0 + +@onready var avaliableFeeds: Node2D = $"%avaliableFeeds" @onready var feedCards: HBoxContainer = $"%feedcards" +@onready var waveLabel: RichTextLabel = $"%wave" +@onready var countLabel: RichTextLabel = $"%count" +@onready var skipBtn: Button = $"%skipBtn" + +func _ready(): + skipBtn.pressed.connect( + func(): + finish() + ) + for file in DirTool.listdir("res://components/Feeds/"): + var i = load(file).instantiate() as Feed + i.selected.connect( + func(applied: bool): + if applied: + selectedCount += 1 + updateValue() + if selectedCount >= UIState.player.fields[FieldStore.Entity.FEED_COUNT_CAN_MADE]: + finish() + ) + avaliableFeeds.add_child(i) func beforeOpen(): + selectedCount = 0 + afterClose() + updateValue() var feeds: Array[Feed] = [] for i in avaliableFeeds.get_children(): feeds.append(i) - var allHad = false - while not allHad: - afterClose() - feeds.shuffle() - for i in range(3): - var feed = feeds[i] as Feed - feed.show() - avaliableFeeds.remove_child(feed) - feedCards.add_child(feed) - if feed.allHad(UIState.player): - allHad = true + feeds.shuffle() + for i in range(UIState.player.fields[FieldStore.Entity.FEED_COUNT_SHOW]): + var feed = feeds[i] as Feed + avaliableFeeds.remove_child(feed) + feedCards.add_child(feed) func afterClose(): for i in feedCards.get_children(): - i.hide() feedCards.remove_child(i) avaliableFeeds.add_child(i) + +func updateValue(): + waveLabel.text = str(Wave.current + 1) + countLabel.text = str(UIState.player.fields[FieldStore.Entity.FEED_COUNT_CAN_MADE] - selectedCount) +func finish(): + Wave.next() + UIState.closeCurrentPanel() diff --git a/scripts/Statemachine/EntityBase.gd b/scripts/Statemachine/EntityBase.gd index 46d0925..ff87474 100644 --- a/scripts/Statemachine/EntityBase.gd +++ b/scripts/Statemachine/EntityBase.gd @@ -16,7 +16,9 @@ var fields = { FieldStore.Entity.PENARATION_RESISTANCE: 0, FieldStore.Entity.PRICE_REDUCTION: 0, FieldStore.Entity.EXTRA_BULLET_COUNT: 0, - FieldStore.Entity.DROP_APPLE_RATE: 0 + FieldStore.Entity.DROP_APPLE_RATE: 0, + FieldStore.Entity.FEED_COUNT_SHOW: 3, + FieldStore.Entity.FEED_COUNT_CAN_MADE: 1 } var inventory = { ItemStore.ItemType.BASEBALL: 100, diff --git a/scripts/Statemachine/UIState.gd b/scripts/Statemachine/UIState.gd index 0aba493..29382dd 100644 --- a/scripts/Statemachine/UIState.gd +++ b/scripts/Statemachine/UIState.gd @@ -37,3 +37,5 @@ static func setPanel(targetName: String = ""): panel.showPanel() else: panel.hidePanel() +static func closeCurrentPanel(): + setPanel() diff --git a/scripts/Structs/Feed.gd b/scripts/Structs/Feed.gd index 46ac174..a748f42 100644 --- a/scripts/Structs/Feed.gd +++ b/scripts/Structs/Feed.gd @@ -2,6 +2,8 @@ extends PanelContainer class_name Feed +signal selected(applied: bool) + @export var avatarTexture: Texture2D = preload("res://icon.svg") @export var displayName: String = "未命名饲料" @export var fields: Array[FieldStore.Entity] = [] @@ -18,10 +20,7 @@ class_name Feed func _ready(): selectButton.pressed.connect( func(): - if apply(UIState.player): - UIState.setPanel() - queue_free() - Wave.next() + apply(UIState.player) ) avatarRect.texture = avatarTexture nameLabel.text = "[b]" + displayName + "[/b]" @@ -70,6 +69,8 @@ func apply(entity: EntityBase): var applier = FieldStore.entityApplier.get(field, null) if !applier or applier.call(entity, value): entity.fields[field] += value + hide() + selected.emit(allHave) return allHave func multipiler() -> float: if is_instance_valid(UIState.player): diff --git a/scripts/Tools/DirTool.gd b/scripts/Tools/DirTool.gd new file mode 100644 index 0000000..8f770ec --- /dev/null +++ b/scripts/Tools/DirTool.gd @@ -0,0 +1,16 @@ +class_name DirTool + +static func listdir(path: String) -> Array[String]: + var files: Array[String] = [] + var dir = DirAccess.open(path) + if dir: + dir.list_dir_begin() + var file_name = dir.get_next() + while file_name != "": + if file_name != "." and file_name != "..": + files.append(path + file_name) + file_name = dir.get_next() + dir.list_dir_end() + return files + else: + return [] diff --git a/scripts/Tools/FieldStore.gd b/scripts/Tools/FieldStore.gd index 8eef897..0e5de81 100644 --- a/scripts/Tools/FieldStore.gd +++ b/scripts/Tools/FieldStore.gd @@ -21,7 +21,9 @@ enum Entity { PENARATION_RESISTANCE, PRICE_REDUCTION, EXTRA_BULLET_COUNT, - DROP_APPLE_RATE + DROP_APPLE_RATE, + FEED_COUNT_SHOW, + FEED_COUNT_CAN_MADE } static var entityMap = { Entity.MAX_HEALTH: "最大生命值", @@ -38,7 +40,9 @@ static var entityMap = { Entity.PENARATION_RESISTANCE: "穿透抗性", Entity.PRICE_REDUCTION: "饲料降价", Entity.EXTRA_BULLET_COUNT: "额外子弹", - Entity.DROP_APPLE_RATE: "苹果掉落率" + Entity.DROP_APPLE_RATE: "苹果掉落率", + Entity.FEED_COUNT_SHOW: "可选饲料数量", + Entity.FEED_COUNT_CAN_MADE: "可制作饲料数量" } static var entityMapType = { Entity.MAX_HEALTH: DataType.VALUE, @@ -55,7 +59,9 @@ static var entityMapType = { Entity.PENARATION_RESISTANCE: DataType.PERCENT, Entity.PRICE_REDUCTION: DataType.PERCENT, Entity.EXTRA_BULLET_COUNT: DataType.VALUE, - Entity.DROP_APPLE_RATE: DataType.PERCENT + Entity.DROP_APPLE_RATE: DataType.PERCENT, + Entity.FEED_COUNT_SHOW: DataType.VALUE, + Entity.FEED_COUNT_CAN_MADE: DataType.VALUE } static var entityApplier = { Entity.MAX_HEALTH: func(entity, value): @@ -64,6 +70,9 @@ static var entityApplier = { Entity.EXTRA_APPLE_MAX: func(entity, value): entity.inventoryMax[ItemStore.ItemType.APPLE] += value , + Entity.EXTRA_BULLET_COUNT: func(entity, value): + entity.fields[Entity.OFFSET_SHOOT] += value * 5 + , } enum Bullet { diff --git a/scripts/Tools/TickTool.gd b/scripts/Tools/TickTool.gd index feea4a8..2a68894 100644 --- a/scripts/Tools/TickTool.gd +++ b/scripts/Tools/TickTool.gd @@ -1,4 +1,7 @@ class_name TickTool static func millseconds(ms: int): - return await WorldManager.tree.create_timer(ms / 1000.0).timeout \ No newline at end of file + return await WorldManager.tree.create_timer(ms / 1000.0).timeout +static func frame(count: int = 1): + for i in range(count): + await WorldManager.tree.physics_frame