Remove custom parameters in yaml. Rename the resource file.
移除在yaml内的自定义参数。重命名资源文件。
This commit is contained in:
parent
c397aff026
commit
219f207472
|
@ -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
|
|
@ -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
|
|
@ -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
|
||||
|
|
17
locals/Slogan.csv.import
Normal file
17
locals/Slogan.csv.import
Normal file
|
@ -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
|
|
@ -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")
|
|
@ -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"]
|
|
@ -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
|
|
@ -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;
|
||||
|
|
|
@ -108,15 +108,6 @@ public static class ItemTypeRegister
|
|||
//Create init delegate
|
||||
//创建初始化委托
|
||||
Action<Node?>? 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<CustomArg>? 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<Texture2D>("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);
|
||||
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
@ -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]
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
@ -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]
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user