rjw-sexperience-ideology/Source/IdeologyAddon/Precepts/DefExtension_ModifyMtb.cs
amevarashi e622b7a391 Added settings for romance patches
Added in-game explanation for DefExtension_ModifyMtb effect
2023-06-25 18:54:32 +05:00

28 lines
775 B
C#

using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Verse;
namespace RJWSexperience.Ideology.Precepts
{
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field values are loaded from XML")]
public abstract class DefExtension_ModifyMtb : DefModExtension, IPreceptTipPostfix
{
protected abstract string TipTemplateKey { get; }
public float multiplier = 1f;
public string GetTip() => TipTemplateKey.Translate(multiplier.ToString());
public override IEnumerable<string> ConfigErrors()
{
if (multiplier == 1f)
{
yield return "There is no point if <multiplier> is 1";
}
else if (multiplier <= 0f)
{
yield return "<multiplier> must be > 0";
}
}
}
}