Files
Continentis/Assets/Scripts/MainGame/Character/CharacterData/CharacterAttributesDefaultCollection.cs

34 lines
1.6 KiB
C#
Raw Normal View History

2025-10-23 00:49:44 -04:00
using SLSFramework.General;
2026-03-20 11:56:50 -04:00
using Sirenix.OdinInspector;
2025-10-03 00:02:43 -04:00
using UnityEngine;
2025-10-23 00:49:44 -04:00
using UnityEngine.Serialization;
2025-10-03 00:02:43 -04:00
namespace Continentis.MainGame.Character
{
2026-03-20 11:56:50 -04:00
/// <summary>
/// 角色属性默认值模板。
/// 放置于 Assets/Mods/{ModName}/Characters/DefaultCollections/ 路径下才会被 PasteDefaultAttributes 识别并导入。
/// </summary>
[CreateAssetMenu(menuName = "Continentis/MainGame/Character/AttributesDefaultCollection",
fileName = "CharacterAttributesDefaultCollection")]
2025-10-23 00:49:44 -04:00
public class CharacterAttributesDefaultCollection : ScriptableObject
2025-10-03 00:02:43 -04:00
{
2026-03-20 11:56:50 -04:00
[TitleGroup("属性模板")]
[DictionaryDrawerSettings(KeyLabel = "属性名", ValueLabel = "属性值")]
[LabelText("核心属性 (Core)")]
[Tooltip("对应 CharacterData.coreAttributes")]
2025-10-23 00:49:44 -04:00
public SerializableDictionary<string, float> coreAttributes;
2026-03-20 11:56:50 -04:00
[DictionaryDrawerSettings(KeyLabel = "属性名", ValueLabel = "属性值")]
[LabelText("通常属性 (General)")]
[Tooltip("对应 CharacterData.generalAttributes")]
2025-10-23 00:49:44 -04:00
public SerializableDictionary<string, float> generalAttributes;
2026-03-20 11:56:50 -04:00
2025-10-23 00:49:44 -04:00
[FormerlySerializedAs("endowingGeneralAttributes")]
2026-03-20 11:56:50 -04:00
[DictionaryDrawerSettings(KeyLabel = "属性名", ValueLabel = "初始值表达式")]
[LabelText("运行时通常属性 (Runtime General)")]
[Tooltip("初始化时赋予给 CurrentGeneralAttributes 的属性Value 填写对应 GeneralAttributes 的 Key 名(或一个常数),留空则默认为 0。")]
2025-10-23 00:49:44 -04:00
public SerializableDictionary<string, string> runtimeGeneralAttributes;
2025-10-03 00:02:43 -04:00
}
}