mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Standalone exported
This commit is contained in:
parent
1e2c4fa6bf
commit
7e1680a7fb
605 changed files with 2169 additions and 3312 deletions
|
@ -17,38 +17,7 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
public void Start()
|
||||
{
|
||||
LoadCustomArrays();
|
||||
|
||||
/*AlienRaceDef human = new AlienRaceDef();
|
||||
human.Initialize("Human");
|
||||
|
||||
human.SetHeadGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Heads/Head0.png"), CardinalDirection.North);
|
||||
human.SetHeadGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Heads/Head1.png"), CardinalDirection.East);
|
||||
human.SetHeadGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Heads/Head2.png"), CardinalDirection.South);
|
||||
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Male0.png"), CardinalDirection.North, "Male");
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Male1.png"), CardinalDirection.East, "Male");
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Male2.png"), CardinalDirection.South, "Male");
|
||||
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Female0.png"), CardinalDirection.North, "Female");
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Female1.png"), CardinalDirection.East, "Female");
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Female2.png"), CardinalDirection.South, "Female");
|
||||
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Fat0.png"), CardinalDirection.North, "Fat");
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Fat1.png"), CardinalDirection.East, "Fat");
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Fat2.png"), CardinalDirection.South, "Fat");
|
||||
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Hulk0.png"), CardinalDirection.North, "Hulk");
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Hulk1.png"), CardinalDirection.East, "Hulk");
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Hulk2.png"), CardinalDirection.South, "Hulk");
|
||||
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Thin0.png"), CardinalDirection.North, "Thin");
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Thin1.png"), CardinalDirection.East, "Thin");
|
||||
human.SetBodyTypeGraphicPath(Path.Combine(Application.streamingAssetsPath, "Textures/Humanlike/Bodies/Thin2.png"), CardinalDirection.South, "Thin");*/
|
||||
|
||||
//AlienRaceDefs.allDefs.Add(human);
|
||||
|
||||
LoadAlienRaceDefs();
|
||||
|
||||
}
|
||||
|
||||
public void TryToCloseApplication()
|
||||
|
@ -67,7 +36,7 @@ namespace RimWorldAnimationStudio
|
|||
var paths = StandaloneFileBrowser.OpenFilePanel("Open AnimationDef File", "", "xml", false);
|
||||
|
||||
if (paths == null || paths.Any() == false)
|
||||
{ Debug.LogError("Selected file was null or invalid"); return; }
|
||||
{ Debug.LogWarning("Selected file was null or invalid"); return; }
|
||||
|
||||
Defs defs = XmlUtility.ReadXML<Defs>(paths[0]);
|
||||
|
||||
|
@ -83,7 +52,10 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
public void LoadAnimation(AnimationDef animationDef)
|
||||
{
|
||||
LoadAlienRaceDefs();
|
||||
LoadCustomArrays();
|
||||
UpdateCustomArrays(animationDef);
|
||||
|
||||
RunPostLoadOperations(animationDef);
|
||||
|
||||
Debug.Log("Loaded AnimationDef: " + animationDef.defName);
|
||||
|
@ -130,6 +102,11 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
public void RunPreSaveOperations(AnimationDef animationDef)
|
||||
{
|
||||
animationDef.ValidateData();
|
||||
|
||||
foreach (Actor actor in animationDef.actors)
|
||||
{ actor.ValidateData(); }
|
||||
|
||||
foreach (AnimationStage stage in animationDef.animationStages)
|
||||
{
|
||||
stage.ValidateData();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue