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

@ -19,15 +19,9 @@ namespace Privacy_Please
return bed != null;
}
public static bool IsSeated(this Pawn pawn, out Building seat)
{
seat = pawn.Position.GetThingList(pawn.Map).FirstOrDefault(x => x is Building && x.def.building.isSittable) as Building;
return seat != null;
}
public static bool IsHavingSex(this Pawn pawn)
{
if (pawn?.jobs?.curDriver == null || pawn.Dead || pawn.jobs.curDriver is JobDriver_Sex == false)
if (pawn?.jobs?.curDriver == null || pawn.jobs.curDriver is JobDriver_Sex == false)
{ return false; }
JobDriver_Sex jobdriver = pawn.jobs.curDriver as JobDriver_Sex;
@ -37,7 +31,7 @@ namespace Privacy_Please
public static bool IsMasturbating(this Pawn pawn)
{
if (pawn?.jobs?.curDriver == null || pawn.Dead || pawn.jobs.curDriver is JobDriver_Sex == false)
if (pawn?.jobs?.curDriver == null || pawn.jobs.curDriver is JobDriver_Sex == false)
{ return false; }
JobDriver_Sex jobdriver = pawn.jobs.curDriver as JobDriver_Sex;
@ -47,12 +41,12 @@ namespace Privacy_Please
public static Pawn GetSexInitiator(this Pawn pawn)
{
if (pawn?.jobs?.curDriver != null && pawn.Dead == false && pawn.jobs.curDriver is JobDriver_SexBaseInitiator)
if (pawn?.jobs?.curDriver != null && pawn.jobs.curDriver is JobDriver_SexBaseInitiator)
{ return pawn; }
JobDriver_SexBaseReciever jobDriver = pawn.jobs.curDriver as JobDriver_SexBaseReciever;
if (jobDriver?.Partner?.jobs?.curDriver != null && jobDriver.Partner.Dead == false && jobDriver.Partner.jobs.curDriver is JobDriver_SexBaseInitiator)
if (jobDriver?.Partner?.jobs?.curDriver != null && jobDriver.Partner.jobs.curDriver is JobDriver_SexBaseInitiator)
{ return jobDriver.Partner; }
return null;
@ -65,7 +59,7 @@ namespace Privacy_Please
JobDriver_SexBaseInitiator jobDriver = pawn.jobs.curDriver as JobDriver_SexBaseInitiator;
if (jobDriver?.Partner?.jobs?.curDriver != null && jobDriver.Partner.Dead == false && jobDriver.Partner.jobs.curDriver is JobDriver_SexBaseReciever)
if (jobDriver?.Partner?.jobs?.curDriver != null && jobDriver.Partner.jobs.curDriver is JobDriver_SexBaseReciever)
{ return jobDriver.Partner; }
return null;
@ -119,11 +113,6 @@ namespace Privacy_Please
return lovers.Any(x => x.otherPawn == other);
}
//public static bool GetThoughtOnIssue(this Pawn pawn, string issueDefName, out Precept precept)
//{
//}
public static Precept GetPreceptForIssue(this Pawn pawn, IssueDef issueDef)
{
if (issueDef == null || pawn?.Ideo == null)
@ -164,16 +153,27 @@ namespace Privacy_Please
public static bool IsUnfazedBySex(this Pawn pawn)
{
if (pawn.Dead ||
pawn.AnimalOrWildMan() ||
pawn.RaceProps.IsMechanoid ||
pawn.Awake() == false ||
pawn.Suspended)
if (IsUnableToSenseSex(pawn))
{ return true; }
if (pawn.AnimalOrWildMan() || pawn.RaceProps.IsMechanoid)
{ return true; }
if (BasicSettings.slavesIgnoreSex && (pawn.IsPrisoner || pawn.IsSlave)) return true;
if (BasicSettings.otherFactionsIgnoreSex && pawn.Faction.IsPlayer == false) return true;
if (pawn.Faction.HostileTo(Faction.OfPlayer)) return true;
if (pawn.Drafted == false && pawn.mindState?.duty?.def?.alwaysShowWeapon == true) return true;
return false;
}
public static bool IsUnableToSenseSex(this Pawn pawn)
{
if (pawn.Dead ||
pawn.Awake() == false ||
pawn.Suspended ||
pawn.MentalState != null)
{ return true; }
return false;
}