2022-07-26 03:55:56 +00:00
|
|
|
|
using RimWorld;
|
2022-08-01 12:57:29 +00:00
|
|
|
|
using System.Collections.Generic;
|
2022-07-26 03:55:56 +00:00
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
|
using Verse;
|
|
|
|
|
|
2022-10-14 16:35:31 +00:00
|
|
|
|
namespace RJWSexperience.Ideology
|
2022-07-26 03:55:56 +00:00
|
|
|
|
{
|
|
|
|
|
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;
|
2022-08-01 12:57:29 +00:00
|
|
|
|
|
|
|
|
|
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";
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-07-26 03:55:56 +00:00
|
|
|
|
}
|
|
|
|
|
}
|