mirror of
https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
synced 2024-08-15 00:43:19 +00:00
Refactor Thought_IncreaseRecord, also fix null error in it if no sexperience
This commit is contained in:
parent
75023a9d05
commit
6767feb57c
2 changed files with 31 additions and 57 deletions
|
@ -1,4 +1,5 @@
|
|||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Verse;
|
||||
|
||||
|
@ -10,5 +11,23 @@ namespace RJWSexperience
|
|||
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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue