mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
Add disable flag for abhorrent precepts
This commit is contained in:
parent
4d919c86d2
commit
b5e1dcc38b
5 changed files with 14 additions and 6 deletions
|
@ -61,9 +61,15 @@ namespace RJWSexperience.Ideology
|
|||
float finalMultiplier = 1f;
|
||||
for (int i = 0; i < ideo.PreceptsListForReading.Count; i++)
|
||||
{
|
||||
float? multiplier = ideo.PreceptsListForReading[i].def.GetModExtension<T>()?.multiplier;
|
||||
if (multiplier != null)
|
||||
finalMultiplier *= (float)multiplier;
|
||||
T defExtension = ideo.PreceptsListForReading[i].def.GetModExtension<T>();
|
||||
|
||||
if (defExtension == null)
|
||||
continue;
|
||||
|
||||
if (defExtension.disable)
|
||||
return -1f;
|
||||
|
||||
finalMultiplier *= defExtension.multiplier;
|
||||
}
|
||||
return finalMultiplier;
|
||||
}
|
||||
|
|
|
@ -7,5 +7,7 @@ namespace RJWSexperience.Ideology.Precepts
|
|||
{
|
||||
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
|
||||
public float multiplier = 1f;
|
||||
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
|
||||
public bool disable = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
</rules>
|
||||
</li>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.DefExtension_ModifyBestialityMtb">
|
||||
<multiplier>5.0</multiplier>
|
||||
<disable>true</disable>
|
||||
</li>
|
||||
</modExtensions>
|
||||
</PreceptDef>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</comps>
|
||||
<modExtensions>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.DefExtension_ModifyNecroMtb">
|
||||
<multiplier>8.0</multiplier>
|
||||
<disable>true</disable>
|
||||
</li>
|
||||
</modExtensions>
|
||||
</PreceptDef>
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
</comps>
|
||||
<modExtensions>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.DefExtension_ModifyRapeCPMtb">
|
||||
<multiplier>3.0</multiplier>
|
||||
<disable>true</disable>
|
||||
</li>
|
||||
</modExtensions>
|
||||
</PreceptDef>
|
||||
|
|
Loading…
Reference in a new issue