32 lines
917 B
C#
32 lines
917 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using SLSUtilities.General;
|
|
using UnityEngine;
|
|
using UnityEngine.Serialization;
|
|
|
|
namespace Continentis.Mods
|
|
{
|
|
[CreateAssetMenu(fileName = "ModEditReference", menuName = "Continentis/Mod/Edit Reference", order = 2)]
|
|
public class ModEditReference : ScriptableObject
|
|
{
|
|
[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>();
|
|
}
|
|
}
|
|
} |