Data调整
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
@@ -7,6 +10,23 @@ namespace Continentis.Mods
|
||||
[CreateAssetMenu(fileName = "ModEditReference", menuName = "Continentis/Mod/Edit Reference", order = 2)]
|
||||
public class ModEditReference : ScriptableObject
|
||||
{
|
||||
[FormerlySerializedAs("keywordsReference")] public EditKeywordsReference cardKeywordsReference;
|
||||
[Serializable]
|
||||
public struct ContentGroup
|
||||
{
|
||||
public string groupName; // 例如 "FunctionalTags", "BuffIDs"
|
||||
public List<string> items;
|
||||
}
|
||||
|
||||
public List<ContentGroup> groups = new List<ContentGroup>();
|
||||
|
||||
public List<string> GetItems(string groupName)
|
||||
{
|
||||
foreach (var contentGroup in groups.Where(contentGroup => contentGroup.groupName == groupName))
|
||||
{
|
||||
return contentGroup.items;
|
||||
}
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user