mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Sex props plus quiver visuals
This commit is contained in:
parent
f275ed90ae
commit
4a2905c7fc
152 changed files with 1985 additions and 184 deletions
|
@ -5,7 +5,6 @@ using System.Linq;
|
|||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using UnityEngine;
|
||||
using SFB;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace RimWorldAnimationStudio
|
||||
|
@ -143,6 +142,8 @@ namespace RimWorldAnimationStudio
|
|||
if (clip == null)
|
||||
{ continue; }
|
||||
|
||||
bool quiver = isAnimating && Workspace.Instance.GetCurrentOrPreviousKeyframe(actorID).quiver == true;
|
||||
|
||||
float clipPercent = (float)(stageTick % clip.duration) / clip.duration;
|
||||
if (stageTick == clip.duration) clipPercent = 1f;
|
||||
|
||||
|
@ -156,6 +157,8 @@ namespace RimWorldAnimationStudio
|
|||
Vector3 deltaPos = new Vector3(clip.BodyOffsetX.Evaluate(clipPercent), 0, clip.BodyOffsetZ.Evaluate(clipPercent));
|
||||
|
||||
float bodyAngle = clip.BodyAngle.Evaluate(clipPercent);
|
||||
bodyAngle += quiver ? UnityEngine.Random.value * 2f - 1f : 0f;
|
||||
|
||||
float headAngle = clip.HeadAngle.Evaluate(clipPercent);
|
||||
|
||||
int bodyFacing = (int)clip.BodyFacing.Evaluate(clipPercent);
|
||||
|
|
|
@ -144,7 +144,7 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
public void SaveCustomArrays()
|
||||
{
|
||||
var path = Path.Combine(Application.streamingAssetsPath, "customTags.xml");
|
||||
var path = Path.Combine(Application.persistentDataPath, "customTags.xml");
|
||||
|
||||
CustomTagsHelper helper = new CustomTagsHelper();
|
||||
|
||||
|
@ -159,8 +159,14 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
public void LoadCustomArrays()
|
||||
{
|
||||
var path = Path.Combine(Application.streamingAssetsPath, "customTags.xml");
|
||||
string path;
|
||||
|
||||
if (File.Exists(Path.Combine(Application.persistentDataPath, "customTags.xml")))
|
||||
{ path = Path.Combine(Application.persistentDataPath, "customTags.xml"); }
|
||||
|
||||
else
|
||||
{ path = Path.Combine(Application.streamingAssetsPath, "customTags.xml"); }
|
||||
|
||||
if (File.Exists(path) == false)
|
||||
{ SaveCustomArrays(); return; }
|
||||
|
||||
|
@ -186,7 +192,13 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
public void LoadAlienRaceDefs()
|
||||
{
|
||||
var path = Path.Combine(Application.streamingAssetsPath, "alienRaceDefs.xml");
|
||||
string path;
|
||||
|
||||
if (File.Exists(Path.Combine(Application.persistentDataPath, "alienRaceDefs.xml")))
|
||||
{ path = Path.Combine(Application.persistentDataPath, "alienRaceDefs.xml"); }
|
||||
|
||||
else
|
||||
{ path = Path.Combine(Application.streamingAssetsPath, "alienRaceDefs.xml"); }
|
||||
|
||||
if (File.Exists(path) == false)
|
||||
{ SaveAlienRaceDefs(); return; }
|
||||
|
@ -197,7 +209,7 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
public void SaveAlienRaceDefs()
|
||||
{
|
||||
var path = Path.Combine(Application.streamingAssetsPath, "alienRaceDefs.xml");
|
||||
var path = Path.Combine(Application.persistentDataPath, "alienRaceDefs.xml");
|
||||
|
||||
XmlUtility.WriteXML(AlienRaceDefs.allDefs, path);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue