mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
Compare commits
No commits in common. "8ed52c06963c33731523d9a7e98357302cf66e7e" and "8a93f3b087db60c62ad9b9fbf7b793ac8e6be3a5" have entirely different histories.
8ed52c0696
...
8a93f3b087
13 changed files with 3 additions and 143 deletions
Binary file not shown.
|
@ -19,10 +19,6 @@
|
||||||
<overlayLayer>Head</overlayLayer>
|
<overlayLayer>Head</overlayLayer>
|
||||||
<baseLayer>95</baseLayer>
|
<baseLayer>95</baseLayer>
|
||||||
<texPathVariantsDef>TexPathVariants_Cowgirl_Xray</texPathVariantsDef>
|
<texPathVariantsDef>TexPathVariants_Cowgirl_Xray</texPathVariantsDef>
|
||||||
|
|
||||||
<!-- <propOffsetDef>PropOffsetDef_Cowgirl_Xray</propOffsetDef> -->
|
|
||||||
|
|
||||||
|
|
||||||
</animPropProperties>
|
</animPropProperties>
|
||||||
</Rimworld_Animations.AnimationPropDef>
|
</Rimworld_Animations.AnimationPropDef>
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,6 @@ namespace Rimworld_Animations
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Enabled()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Vector3 OffsetAtTick(int tick, PawnDrawParms parms)
|
public override Vector3 OffsetAtTick(int tick, PawnDrawParms parms)
|
||||||
{
|
{
|
||||||
//Todo: Use this for bodyoffsets
|
//Todo: Use this for bodyoffsets
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
using HarmonyLib;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Verse;
|
|
||||||
|
|
||||||
namespace Rimworld_Animations
|
|
||||||
{
|
|
||||||
|
|
||||||
[HarmonyPatch(typeof(PawnRenderer), "BodyAngle")]
|
|
||||||
|
|
||||||
public class HarmonyPatch_PawnRenderer
|
|
||||||
{
|
|
||||||
public static bool Prefix(ref Pawn ___pawn, ref float __result)
|
|
||||||
{
|
|
||||||
//stop using cache when animating, for when downed (downed disables cache)
|
|
||||||
if (___pawn?.Drawer?.renderer?.renderTree?.rootNode?.AnimationWorker is AnimationWorker_KeyframesExtended)
|
|
||||||
{
|
|
||||||
__result = 0;
|
|
||||||
return false;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -10,7 +10,6 @@ namespace Rimworld_Animations
|
||||||
public class PawnRenderNodeProperties_GraphicVariants : PawnRenderNodeProperties
|
public class PawnRenderNodeProperties_GraphicVariants : PawnRenderNodeProperties
|
||||||
{
|
{
|
||||||
|
|
||||||
public AnimationOffsetDef propOffsetDef = null;
|
|
||||||
public TexPathVariantsDef texPathVariantsDef = null;
|
public TexPathVariantsDef texPathVariantsDef = null;
|
||||||
public bool absoluteTransform = false;
|
public bool absoluteTransform = false;
|
||||||
|
|
||||||
|
|
|
@ -61,51 +61,9 @@ namespace Rimworld_Animations
|
||||||
|
|
||||||
return material;
|
return material;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Vector3 OffsetFor(PawnRenderNode node, PawnDrawParms parms, out Vector3 pivot)
|
|
||||||
{
|
|
||||||
Vector3 regularOffsets = base.OffsetFor(node, parms, out pivot);
|
|
||||||
|
|
||||||
if ((node.Props as PawnRenderNodeProperties_GraphicVariants)?.propOffsetDef?.offsets is List<BaseAnimationOffset> offsets)
|
|
||||||
{
|
|
||||||
foreach (BaseAnimationOffset offset in offsets)
|
|
||||||
{
|
|
||||||
if (offset.appliesToPawn(node.tree.pawn))
|
|
||||||
{
|
|
||||||
//modify offset of prop for animationOffset position
|
|
||||||
regularOffsets += offset.getOffset(node.tree.pawn) ?? Vector3.zero;
|
|
||||||
return regularOffsets;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//unmodified; no offsets found
|
|
||||||
return regularOffsets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Quaternion RotationFor(PawnRenderNode node, PawnDrawParms parms)
|
|
||||||
{
|
|
||||||
Quaternion rotation = base.RotationFor(node, parms);
|
|
||||||
|
|
||||||
if ((node.Props as PawnRenderNodeProperties_GraphicVariants)?.propOffsetDef?.offsets is List<BaseAnimationOffset> offsets)
|
|
||||||
{
|
|
||||||
foreach (BaseAnimationOffset offset in offsets)
|
|
||||||
{
|
|
||||||
if (offset.appliesToPawn(node.tree.pawn))
|
|
||||||
{
|
|
||||||
//modify offset of prop for animationOffset rotation
|
|
||||||
rotation *= Quaternion.AngleAxis(offset.getRotation(node.tree.pawn) ?? 0, Vector3.up);
|
|
||||||
return rotation;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//unmodified; no rotation offsets found
|
|
||||||
return rotation;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
|
||||||
using Verse;
|
|
||||||
|
|
||||||
namespace Rimworld_Animations
|
|
||||||
{
|
|
||||||
public class PawnRenderSubWorker_HideWhenAnimating : PawnRenderSubWorker
|
|
||||||
{
|
|
||||||
|
|
||||||
public override void EditMaterial(PawnRenderNode node, PawnDrawParms parms, ref Material material)
|
|
||||||
{
|
|
||||||
if (node.tree.rootNode.AnimationWorker is AnimationWorker_KeyframesExtended
|
|
||||||
|| node.tree.rootNode.children.Any(x => x.AnimationWorker is AnimationWorker_KeyframesExtended))
|
|
||||||
{
|
|
||||||
material.color = Color.clear;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -29,7 +29,6 @@
|
||||||
<li>1.5</li>
|
<li>1.5</li>
|
||||||
<li IfModActive="erdelf.HumanoidAlienRaces">Patch_HumanoidAlienRaces/1.5</li>
|
<li IfModActive="erdelf.HumanoidAlienRaces">Patch_HumanoidAlienRaces/1.5</li>
|
||||||
<li IfModActive="c0ffee.SexToysMasturbation">Patch_SexToysMasturbation/1.5</li>
|
<li IfModActive="c0ffee.SexToysMasturbation">Patch_SexToysMasturbation/1.5</li>
|
||||||
<li IfModActive="Nals.FacialAnimation">Patch_FacialAnimation/1.5</li>
|
|
||||||
</v1.5>
|
</v1.5>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<Patch>
|
|
||||||
<!-- hide node when animating -->
|
|
||||||
<Operation Class="PatchOperationSequence">
|
|
||||||
<success>Always</success>
|
|
||||||
<operations>
|
|
||||||
<li Class="PatchOperationConditional">
|
|
||||||
<xpath>/Defs/PawnRenderTreeDef[defName="Humanlike"]/root/children/li[debugLabel="Head"]/subworkerClasses</xpath>
|
|
||||||
<success>Always</success>
|
|
||||||
<nomatch Class="PatchOperationAdd">
|
|
||||||
<xpath>/Defs/PawnRenderTreeDef[defName="Humanlike"]/root/children/li[debugLabel="Head"]</xpath>
|
|
||||||
<value>
|
|
||||||
<subworkerClasses />
|
|
||||||
</value>
|
|
||||||
</nomatch>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li Class="PatchOperationAdd">
|
|
||||||
<xpath>/Defs/PawnRenderTreeDef[defName="Humanlike"]/root/children/li[debugLabel="Head"]/subworkerClasses</xpath>
|
|
||||||
<value>
|
|
||||||
<li>Rimworld_Animations.PawnRenderSubWorker_HideWhenAnimating</li>
|
|
||||||
</value>
|
|
||||||
</li>
|
|
||||||
</operations>
|
|
||||||
</Operation>
|
|
||||||
|
|
||||||
</Patch>
|
|
Binary file not shown.
Binary file not shown.
|
@ -104,7 +104,6 @@
|
||||||
<Compile Include="1.5\Source\MainTabWindows\OffsetMainButtonDefOf.cs" />
|
<Compile Include="1.5\Source\MainTabWindows\OffsetMainButtonDefOf.cs" />
|
||||||
<Compile Include="1.5\Source\MainTabWindows\WorldComponent_UpdateMainTab.cs" />
|
<Compile Include="1.5\Source\MainTabWindows\WorldComponent_UpdateMainTab.cs" />
|
||||||
<Compile Include="1.5\Source\Patches\Harmony_PatchAll.cs" />
|
<Compile Include="1.5\Source\Patches\Harmony_PatchAll.cs" />
|
||||||
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderer.cs" />
|
|
||||||
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderNode.cs" />
|
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderNode.cs" />
|
||||||
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderNodeWorker.cs" />
|
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderNodeWorker.cs" />
|
||||||
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderTree.cs" />
|
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderTree.cs" />
|
||||||
|
@ -134,7 +133,6 @@
|
||||||
<Compile Include="1.5\Source\PawnRenderNode\TexPathVariants.cs" />
|
<Compile Include="1.5\Source\PawnRenderNode\TexPathVariants.cs" />
|
||||||
<Compile Include="1.5\Source\RenderSubWorkers\PawnRenderSubWorker_ChangeOffset.cs" />
|
<Compile Include="1.5\Source\RenderSubWorkers\PawnRenderSubWorker_ChangeOffset.cs" />
|
||||||
<Compile Include="1.5\Source\Patches\RJWPatches\RJWAnimationSettings.cs" />
|
<Compile Include="1.5\Source\Patches\RJWPatches\RJWAnimationSettings.cs" />
|
||||||
<Compile Include="1.5\Source\RenderSubWorkers\PawnRenderSubWorker_HideWhenAnimating.cs" />
|
|
||||||
<Compile Include="1.5\Source\Utilities\AnimationUtility.cs" />
|
<Compile Include="1.5\Source\Utilities\AnimationUtility.cs" />
|
||||||
<Compile Include="1.5\Source\Voices\VoiceDef.cs" />
|
<Compile Include="1.5\Source\Voices\VoiceDef.cs" />
|
||||||
<Compile Include="1.5\Source\Voices\VoiceDefOf.cs" />
|
<Compile Include="1.5\Source\Voices\VoiceDefOf.cs" />
|
||||||
|
@ -321,7 +319,6 @@
|
||||||
<Content Include="Languages\PortugueseBrazilian\DefInjected\Rimworld_Animations.AnimationDef\Animations_Multi.xml" />
|
<Content Include="Languages\PortugueseBrazilian\DefInjected\Rimworld_Animations.AnimationDef\Animations_Multi.xml" />
|
||||||
<Content Include="Languages\PortugueseBrazilian\DefInjected\Rimworld_Animations.AnimationDef\Animations_vanilla.xml" />
|
<Content Include="Languages\PortugueseBrazilian\DefInjected\Rimworld_Animations.AnimationDef\Animations_vanilla.xml" />
|
||||||
<Content Include="LoadFolders.xml" />
|
<Content Include="LoadFolders.xml" />
|
||||||
<Content Include="Patch_FacialAnimation\1.5\Patches\AnimationPatch_HideHeadWhenAnimating.xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="1.5\Source\Extensions\" />
|
<Folder Include="1.5\Source\Extensions\" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue