r2mods/ilspy_dump/ror2_csproj/Assets.RoR2.Scripts.Platform/ActivityData.cs

37 lines
770 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using System.Collections.Generic;
using UnityEngine;
namespace Assets.RoR2.Scripts.Platform;
[CreateAssetMenu(menuName = "RoR2/ActivityData")]
public class ActivityData : ScriptableObject
{
[SerializeField]
private List<BaseActivity> activities;
public BaseActivity LookupActivityByID(string activityID)
{
foreach (BaseActivity activity in activities)
{
if (activity.ActivityID == activityID)
{
return activity;
}
}
return null;
}
public List<BaseActivity> CompareActivityCriteria(BaseActivitySelector activitySelector)
{
List<BaseActivity> list = new List<BaseActivity>();
foreach (BaseActivity activity in activities)
{
if (activitySelector.IsCompatibleWith(activity))
{
list.Add(activity);
}
}
return list;
}
}