mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
Adopt SexAbility, remove whoring patches
This commit is contained in:
parent
b1e6f05a23
commit
fd59e67233
7 changed files with 50 additions and 50 deletions
42
Defs/StatDefs/SexAbility.xml
Normal file
42
Defs/StatDefs/SexAbility.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<Defs>
|
||||
<StatDef>
|
||||
<defName>SexAbility</defName>
|
||||
<label>sex ability</label>
|
||||
<description>Measures whether or not a pawn is capable of sex, and how good they are at it</description>
|
||||
<category>PawnSocial</category>
|
||||
<defaultBaseValue>1.0</defaultBaseValue>
|
||||
<minValue>0.0</minValue>
|
||||
<toStringStyle>PercentTwo</toStringStyle>
|
||||
<!--<capacityFactors>
|
||||
<li>
|
||||
<capacity>Manipulation</capacity>
|
||||
<weight>0.5</weight>
|
||||
<max>1.5</max>
|
||||
</li>
|
||||
<li>
|
||||
<capacity>Consciousness</capacity>
|
||||
<weight>1.0</weight>
|
||||
</li>
|
||||
</capacityFactors>-->
|
||||
<skillNeedFactors>
|
||||
<li Class="SkillNeed_BaseBonus">
|
||||
<skill>Sex</skill>
|
||||
<baseValue>0.40</baseValue>
|
||||
<bonusPerLevel>0.15</bonusPerLevel>
|
||||
</li>
|
||||
</skillNeedFactors>
|
||||
<parts>
|
||||
<li Class="StatPart_Food">
|
||||
<factorUrgentlyHungry>0.9</factorUrgentlyHungry>
|
||||
<factorStarving>0.8</factorStarving>
|
||||
</li>
|
||||
<li Class="StatPart_Rest">
|
||||
<factorTired>0.9</factorTired>
|
||||
<factorVeryTired>0.7</factorVeryTired>
|
||||
<factorExhausted>0.5</factorExhausted>
|
||||
</li>
|
||||
</parts>
|
||||
</StatDef>
|
||||
</Defs>
|
|
@ -1,27 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<Patch>
|
||||
<Operation Class="PatchOperationReplace">
|
||||
<xpath>Defs/StatDef[defName="SexAbility"]/capacityFactors</xpath>
|
||||
<value>
|
||||
<capacityFactors>
|
||||
</capacityFactors>
|
||||
</value>
|
||||
</Operation>
|
||||
|
||||
<Operation Class="PatchOperationAdd">
|
||||
<xpath>Defs/StatDef[defName="SexAbility"]</xpath>
|
||||
<value>
|
||||
<skillNeedFactors>
|
||||
<li Class="rjw_CORE_EXPOSED.SkillNeed_BaseBonus">
|
||||
<skill>Sex</skill>
|
||||
<baseValue>0.40</baseValue>
|
||||
<bonusPerLevel>0.15</bonusPerLevel>
|
||||
</li>
|
||||
</skillNeedFactors>
|
||||
</value>
|
||||
</Operation>
|
||||
|
||||
<Operation Class="PatchOperationAdd">
|
||||
<xpath>Defs/StatDef[defName="SexFrequency"]/parts</xpath>
|
||||
<value>
|
||||
|
@ -37,6 +16,4 @@
|
|||
</li>
|
||||
</value>
|
||||
</Operation>
|
||||
|
||||
|
||||
</Patch>
|
|
@ -45,7 +45,7 @@ namespace RJWSexperience.Cum
|
|||
|
||||
try
|
||||
{
|
||||
res = part.FluidAmmount * part.FluidModifier * pawn.BodySize / pawn.RaceProps.baseBodySize * Rand.Range(0.8f, 1.2f) * RJWSettings.cum_on_body_amount_adjust * 0.3f;
|
||||
res = part.FluidAmmount * part.FluidModifier * pawn.BodySize / pawn.RaceProps.baseBodySize * Rand.Range(0.8f, 1.2f) * 0.3f;
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
|
|
|
@ -99,7 +99,6 @@ namespace RJWSexperience
|
|||
pawn.records.SetTo(xxx.CountOfSexWithHumanlikes, 0);
|
||||
pawn.records.SetTo(xxx.CountOfSexWithInsects, 0);
|
||||
pawn.records.SetTo(xxx.CountOfSexWithOthers, 0);
|
||||
pawn.records.SetTo(xxx.CountOfWhore, 0);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace RJWSexperience
|
|||
public static float GetSexStat(this Pawn pawn)
|
||||
{
|
||||
if (xxx.is_human(pawn) && !pawn.Dead)
|
||||
return pawn.GetStatValue(xxx.sex_stat);
|
||||
return pawn.GetStatValue(VariousDefOf.SexAbility);
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,34 +19,16 @@ namespace RJWSexperience
|
|||
{
|
||||
if (__instance.Sexprops.isRape && __instance.Sexprops.isReceiver)
|
||||
{
|
||||
__instance.pawn?.skills?.Learn(VariousDefOf.SexSkill, 0.05f, true);
|
||||
__instance.pawn?.skills?.Learn(VariousDefOf.Sex, 0.05f, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
__instance.pawn?.skills?.Learn(VariousDefOf.SexSkill, 0.35f, true);
|
||||
__instance.pawn?.skills?.Learn(VariousDefOf.Sex, 0.35f, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(WhoringHelper), "WhoreAbilityAdjustmentMin")]
|
||||
public static class RJW_Patch_WhoreAbilityAdjustmentMin
|
||||
{
|
||||
public static void Postfix(Pawn whore, ref float __result)
|
||||
{
|
||||
__result *= whore.GetSexStat();
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(WhoringHelper), "WhoreAbilityAdjustmentMax")]
|
||||
public static class RJW_Patch_WhoreAbilityAdjustmentMax
|
||||
{
|
||||
public static void Postfix(Pawn whore, ref float __result)
|
||||
{
|
||||
__result *= whore.GetSexStat();
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(SexUtility), nameof(SexUtility.SatisfyPersonal))]
|
||||
public static class RJW_Patch_SatisfyPersonal
|
||||
{
|
||||
|
@ -81,7 +63,7 @@ namespace RJWSexperience
|
|||
{
|
||||
public static void Postfix(Pawn pawn)
|
||||
{
|
||||
SkillRecord sexskill = pawn.skills.GetSkill(VariousDefOf.SexSkill);
|
||||
SkillRecord sexskill = pawn.skills.GetSkill(VariousDefOf.Sex);
|
||||
if (sexskill != null)
|
||||
{
|
||||
sexskill.passion = Passion.Major;
|
||||
|
|
|
@ -460,13 +460,13 @@ namespace RJWSexperience.SexHistory.UI
|
|||
TooltipHandler.TipRegion(tmp, RJWUIUtility.GetStatExplanation(pawn, xxx.sex_satisfaction, pawn.Dead ? 0 : pawn.GetStatValue(xxx.sex_satisfaction)));
|
||||
}
|
||||
|
||||
SkillRecord skill = pawn.skills?.GetSkill(VariousDefOf.SexSkill);
|
||||
SkillRecord skill = pawn.skills?.GetSkill(VariousDefOf.Sex);
|
||||
p = skill?.Level ?? 0;
|
||||
tmp = listmain.GetRect(FONTHEIGHT);
|
||||
FillableBarLabeled(tmp, String.Format(Keyed.RS_SexSkill + ": {0}, {1:P2}", p, skill?.xpSinceLastLevel / skill?.XpRequiredForLevelUp), p / 20, HistoryUtility.Tzeentch, Texture2D.blackTexture, null, String.Format(xxx.sex_stat.LabelCap.CapitalizeFirst() + ": {0:P2}", pawn.Dead ? 0 : pawn.GetStatValue(xxx.sex_stat)), HistoryUtility.PassionBG[(int)(skill?.passion ?? 0)]);
|
||||
FillableBarLabeled(tmp, $"{Keyed.RS_SexSkill}: {p}, {skill?.xpSinceLastLevel / skill?.XpRequiredForLevelUp:P2}", p / 20, HistoryUtility.Tzeentch, Texture2D.blackTexture, null, $"{VariousDefOf.SexAbility.LabelCap.CapitalizeFirst()}: {pawn.GetSexStat():P2}", HistoryUtility.PassionBG[(int)(skill?.passion ?? 0)]);
|
||||
if (Mouse.IsOver(tmp))
|
||||
{
|
||||
TooltipHandler.TipRegion(tmp, RJWUIUtility.GetStatExplanation(pawn, xxx.sex_stat, pawn.Dead ? 0 : pawn.GetStatValue(xxx.sex_stat)));
|
||||
TooltipHandler.TipRegion(tmp, RJWUIUtility.GetStatExplanation(pawn, VariousDefOf.SexAbility, pawn.GetSexStat()));
|
||||
}
|
||||
|
||||
listmain.Gap(1f);
|
||||
|
|
Loading…
Reference in a new issue