37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using RPGCore.Core.Objects;
|
|
using RPGCore.StatusEffect.ObjectModules.StatusObjectModule.Effects;
|
|
using RPGCoreCommon.DynamicValues;
|
|
using RPGCoreCommon.Helpers.CustomTypes;
|
|
using UnityEngine;
|
|
|
|
namespace RPGCore.StatusEffect.ObjectModules.StatusObjectModule
|
|
{
|
|
[Serializable]
|
|
[CreateAssetMenu(menuName = "RPG Core/Status")]
|
|
public class StatusDefinitionSO : ScriptableObject
|
|
{
|
|
[Header("Connected to:")]
|
|
[SerializableType(typeof(BaseObject), allowAbstract: true)] public SerializableType forType;
|
|
|
|
[Header("Display")]
|
|
public string displayName;
|
|
public bool hidden;
|
|
public Texture2D displayIcon;
|
|
[DynamicValue(DynamicValueType.ByDynamicTypes)] public DynamicValue description;
|
|
|
|
[Header("Duration")]
|
|
public bool permanent;
|
|
[Min(0)] public float time;
|
|
|
|
[Header("Effects")]
|
|
[SerializeReference] public List<Effect> effects = new();
|
|
|
|
private void OnValidate()
|
|
{
|
|
description.RemoveDynamicTypes();
|
|
description.SetDynamicType("object", forType);
|
|
}
|
|
}
|
|
} |