mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Resolve Merge conflicts
This commit is contained in:
commit
bf5617ffe0
35 changed files with 641 additions and 123 deletions
|
@ -24,6 +24,11 @@ namespace RJW_Genes
|
|||
{
|
||||
return false;
|
||||
}
|
||||
if (!RJW_GenesSettings.rjw_genes_sexdemon_visit_incubi && !RJW_GenesSettings.rjw_genes_sexdemon_visit_succubi)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (Pawn pawn in map.mapPawns.FreeColonistsAndPrisonersSpawned)
|
||||
{
|
||||
if (pawn.jobs.curDriver.asleep && xxx.need_some_sex(pawn) > 1f)
|
||||
|
@ -38,46 +43,68 @@ namespace RJW_Genes
|
|||
protected override bool TryExecuteWorker(IncidentParms parms)
|
||||
{
|
||||
Map map = (Map)parms.target;
|
||||
Pawn victim = ValidVictims(map).RandomElement();
|
||||
if (victim == null)
|
||||
List < Pawn > victims = ValidVictims(map).ToList();
|
||||
if(victims.NullOrEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
IntVec3 loc = victim.Position;
|
||||
Faction faction;
|
||||
if (!this.TryFindFormerFaction(out faction))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//Spawn succubus at pawn
|
||||
Pawn succubus = PawnGenerator.GeneratePawn(new PawnGenerationRequest(PawnKindDef.Named("rjw_genes_succubus"), faction, PawnGenerationContext.NonPlayer, -1,
|
||||
false, false, false, true, false, 1f, false, true, false, true, true, false, false, false, false, 0f, 0f, null, 1f, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, false, false, false, false, null, null, null, null, null, 0f,
|
||||
DevelopmentalStage.Adult, null, null, null, false));
|
||||
succubus.SetFaction(null, null);
|
||||
GenSpawn.Spawn(succubus, loc, map, WipeMode.Vanish);
|
||||
|
||||
//Set succubus behaviour
|
||||
List<Pawn> list = new List<Pawn> {succubus};
|
||||
LordMaker.MakeNewLord(parms.faction, this.CreateLordJob(parms, succubus, victim), map, list);
|
||||
|
||||
//Make succubus rape victim.
|
||||
if (RJWSettings.rape_enabled)
|
||||
int pawn_amount = RJW_GenesSettings.rjw_genes_sexdemon_visit_groups ? Rand.Range(1, victims.Count) : 1;
|
||||
List<Pawn> new_sexdemons = new List<Pawn>();
|
||||
for (int i = 0; i < pawn_amount; i++)
|
||||
{
|
||||
succubus.pather.StopDead();
|
||||
succubus.jobs.StopAll();
|
||||
Job newJob = JobMaker.MakeJob(xxx.RapeRandom, victim);
|
||||
succubus.jobs.StartJob(newJob, JobCondition.InterruptForced, null, false, true, null, null, false, false, null, false, true);
|
||||
}
|
||||
Pawn victim = victims.RandomElement();
|
||||
IntVec3 loc = victim.Position;
|
||||
|
||||
//Broken for now
|
||||
//Sends letter
|
||||
//string value = succubus.DevelopmentalStage.Child() ? "FeralChild".Translate().ToString() : succubus.KindLabel;
|
||||
//TaggedString value2 = succubus.DevelopmentalStage.Child() ? "Child".Translate() : "Person".Translate();
|
||||
//TaggedString baseLetterLabel = this.def.letterLabel.Formatted(value).CapitalizeFirst();
|
||||
//TaggedString baseLetterText = this.def.letterText.Formatted(succubus.NameShortColored, value2, succubus.Named("PAWN")).AdjustedFor(succubus, "PAWN", true).CapitalizeFirst();
|
||||
//PawnRelationUtility.TryAppendRelationsWithColonistsInfo(ref baseLetterText, ref baseLetterLabel, succubus);
|
||||
PawnKindDef pawnKindDef;
|
||||
Gender gender;
|
||||
if (victim.gender == Gender.Male || !RJW_GenesSettings.rjw_genes_sexdemon_visit_incubi)
|
||||
{
|
||||
|
||||
}
|
||||
if ((Rand.Bool && RJW_GenesSettings.rjw_genes_sexdemon_visit_succubi) || !RJW_GenesSettings.rjw_genes_sexdemon_visit_incubi)
|
||||
{
|
||||
pawnKindDef = PawnKindDef.Named("rjw_genes_succubus");
|
||||
gender = Gender.Female;
|
||||
}
|
||||
else
|
||||
{
|
||||
pawnKindDef = PawnKindDef.Named("rjw_genes_incubus");
|
||||
gender = Gender.Male;
|
||||
}
|
||||
|
||||
//Spawn succubus at pawn
|
||||
Pawn sexdemon = PawnGenerator.GeneratePawn(new PawnGenerationRequest(pawnKindDef, faction, PawnGenerationContext.NonPlayer, -1,
|
||||
false, false, false, true, false, 1f, false, true, false, true, true, false, false, false, false, 0f, 0f, null, 1f, null, null,
|
||||
null, null, null, null, null, gender, null, null, null, null, false, false, false, false, null, null, null, null, null, 0f,
|
||||
DevelopmentalStage.Adult, null, null, null, false));
|
||||
sexdemon.SetFaction(null, null);
|
||||
GenSpawn.Spawn(sexdemon, loc, map, WipeMode.Vanish);
|
||||
List<Pawn> sexdemons = new List<Pawn> { sexdemon };
|
||||
new_sexdemons.Add(sexdemon);
|
||||
|
||||
|
||||
LordMaker.MakeNewLord(Faction.OfPlayer, this.CreateLordJob(parms, sexdemon, victim), map, sexdemons);
|
||||
|
||||
//Make succubus rape victim.
|
||||
if (RJWSettings.rape_enabled)
|
||||
{
|
||||
//follow rjw rules
|
||||
if (SexAppraiser.would_fuck(sexdemon,victim) > 0f)
|
||||
{
|
||||
sexdemon.pather.StopDead();
|
||||
sexdemon.jobs.StopAll();
|
||||
Job newJob = JobMaker.MakeJob(xxx.RapeRandom, victim);
|
||||
sexdemon.jobs.StartJob(newJob, JobCondition.InterruptForced, null, false, true, null, null, false, false, null, false, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Find.LetterStack.ReceiveLetter("rjw_genes_sexdemon_visit_incident_label".Translate(), "rjw_genes_sexdemon_visit_incident_description".Translate(), LetterDefOf.PositiveEvent, new_sexdemons, null, null, null, null);
|
||||
//base.SendStandardLetter(baseLetterLabel, baseLetterText, this.def.letterDef, parms, succubus, Array.Empty<NamedArgument>());
|
||||
|
||||
return true;
|
||||
|
|
|
@ -7,6 +7,7 @@ using Verse;
|
|||
using Verse.AI;
|
||||
using Verse.AI.Group;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
namespace RJW_Genes
|
||||
{
|
||||
//Based on LordJob_VisitColony
|
||||
|
@ -52,8 +53,7 @@ namespace RJW_Genes
|
|||
tickLimit = Rand.Range(60000, 180000); //~1-3 days
|
||||
}
|
||||
transition1.AddTrigger(new Trigger_TicksPassed(tickLimit));
|
||||
|
||||
transition1.AddPreAction(new TransitionAction_Message("SuccubusLeaving".Translate(), null, 1f));
|
||||
transition1.AddPreAction(new TransitionAction_Custom(new Action(this.SuccubiLeave))); //Join or leave colony
|
||||
stateGraph.AddTransition(transition1);
|
||||
|
||||
//If they become hostile
|
||||
|
@ -84,7 +84,26 @@ namespace RJW_Genes
|
|||
Scribe_Values.Look<int?>(ref this.durationTicks, "durationTicks", null, false);
|
||||
Scribe_References.Look<Pawn>(ref this.target, "target", false);
|
||||
}
|
||||
|
||||
public void SuccubiLeave()
|
||||
{
|
||||
foreach (Pawn pawn in this.lord.ownedPawns)
|
||||
{
|
||||
if(colonyJoiners.Contains(pawn))
|
||||
{
|
||||
RecruitUtility.Recruit(pawn, Faction.OfPlayer);
|
||||
Find.LetterStack.ReceiveLetter("Guest Joins", string.Format("{0} enjoys it here and has decided to stay", xxx.get_pawnname(pawn)), LetterDefOf.PositiveEvent, pawn, null, null, null, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
Messages.Message("SuccubusLeaving".Translate(xxx.get_pawnname(pawn)), pawn, MessageTypeDefOf.NeutralEvent, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Pawn target;
|
||||
private int? durationTicks;
|
||||
public List<Pawn> colonyJoiners = new List<Pawn>();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue