28 lines
631 B
C#
28 lines
631 B
C#
using System.Collections.Generic;
|
|
|
|
namespace rjwquirks.Modules.Quirks.Comps
|
|
{
|
|
public class ValueModifier_ApplyOffset : ValueModifier
|
|
{
|
|
public float offset;
|
|
|
|
public override void ModifyValue(ref float value)
|
|
{
|
|
value += offset;
|
|
}
|
|
|
|
public override IEnumerable<string> ConfigErrors(QuirkDef parent)
|
|
{
|
|
foreach (string error in base.ConfigErrors(parent))
|
|
{
|
|
yield return error;
|
|
}
|
|
|
|
if (offset == 0f)
|
|
{
|
|
yield return "<offset> is empty or is 0";
|
|
}
|
|
}
|
|
}
|
|
}
|