22 lines
617 B
C#
22 lines
617 B
C#
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using Verse;
|
|
|
|
namespace RJWSexperience.Ideology
|
|
{
|
|
public class PreceptDefExtension_PreferSextype : DefModExtension
|
|
{
|
|
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
|
|
public List<string> sextypes = new List<string>();
|
|
private HashSet<string> sextypesHashSet;
|
|
|
|
public bool HasSextype(string sextype)
|
|
{
|
|
if (sextypesHashSet == null)
|
|
sextypesHashSet = new HashSet<string>(sextypes);
|
|
|
|
return sextypesHashSet.Contains(sextype);
|
|
}
|
|
}
|
|
}
|