mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
Compare commits
3 commits
bd30363a1e
...
f3649d2182
Author | SHA1 | Date | |
---|---|---|---|
|
f3649d2182 | ||
|
fa0c4457e8 | ||
|
8888f76708 |
6 changed files with 27 additions and 10 deletions
|
@ -504,14 +504,29 @@ namespace Rimworld_Animations {
|
||||||
|
|
||||||
public bool LoopNeverending()
|
public bool LoopNeverending()
|
||||||
{
|
{
|
||||||
if(pawn?.jobs?.curDriver != null &&
|
return IsNeverEndingSex(pawn) || IsNeverEndingSexPartner(pawn);
|
||||||
(pawn.jobs.curDriver is JobDriver_Sex) && (pawn.jobs.curDriver as JobDriver_Sex).neverendingsex ||
|
}
|
||||||
(pawn.jobs.curDriver is JobDriver_SexBaseReciever) && (pawn.jobs.curDriver as JobDriver_Sex).Partner?.jobs?.curDriver != null && ((pawn.jobs.curDriver as JobDriver_Sex).Partner.jobs.curDriver as JobDriver_Sex).neverendingsex)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
public static bool IsNeverEndingSex(Pawn pawn)
|
||||||
|
{
|
||||||
|
bool hasDriver = pawn?.jobs?.curDriver != null;
|
||||||
|
if (!hasDriver)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return (pawn.jobs.curDriver is JobDriver_Sex jds) && jds.neverendingsex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool IsNeverEndingSexPartner(Pawn pawn)
|
||||||
|
{
|
||||||
|
bool hasDriver = pawn?.jobs?.curDriver != null;
|
||||||
|
if (!hasDriver)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
var partner = (pawn.jobs.curDriver is JobDriver_SexBaseReciever jds) ? jds.Partner : null;
|
||||||
|
if (partner == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return IsNeverEndingSex(partner);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResetOnLoop()
|
public void ResetOnLoop()
|
||||||
|
|
Binary file not shown.
|
@ -36,7 +36,8 @@ namespace Rimworld_Animations {
|
||||||
|
|
||||||
|
|
||||||
if (x.actors.Count != localParticipants.Count) {
|
if (x.actors.Count != localParticipants.Count) {
|
||||||
Log.Message(x.defName.ToStringSafe() + " not selected -- doesn't match count");
|
if (AnimationSettings.debugMode)
|
||||||
|
Log.Message(x.defName.ToStringSafe() + " not selected -- doesn't match count");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < x.actors.Count; i++) {
|
for (int i = 0; i < x.actors.Count; i++) {
|
||||||
|
@ -85,7 +86,8 @@ namespace Rimworld_Animations {
|
||||||
|
|
||||||
if (!x.actors[i].defNames.Contains(localParticipants[i].def.defName)) {
|
if (!x.actors[i].defNames.Contains(localParticipants[i].def.defName)) {
|
||||||
|
|
||||||
if (rjw.RJWSettings.DevMode) {
|
if (AnimationSettings.debugMode)
|
||||||
|
{
|
||||||
string animInfo = x.defName.ToStringSafe() + " not selected -- " + localParticipants[i].def.defName.ToStringSafe() + " " + localParticipants[i].Name.ToStringSafe() + " is not ";
|
string animInfo = x.defName.ToStringSafe() + " not selected -- " + localParticipants[i].def.defName.ToStringSafe() + " " + localParticipants[i].Name.ToStringSafe() + " is not ";
|
||||||
foreach(String defname in x.actors[i].defNames) {
|
foreach(String defname in x.actors[i].defNames) {
|
||||||
animInfo += defname + ", ";
|
animInfo += defname + ", ";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
<identifier>Rimworld-Animations</identifier>
|
<identifier>Rimworld-Animations</identifier>
|
||||||
<version>1.3.1</version>
|
<version>1.3.2</version>
|
||||||
</Manifest>
|
</Manifest>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue