init
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector;
|
||||
using VOID.Generic.Objects.Item;
|
||||
|
||||
namespace VOID.Generic.DropTable
|
||||
{
|
||||
[Serializable]
|
||||
public class DropTableGroup
|
||||
{
|
||||
[AssetsOnly]
|
||||
[RequiredListLength(MinLength = 1)]
|
||||
public List<ItemObject> items = new();
|
||||
|
||||
[MinValue(0)]
|
||||
public float weight = 1;
|
||||
|
||||
[HorizontalGroup]
|
||||
[OnValueChanged(nameof(OnIsLimitedChanged))]
|
||||
public bool isLimited;
|
||||
|
||||
[HorizontalGroup]
|
||||
[HideLabel]
|
||||
[EnableIf(nameof(isLimited))]
|
||||
[MinValue(1)]
|
||||
public int limit = 1;
|
||||
|
||||
private void OnIsLimitedChanged()
|
||||
{
|
||||
limit = isLimited ? 1 : 9999;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user