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;
|
float finalMultiplier = 1f;
|
||||||
for (int i = 0; i < ideo.PreceptsListForReading.Count; i++)
|
for (int i = 0; i < ideo.PreceptsListForReading.Count; i++)
|
||||||
{
|
{
|
||||||
float? multiplier = ideo.PreceptsListForReading[i].def.GetModExtension<T>()?.multiplier;
|
T defExtension = ideo.PreceptsListForReading[i].def.GetModExtension<T>();
|
||||||
if (multiplier != null)
|
|
||||||
finalMultiplier *= (float)multiplier;
|
if (defExtension == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (defExtension.disable)
|
||||||
|
return -1f;
|
||||||
|
|
||||||
|
finalMultiplier *= defExtension.multiplier;
|
||||||
}
|
}
|
||||||
return finalMultiplier;
|
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")]
|
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
|
||||||
public float multiplier = 1f;
|
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>
|
</rules>
|
||||||
</li>
|
</li>
|
||||||
<li Class="RJWSexperience.Ideology.Precepts.DefExtension_ModifyBestialityMtb">
|
<li Class="RJWSexperience.Ideology.Precepts.DefExtension_ModifyBestialityMtb">
|
||||||
<multiplier>5.0</multiplier>
|
<disable>true</disable>
|
||||||
</li>
|
</li>
|
||||||
</modExtensions>
|
</modExtensions>
|
||||||
</PreceptDef>
|
</PreceptDef>
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
</comps>
|
</comps>
|
||||||
<modExtensions>
|
<modExtensions>
|
||||||
<li Class="RJWSexperience.Ideology.Precepts.DefExtension_ModifyNecroMtb">
|
<li Class="RJWSexperience.Ideology.Precepts.DefExtension_ModifyNecroMtb">
|
||||||
<multiplier>8.0</multiplier>
|
<disable>true</disable>
|
||||||
</li>
|
</li>
|
||||||
</modExtensions>
|
</modExtensions>
|
||||||
</PreceptDef>
|
</PreceptDef>
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
</comps>
|
</comps>
|
||||||
<modExtensions>
|
<modExtensions>
|
||||||
<li Class="RJWSexperience.Ideology.Precepts.DefExtension_ModifyRapeCPMtb">
|
<li Class="RJWSexperience.Ideology.Precepts.DefExtension_ModifyRapeCPMtb">
|
||||||
<multiplier>3.0</multiplier>
|
<disable>true</disable>
|
||||||
</li>
|
</li>
|
||||||
</modExtensions>
|
</modExtensions>
|
||||||
</PreceptDef>
|
</PreceptDef>
|
||||||
|
|
Loading…
Reference in a new issue