Bug fixes

- Animation keys should be better synced with the animation (fewer instance of missing keys)
- Copied keyframes and cloned stages should no longer be linked to each other
-If you delete the first keyframe in a clip, instead of denying you, it will reset the associated actor it to its default starting position
- You can now move keyframes over the first one in a clip and override it. If less than two keys remain, new keys will be generated to a minimum of a two
- Fixed error when cycling through actor body parts
This commit is contained in:
AbstractConcept 2022-11-05 23:01:38 -05:00
parent 03e634e56c
commit a6a550af53
26 changed files with 519 additions and 469 deletions

View file

@ -33,7 +33,7 @@ namespace Privacy_Please
public class SubSexActReactionDef
{
public SexActThoughtDef defaultThoughtDef;
public List<SexActThoughtDef> associatedThoughtDefs;
public List<SexActThoughtDef> preceptThoughtDefs;
public List<ReplacementThought> replacementThoughts;
}
@ -41,21 +41,20 @@ namespace Privacy_Please
{
public List<TraitRequirement> requiredTraits;
public string requiredQuirk;
public PreceptDef requiredPreceptDef;
public SexActThoughtDef replacementThoughtDef;
}
public ReactionToSexAct DetermineReactionOfPawns(Pawn pawn, Pawn witness, bool applyThoughtDefs)
public void DetermineReactionOfPawns(Pawn pawn, Pawn witness, out ReactionToSexDiscovery reactionOfPawn, out ReactionToSexDiscovery reactionOfWitness, bool applyThoughtDefs)
{
DetermineReactionOfPawn(pawn, witness, pawnReaction, applyThoughtDefs);
ReactionToSexAct reactionToSexAct = DetermineReactionOfPawn(witness, pawn, witnessReaction, applyThoughtDefs);
return reactionToSexAct;
reactionOfPawn = DetermineReaction(pawn, witness, pawnReaction, applyThoughtDefs);
reactionOfWitness = DetermineReaction(witness, pawn, witnessReaction, applyThoughtDefs);
}
public ReactionToSexAct DetermineReactionOfPawn(Pawn reactor, Pawn otherPawn, SubSexActReactionDef reaction, bool applyThoughtDef)
public ReactionToSexDiscovery DetermineReaction(Pawn reactor, Pawn otherPawn, SubSexActReactionDef reaction, bool applyThoughtDef)
{
SexActThoughtDef thoughtDef = GetThoughtDefForReactor(reactor, reaction, out Precept precept);
ReactionToSexAct reactionToSexAct = thoughtDef.reactionToSexAct;
ReactionToSexDiscovery reactionToSexAct = thoughtDef.reactionToSexDiscovery;
if (applyThoughtDef)
{ reactor.needs.mood.thoughts.memories.TryGainMemory(thoughtDef, otherPawn, precept); }
@ -83,16 +82,22 @@ namespace Privacy_Please
if (replacementThought.requiredQuirk != null && xxx.has_quirk(reactor, replacementThought.requiredQuirk))
{ return replacementThought.replacementThoughtDef; }
if (replacementThought.requiredPreceptDef != null && reactor.ideo.Ideo.HasPrecept(replacementThought.requiredPreceptDef))
{
precept = reactor.ideo.Ideo.GetPrecept(replacementThought.requiredPreceptDef);
return replacementThought.replacementThoughtDef;
}
}
}
precept = reactor.GetPreceptForIssue(issueDef);
if (precept != null && reaction.associatedThoughtDefs.NullOrEmpty() == false)
if (precept != null && reaction.preceptThoughtDefs.NullOrEmpty() == false)
{
string thoughtDefName = precept.def.defName;
foreach (SexActThoughtDef associatedThoughtDef in reaction.associatedThoughtDefs)
foreach (SexActThoughtDef associatedThoughtDef in reaction.preceptThoughtDefs)
{
if (associatedThoughtDef.defName.Contains(thoughtDefName))
{ return associatedThoughtDef; }

View file

@ -9,6 +9,6 @@ namespace Privacy_Please
{
public class SexActThoughtDef : ThoughtDef
{
public ReactionToSexAct reactionToSexAct = ReactionToSexAct.Acceptance;
public ReactionToSexDiscovery reactionToSexDiscovery = ReactionToSexDiscovery.Acceptance;
}
}