rjw-sexperience-ideology/Source/IdeologyAddon/Thoughts/ThoughtDefExtension_Increas...

34 lines
857 B
C#

using RimWorld;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Verse;
namespace RJWSexperience.Ideology
{
public class ThoughtDefExtension_IncreaseRecord : DefModExtension
{
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public RecordDef recordDef;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public float increment;
public override IEnumerable<string> ConfigErrors()
{
foreach (string error in base.ConfigErrors())
{
yield return error;
}
if (recordDef == null)
{
yield return "<recordDef> is empty";
}
if (increment == 0f)
{
yield return "<increment> is empty or 0";
}
}
}
}