diff --git a/data/itemRegs/packsacks.yaml b/data/itemRegs/packsacks.yaml index 8c83de3..707ade6 100644 --- a/data/itemRegs/packsacks.yaml +++ b/data/itemRegs/packsacks.yaml @@ -1,4 +1,9 @@ -- id: packsack - scene_path: res://prefab/packsacks/packsack.tscn - icon_path: res://sprites/packsack.png - max_stack_value: 1 +#Register an item container here. +#在这里注册物品容器。 + +#portable_backpacks +#便携式背包 +- id: portable_backpacks + scene_path: res://prefab/packsacks/PortableBackpacks.tscn + icon_path: res://sprites/PortableBackpacks.png + max_stack_value: 1 \ No newline at end of file diff --git a/data/itemRegs/weapons.yaml b/data/itemRegs/weapons.yaml index cae795e..41e5514 100644 --- a/data/itemRegs/weapons.yaml +++ b/data/itemRegs/weapons.yaml @@ -1,20 +1,9 @@ -- id: staff_of_the_undead - scene_path: res://prefab/weapons/staffOfTheUndead.tscn - icon_path: res://sprites/weapon/staffOfTheUndead_icon.png - max_stack_value: 1 - custom_args: - - name: UniqueName - type: string - value: 爱你! +#Register your weapon here. +#在这里注册你的武器。 -- id: degraded_staff_of_the_undead - scene_path: res://prefab/weapons/staffOfTheUndead.tscn - icon_path: res://sprites/weapon/staffOfTheUndead_icon.png - max_stack_value: 1 - custom_args: - - name: FiringIntervalAsMillisecond - type: int - value: 1000 - - name: UniqueName - type: string - value: item_staff_of_the_undead_desc +#staff_necromancy +#死灵法杖 +- id: staff_necromancy + scene_path: res://prefab/weapons/StaffNecromancy.tscn + icon_path: res://sprites/weapon/StaffNecromancy_Icon.png + max_stack_value: 1 \ No newline at end of file diff --git a/fonts/ark-pixel-12px-proportional-zh_cn.ttf.import b/fonts/ark-pixel-12px-proportional-zh_cn.ttf.import index 54fed65..6e97f80 100644 --- a/fonts/ark-pixel-12px-proportional-zh_cn.ttf.import +++ b/fonts/ark-pixel-12px-proportional-zh_cn.ttf.import @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/ark-pixel-12px-proportional-zh_cn.ttf-478ad47 Rendering=null antialiasing=1 generate_mipmaps=false +disable_embedded_bitmaps=true multichannel_signed_distance_field=false msdf_pixel_range=8 msdf_size=48 diff --git a/locals/Slogan.csv.import b/locals/Slogan.csv.import new file mode 100644 index 0000000..904b68b --- /dev/null +++ b/locals/Slogan.csv.import @@ -0,0 +1,17 @@ +[remap] + +importer="csv_translation" +type="Translation" +uid="uid://m1i5vqn3aq7e" + +[deps] + +files=["res://locals/Slogan.zh.translation", "res://locals/Slogan.en.translation", "res://locals/Slogan.ja.translation"] + +source_file="res://locals/Slogan.csv" +dest_files=["res://locals/Slogan.zh.translation", "res://locals/Slogan.en.translation", "res://locals/Slogan.ja.translation"] + +[params] + +compress=true +delimiter=0 diff --git a/prefab/packsacks/packsack.tscn b/prefab/packsacks/PortableBackpacks.tscn similarity index 81% rename from prefab/packsacks/packsack.tscn rename to prefab/packsacks/PortableBackpacks.tscn index 0c95327..90b577b 100644 --- a/prefab/packsacks/packsack.tscn +++ b/prefab/packsacks/PortableBackpacks.tscn @@ -1,7 +1,7 @@ -[gd_scene load_steps=5 format=3 uid="uid://cn10fimoem04m"] +[gd_scene load_steps=5 format=3 uid="uid://bq5d2w22wnxrf"] [ext_resource type="Script" path="res://scripts/inventory/Packsack.cs" id="1_slakl"] -[ext_resource type="Texture2D" uid="uid://dvx10dfjctn7t" path="res://sprites/packsack.png" id="2_40jca"] +[ext_resource type="Texture2D" uid="uid://di0sw4rgd26y0" path="res://sprites/PortableBackpacks.png" id="2_l0fbh"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_brthl"] size = Vector2(21, 29) @@ -30,4 +30,4 @@ shape = SubResource("RectangleShape2D_xqyue") [node name="Packsack" type="Sprite2D" parent="."] scale = Vector2(0.5, 0.5) -texture = ExtResource("2_40jca") +texture = ExtResource("2_l0fbh") diff --git a/prefab/weapons/staffOfTheUndead.tscn b/prefab/weapons/StaffNecromancy.tscn similarity index 92% rename from prefab/weapons/staffOfTheUndead.tscn rename to prefab/weapons/StaffNecromancy.tscn index 666f0d3..4ea975a 100644 --- a/prefab/weapons/staffOfTheUndead.tscn +++ b/prefab/weapons/StaffNecromancy.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=7 format=3 uid="uid://dnnn2xyayiehk"] -[ext_resource type="Texture2D" uid="uid://e6670ykyq145" path="res://sprites/weapon/staffOfTheUndead.png" id="1_ms3us"] +[ext_resource type="Texture2D" uid="uid://wt50kx6bup51" path="res://sprites/weapon/StaffNecromancy.png" id="1_ms3us"] [ext_resource type="Script" path="res://scripts/weapon/ProjectileWeapon.cs" id="1_w8hhv"] [ext_resource type="PackedScene" uid="uid://c01av43yk1q71" path="res://prefab/projectile/curseOfTheUndead.tscn" id="2_34250"] [ext_resource type="AudioStream" uid="uid://cak6chjjsu7wo" path="res://sounds/fire.wav" id="4_ffr2k"] diff --git a/scenes/LevelGraphEditor.tscn b/scenes/levelGraphEditor.tscn similarity index 98% rename from scenes/LevelGraphEditor.tscn rename to scenes/levelGraphEditor.tscn index 9bcbdb4..10d8890 100644 --- a/scenes/LevelGraphEditor.tscn +++ b/scenes/levelGraphEditor.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://ckl23uwxrjat4"] -[ext_resource type="Script" path="res://scripts/loader/uiLoader/LevelGraphEditorLoader.cs" id="1_g1axq"] +[ext_resource type="Script" path="res://scripts/loader/uiLoader/LevelGraphEditorLoader.cs" id="1_qgo7w"] [node name="LevelGraphEditor" type="Control"] layout_mode = 3 @@ -9,7 +9,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -script = ExtResource("1_g1axq") +script = ExtResource("1_qgo7w") [node name="GraphEdit" type="GraphEdit" parent="."] layout_mode = 1 diff --git a/scripts/character/AiCharacter.cs b/scripts/character/AiCharacter.cs index c035fe4..dae3f58 100644 --- a/scripts/character/AiCharacter.cs +++ b/scripts/character/AiCharacter.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using ColdMint.scripts.bubble; using ColdMint.scripts.camp; -using ColdMint.scripts.debug; using ColdMint.scripts.inventory; using ColdMint.scripts.stateMachine; using ColdMint.scripts.utils; diff --git a/scripts/inventory/ItemTypeRegister.cs b/scripts/inventory/ItemTypeRegister.cs index 54cb3b3..cf329ce 100644 --- a/scripts/inventory/ItemTypeRegister.cs +++ b/scripts/inventory/ItemTypeRegister.cs @@ -108,15 +108,6 @@ public static class ItemTypeRegister //Create init delegate //创建初始化委托 Action? setArgs = null; - if (typeInfo.CustomArgs != null && typeInfo.CustomArgs.Count > 0) - { - foreach (var arg in typeInfo.CustomArgs) - { - setArgs += - node => node?.SetDeferred(arg.Name, arg.ParseValue()); - } - } - //构造项目类型,寄存器 //construct item type, register var itemType = new ItemType(typeInfo.Id, @@ -146,44 +137,6 @@ public static class ItemTypeRegister string Id, string ScenePath, string IconPath, - int MaxStackValue, - IList? CustomArgs); - - private readonly record struct CustomArg(string Name, CustomArgType Type, string Value) - { - public Variant ParseValue() => - Type switch - { - CustomArgType.String => Value, - CustomArgType.Int => int.Parse(Value), - CustomArgType.Float => double.Parse(Value), - CustomArgType.Vector2 => ParseVector2FromString(Value), - CustomArgType.Bool => bool.Parse(Value), - CustomArgType.Texture => ResourceLoader.Load("res://sprites/" + Value), - _ => throw new ArgumentOutOfRangeException($"Unknown Arg Type {Type}") - }; - - private Vector2 ParseVector2FromString(string s) - { - var ss = s.Split(','); - if (ss.Length != 2) - { - LogCat.LogErrorWithFormat("wrong_custom_arg", LogCat.LogLabel.Default, LogCat.UploadFormat, "Vector2", - s); - return Vector2.Zero; - } - - return new Vector2(float.Parse(ss[0]), float.Parse(ss[1])); - } - } - - private enum CustomArgType - { - String, - Int, - Float, - Vector2, - Texture, - Bool, - } + int MaxStackValue); + } \ No newline at end of file diff --git a/scripts/loader/uiLoader/SplashScreenLoader.cs b/scripts/loader/uiLoader/SplashScreenLoader.cs index 318c314..31a4549 100644 --- a/scripts/loader/uiLoader/SplashScreenLoader.cs +++ b/scripts/loader/uiLoader/SplashScreenLoader.cs @@ -1,4 +1,3 @@ -using System; using System.IO; using System.Text; using System.Threading.Tasks; diff --git a/sprites/packsack.png b/sprites/PortableBackpacks.png similarity index 100% rename from sprites/packsack.png rename to sprites/PortableBackpacks.png diff --git a/sprites/packsack.png.import b/sprites/PortableBackpacks.png.import similarity index 66% rename from sprites/packsack.png.import rename to sprites/PortableBackpacks.png.import index 7f66256..8a01128 100644 --- a/sprites/packsack.png.import +++ b/sprites/PortableBackpacks.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://dvx10dfjctn7t" -path="res://.godot/imported/packsack.png-ba078a68a3754f332c41ffcad073a395.ctex" +uid="uid://di0sw4rgd26y0" +path="res://.godot/imported/PortableBackpacks.png-a6ce21006145ee0b58e687b1801240a6.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://sprites/packsack.png" -dest_files=["res://.godot/imported/packsack.png-ba078a68a3754f332c41ffcad073a395.ctex"] +source_file="res://sprites/PortableBackpacks.png" +dest_files=["res://.godot/imported/PortableBackpacks.png-a6ce21006145ee0b58e687b1801240a6.ctex"] [params] diff --git a/sprites/weapon/staffOfTheUndead.png b/sprites/weapon/StaffNecromancy.png similarity index 100% rename from sprites/weapon/staffOfTheUndead.png rename to sprites/weapon/StaffNecromancy.png diff --git a/sprites/weapon/staffOfTheUndead.png.import b/sprites/weapon/StaffNecromancy.png.import similarity index 66% rename from sprites/weapon/staffOfTheUndead.png.import rename to sprites/weapon/StaffNecromancy.png.import index 402f0da..af8b685 100644 --- a/sprites/weapon/staffOfTheUndead.png.import +++ b/sprites/weapon/StaffNecromancy.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://e6670ykyq145" -path="res://.godot/imported/staffOfTheUndead.png-9bf2297abccc48c9610807d69d632153.ctex" +uid="uid://wt50kx6bup51" +path="res://.godot/imported/StaffNecromancy.png-82a6bb745d120d5cf5445c4e669e3c6d.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://sprites/weapon/staffOfTheUndead.png" -dest_files=["res://.godot/imported/staffOfTheUndead.png-9bf2297abccc48c9610807d69d632153.ctex"] +source_file="res://sprites/weapon/StaffNecromancy.png" +dest_files=["res://.godot/imported/StaffNecromancy.png-82a6bb745d120d5cf5445c4e669e3c6d.ctex"] [params] diff --git a/sprites/weapon/staffOfTheUndead_icon.png b/sprites/weapon/StaffNecromancy_Icon.png similarity index 100% rename from sprites/weapon/staffOfTheUndead_icon.png rename to sprites/weapon/StaffNecromancy_Icon.png diff --git a/sprites/weapon/staffOfTheUndead_icon.png.import b/sprites/weapon/StaffNecromancy_Icon.png.import similarity index 68% rename from sprites/weapon/staffOfTheUndead_icon.png.import rename to sprites/weapon/StaffNecromancy_Icon.png.import index 9327de7..c382249 100644 --- a/sprites/weapon/staffOfTheUndead_icon.png.import +++ b/sprites/weapon/StaffNecromancy_Icon.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dg5vwprt66w4j" -path="res://.godot/imported/staffOfTheUndead_icon.png-4ca5c1341e2dac55b2ef4a0fc05b6e6c.ctex" +path="res://.godot/imported/StaffNecromancy_Icon.png-b792107cbd73ce862a81c86021ad2001.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://sprites/weapon/staffOfTheUndead_icon.png" -dest_files=["res://.godot/imported/staffOfTheUndead_icon.png-4ca5c1341e2dac55b2ef4a0fc05b6e6c.ctex"] +source_file="res://sprites/weapon/StaffNecromancy_Icon.png" +dest_files=["res://.godot/imported/StaffNecromancy_Icon.png-b792107cbd73ce862a81c86021ad2001.ctex"] [params]