mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Added Generous Donor Cheatmode - default off
This commit is contained in:
parent
a557bdb7d7
commit
bef15bd4fc
2 changed files with 39 additions and 16 deletions
|
@ -73,10 +73,19 @@ namespace RJW_Genes
|
||||||
&& !props.pawn.health.hediffSet.HasHediff(HediffDefOf.rjw_genes_succubus_drained)
|
&& !props.pawn.health.hediffSet.HasHediff(HediffDefOf.rjw_genes_succubus_drained)
|
||||||
&& !GeneUtility.IsSexualDrainer(props.pawn))
|
&& !GeneUtility.IsSexualDrainer(props.pawn))
|
||||||
{
|
{
|
||||||
if (RJW_Genes_Settings.rjw_genes_detailed_debug)
|
if (GeneUtility.IsGenerousDonor(props.pawn) && RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode)
|
||||||
ModLog.Message($"{props.pawn.Name} has been (sexually) drained by {PawnWithLifeForce.Name}");
|
{
|
||||||
props.pawn.health.AddHediff(HediffDefOf.rjw_genes_succubus_drained);
|
// Cheatmode is on, do not drain but give life
|
||||||
GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(PawnWithLifeForce), LIFEFORCE_GAINED_FROM_DRAINER_GENE);
|
GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(PawnWithLifeForce), LIFEFORCE_GAINED_FROM_DRAINER_GENE);
|
||||||
|
if (RJW_Genes_Settings.rjw_genes_detailed_debug)
|
||||||
|
ModLog.Message($"{props.pawn.Name} was not (sexually) drained by {PawnWithLifeForce.Name}, because Cheatmode for Generous Donors is on");
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
if (RJW_Genes_Settings.rjw_genes_detailed_debug)
|
||||||
|
ModLog.Message($"{props.pawn.Name} has been (sexually) drained by {PawnWithLifeForce.Name}");
|
||||||
|
props.pawn.health.AddHediff(HediffDefOf.rjw_genes_succubus_drained);
|
||||||
|
GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(PawnWithLifeForce), LIFEFORCE_GAINED_FROM_DRAINER_GENE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,20 +97,26 @@ namespace RJW_Genes
|
||||||
|
|
||||||
Hediff fertilin_lost = props.pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.rjw_genes_fertilin_lost);
|
Hediff fertilin_lost = props.pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.rjw_genes_fertilin_lost);
|
||||||
//Around quarter get ejected everytime pawn cums
|
//Around quarter get ejected everytime pawn cums
|
||||||
float multiplier = Rand.Range(0.10f, 0.40f);
|
float multiplier = Rand.Range(0.10f, 0.40f);
|
||||||
|
|
||||||
|
|
||||||
//Create a new ferilin_lost hediff or increase it
|
if (GeneUtility.IsGenerousDonor(props.pawn) && RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode)
|
||||||
if (fertilin_lost == null)
|
|
||||||
{
|
{
|
||||||
Hediff new_fertilin_lost = HediffMaker.MakeHediff(HediffDefOf.rjw_genes_fertilin_lost, props.pawn);
|
// Do nothing, Cheatmode is on
|
||||||
props.pawn.health.AddHediff(new_fertilin_lost);
|
multiplier = 1;
|
||||||
new_fertilin_lost.Severity = multiplier;
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
//Create a new ferilin_lost hediff or increase it
|
||||||
multiplier *= 1 - fertilin_lost.Severity;
|
if (fertilin_lost == null)
|
||||||
fertilin_lost.Severity += multiplier;
|
{
|
||||||
|
Hediff new_fertilin_lost = HediffMaker.MakeHediff(HediffDefOf.rjw_genes_fertilin_lost, props.pawn);
|
||||||
|
props.pawn.health.AddHediff(new_fertilin_lost);
|
||||||
|
new_fertilin_lost.Severity = multiplier;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
multiplier *= 1 - fertilin_lost.Severity;
|
||||||
|
fertilin_lost.Severity += multiplier;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
multiplier *= absorb_percentage;
|
multiplier *= absorb_percentage;
|
||||||
|
|
|
@ -36,6 +36,9 @@ namespace RJW_Genes
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
listing_Standard.Gap(5f);
|
||||||
|
listing_Standard.CheckboxLabeled("generous-donor cheatmode", ref rjw_genes_generous_donor_cheatmode, "When enabled, pawns with the 'generous donor' are not drained and not fertilin exhausted. Hence they can fuel succubi and incubi non-stop. This makes them drastically easier to keep, and you should not do it.", 0f, 1f);
|
||||||
|
|
||||||
listing_Standard.Gap(5f);
|
listing_Standard.Gap(5f);
|
||||||
listing_Standard.CheckboxLabeled("detailed-debug", ref rjw_genes_detailed_debug, "Adds detailed information to the log about interactions and genes.", 0f, 1f);
|
listing_Standard.CheckboxLabeled("detailed-debug", ref rjw_genes_detailed_debug, "Adds detailed information to the log about interactions and genes.", 0f, 1f);
|
||||||
listing_Standard.End();
|
listing_Standard.End();
|
||||||
|
@ -46,11 +49,14 @@ namespace RJW_Genes
|
||||||
base.ExposeData();
|
base.ExposeData();
|
||||||
Scribe_Values.Look<float>(ref RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor, "rjw_genes_fertilin_from_animals_factor", RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor, true);
|
Scribe_Values.Look<float>(ref RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor, "rjw_genes_fertilin_from_animals_factor", RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor, true);
|
||||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_detailed_debug, "rjw_genes_detailed_debug", RJW_Genes_Settings.rjw_genes_detailed_debug, true);
|
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_detailed_debug, "rjw_genes_detailed_debug", RJW_Genes_Settings.rjw_genes_detailed_debug, true);
|
||||||
|
|
||||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit, "rjw_genes_sexdemon_visit", RJW_Genes_Settings.rjw_genes_sexdemon_visit, true);
|
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit, "rjw_genes_sexdemon_visit", RJW_Genes_Settings.rjw_genes_sexdemon_visit, true);
|
||||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_join_size_matters, "rjw_genes_sexdemon_join_size_matters", RJW_Genes_Settings.rjw_genes_sexdemon_join_size_matters, true);
|
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_join_size_matters, "rjw_genes_sexdemon_join_size_matters", RJW_Genes_Settings.rjw_genes_sexdemon_join_size_matters, true);
|
||||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_groups, "rjw_genes_sexdemon_groups", RJW_Genes_Settings.rjw_genes_sexdemon_visit_groups, true);
|
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_groups, "rjw_genes_sexdemon_groups", RJW_Genes_Settings.rjw_genes_sexdemon_visit_groups, true);
|
||||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi, "rjw_genes_sexdemon_succubi", RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi, true);
|
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi, "rjw_genes_sexdemon_succubi", RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi, true);
|
||||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi, "rjw_genes_sexdemon_incubi", RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi, true);
|
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi, "rjw_genes_sexdemon_incubi", RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi, true);
|
||||||
|
|
||||||
|
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode, "rjw_genes_generous_donor_cheatmode", RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool rjw_genes_detailed_debug = false;
|
public static bool rjw_genes_detailed_debug = false;
|
||||||
|
@ -62,5 +68,7 @@ namespace RJW_Genes
|
||||||
public static bool rjw_genes_sexdemon_visit_groups = true;
|
public static bool rjw_genes_sexdemon_visit_groups = true;
|
||||||
public static bool rjw_genes_sexdemon_visit_succubi = true;
|
public static bool rjw_genes_sexdemon_visit_succubi = true;
|
||||||
public static bool rjw_genes_sexdemon_visit_incubi = true;
|
public static bool rjw_genes_sexdemon_visit_incubi = true;
|
||||||
|
|
||||||
|
public static bool rjw_genes_generous_donor_cheatmode = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue