Bug fixes

- Fixed bug where graphic paths would be repeated in the race settings menu
- The body type dropdown and offset fields will deactivate and no longer apply when an actor's race is changed to a non-humanoid
This commit is contained in:
AbstractConcept 2022-09-27 19:07:18 -05:00
parent 61c6c949d3
commit 6b44db7400
61 changed files with 89 additions and 68 deletions

View file

@ -89,7 +89,7 @@ namespace RimWorldAnimationStudio
public Vector3 GetFinalTransformOffset()
{
Vector3 offset = bodyTypeOffset.GetOffset(bodyType) + GetAlienRaceOffset();
Vector3 offset = GetAlienRaceOffset() + (GetAlienRaceDef().isHumanoid ? bodyTypeOffset.GetOffset(bodyType) : new Vector3());
return new Vector3(offset.x, offset.z, offset.y);
}

View file

@ -104,6 +104,10 @@ namespace RimWorldAnimationStudio
if (bodyOffsetZField.isFocused == false)
{ bodyOffsetZField.text = actor.bodyTypeOffset.GetOffset(bodyType).z.ToString(); }
bodyTypeDropdown.interactable = actor.GetAlienRaceDef().isHumanoid;
bodyOffsetXField.interactable = actor.GetAlienRaceDef().isHumanoid;
bodyOffsetZField.interactable = actor.GetAlienRaceDef().isHumanoid;
if (raceOffsetXField.isFocused == false)
{ raceOffsetXField.text = actor.GetAlienRaceOffset().x.ToString(); }

View file

@ -19,19 +19,23 @@ namespace RimWorldAnimationStudio
public override void Initialize(bool addedNewTag = false)
{
Debug.Log("Init");
Reset();
AlienRaceDef alienRaceDef = GetCurrentRaceDef();
if (alienRaceDef == null) return;
isHumanoidToggle.isOn = alienRaceDef.isHumanoid;
isHumanoidToggle.SetIsOnWithoutNotify(alienRaceDef.isHumanoid);
Text bodyGraphicsTitle = AddCloneObjectToParent(raceSettingsWindow, 2).GetComponent<Text>();
bodyGraphicsTitle.text = "Body graphic filepaths";
foreach (string bodyType in Tags.bodyTypes)
List<string> allTags = alienRaceDef.isHumanoid ? Tags.bodyTypes : new List<string>() { "None" };
foreach (string bodyType in allTags)
{
string _bodyType = alienRaceDef.isHumanoid ? bodyType : "None";
string _bodyType = bodyType;
if (alienRaceDef.isHumanoid)
{
@ -53,9 +57,6 @@ namespace RimWorldAnimationStudio
}
AddCloneObjectToParent(raceSettingsWindow, 3);
if (alienRaceDef.isHumanoid == false)
{ break; }
}
if (alienRaceDef.isHumanoid)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -115,7 +115,7 @@ MonoBehaviour:
m_MinSize: {x: 678, y: 492}
m_MaxSize: {x: 14001, y: 14042}
vertical: 0
controlID: 1188
controlID: 1911
--- !u!114 &6
MonoBehaviour:
m_ObjectHideFlags: 52
@ -140,7 +140,7 @@ MonoBehaviour:
m_MinSize: {x: 403, y: 492}
m_MaxSize: {x: 10001, y: 14042}
vertical: 1
controlID: 1189
controlID: 1912
--- !u!114 &7
MonoBehaviour:
m_ObjectHideFlags: 52
@ -165,7 +165,7 @@ MonoBehaviour:
m_MinSize: {x: 403, y: 221}
m_MaxSize: {x: 8003, y: 4021}
vertical: 0
controlID: 1190
controlID: 1913
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
@ -398,7 +398,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: e0d2fffff4d2ffff92d3ffff62fbffff
m_ExpandedIDs: 4694ffff5a94fffff894ffff4cfbffff123d00003a3d0000a63d0000fa3e0000703f0000e43f00003e40000054450000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1117,7 +1117,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: 22480000
m_LastClickedID: 18466
m_ExpandedIDs: 00000000fc470000fe4700000048000002480000044800001a48000000ca9a3b
m_ExpandedIDs: 000000000448000006480000084800000a4800000c4800001a48000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1145,7 +1145,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 00000000fc470000fe47000000480000024800000448000000ca9a3b
m_ExpandedIDs: 000000000448000006480000084800000a4800000c48000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:

View file

@ -24,7 +24,7 @@ MonoBehaviour:
m_MinSize: {x: 678, y: 492}
m_MaxSize: {x: 14001, y: 14042}
vertical: 0
controlID: 1062
controlID: 1750
--- !u!114 &2
MonoBehaviour:
m_ObjectHideFlags: 52
@ -141,7 +141,7 @@ MonoBehaviour:
m_MinSize: {x: 403, y: 492}
m_MaxSize: {x: 10001, y: 14042}
vertical: 1
controlID: 1063
controlID: 1751
--- !u!114 &4
MonoBehaviour:
m_ObjectHideFlags: 52
@ -166,7 +166,7 @@ MonoBehaviour:
m_MinSize: {x: 403, y: 221}
m_MaxSize: {x: 8003, y: 4021}
vertical: 0
controlID: 1038
controlID: 1752
--- !u!114 &5
MonoBehaviour:
m_ObjectHideFlags: 52
@ -224,7 +224,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 62fbffff
m_ExpandedIDs: 4cfbffff123d00003a3d0000a63d0000fa3e0000703f0000e43f00003e40000054450000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1000,7 +1000,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: 22480000
m_LastClickedID: 18466
m_ExpandedIDs: 00000000fc470000fe4700000048000002480000044800001a48000000ca9a3b
m_ExpandedIDs: 000000000448000006480000084800000a4800000c4800001a48000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1028,7 +1028,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 00000000fc470000fe47000000480000024800000448000000ca9a3b
m_ExpandedIDs: 000000000448000006480000084800000a4800000c48000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1160,8 +1160,8 @@ MonoBehaviour:
y: 0
width: 396
height: 947
m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4001, y: 4021}
m_MinSize: {x: 275, y: 50}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 16}
m_Panes:
- {fileID: 16}

Binary file not shown.

View file

@ -109,99 +109,99 @@ ScriptsOnlyBuild:
- Class: 114
Script: {instanceID: 11262}
- Class: 114
Script: {instanceID: 11288}
Script: {instanceID: 11290}
- Class: 114
Script: {instanceID: 11448}
Script: {instanceID: 11450}
- Class: 114
Script: {instanceID: 11500}
- Class: 114
Script: {instanceID: 11596}
Script: {instanceID: 11502}
- Class: 114
Script: {instanceID: 11598}
- Class: 114
Script: {instanceID: 11652}
Script: {instanceID: 11600}
- Class: 114
Script: {instanceID: 11728}
Script: {instanceID: 11654}
- Class: 114
Script: {instanceID: 11752}
Script: {instanceID: 11730}
- Class: 114
Script: {instanceID: 11764}
Script: {instanceID: 11754}
- Class: 114
Script: {instanceID: 11774}
Script: {instanceID: 11766}
- Class: 114
Script: {instanceID: 11796}
Script: {instanceID: 11776}
- Class: 114
Script: {instanceID: 11858}
Script: {instanceID: 11798}
- Class: 114
Script: {instanceID: 12128}
Script: {instanceID: 11860}
- Class: 114
Script: {instanceID: 12164}
Script: {instanceID: 12130}
- Class: 114
Script: {instanceID: 12330}
Script: {instanceID: 12166}
- Class: 114
Script: {instanceID: 12344}
Script: {instanceID: 12332}
- Class: 114
Script: {instanceID: 12592}
Script: {instanceID: 12346}
- Class: 114
Script: {instanceID: 12708}
Script: {instanceID: 12594}
- Class: 114
Script: {instanceID: 12732}
Script: {instanceID: 12710}
- Class: 114
Script: {instanceID: 12896}
Script: {instanceID: 12734}
- Class: 114
Script: {instanceID: 13142}
Script: {instanceID: 12898}
- Class: 114
Script: {instanceID: 13166}
Script: {instanceID: 13144}
- Class: 114
Script: {instanceID: 13206}
Script: {instanceID: 13168}
- Class: 114
Script: {instanceID: 13224}
Script: {instanceID: 13208}
- Class: 114
Script: {instanceID: 13234}
Script: {instanceID: 13226}
- Class: 114
Script: {instanceID: 13352}
Script: {instanceID: 13236}
- Class: 114
Script: {instanceID: 13384}
Script: {instanceID: 13354}
- Class: 114
Script: {instanceID: 13422}
Script: {instanceID: 13386}
- Class: 114
Script: {instanceID: 13440}
Script: {instanceID: 13424}
- Class: 114
Script: {instanceID: 13456}
Script: {instanceID: 13442}
- Class: 114
Script: {instanceID: 13468}
Script: {instanceID: 13458}
- Class: 114
Script: {instanceID: 13472}
Script: {instanceID: 13470}
- Class: 114
Script: {instanceID: 13506}
Script: {instanceID: 13474}
- Class: 114
Script: {instanceID: 13624}
Script: {instanceID: 13508}
- Class: 114
Script: {instanceID: 13638}
Script: {instanceID: 13626}
- Class: 114
Script: {instanceID: 13664}
Script: {instanceID: 13640}
- Class: 114
Script: {instanceID: 13866}
Script: {instanceID: 13666}
- Class: 114
Script: {instanceID: 14060}
Script: {instanceID: 13868}
- Class: 114
Script: {instanceID: 14140}
Script: {instanceID: 14062}
- Class: 114
Script: {instanceID: 14154}
Script: {instanceID: 14142}
- Class: 114
Script: {instanceID: 14302}
Script: {instanceID: 14156}
- Class: 114
Script: {instanceID: 14474}
Script: {instanceID: 14304}
- Class: 114
Script: {instanceID: 14506}
Script: {instanceID: 14476}
- Class: 114
Script: {instanceID: 14528}
Script: {instanceID: 14508}
- Class: 114
Script: {instanceID: 14530}
- Class: 114
Script: {instanceID: 14570}
Script: {instanceID: 14532}
- Class: 114
Script: {instanceID: 14576}
Script: {instanceID: 14572}
- Class: 114
Script: {instanceID: 14578}
- Class: 115
Script: {instanceID: 0}
- Class: 128

Binary file not shown.

View file

@ -1,2 +1,4 @@
Base path: 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data', plugins path 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data/PlaybackEngines'
Cmd: initializeCompiler
Quitting shader compiler process

View file

@ -1,2 +1,4 @@
Base path: 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data', plugins path 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data/PlaybackEngines'
Cmd: initializeCompiler
Quitting shader compiler process

View file

@ -1,2 +1,4 @@
Base path: 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data', plugins path 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data/PlaybackEngines'
Cmd: initializeCompiler
Quitting shader compiler process

View file

@ -1,2 +1,4 @@
Base path: 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data', plugins path 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data/PlaybackEngines'
Cmd: initializeCompiler
Quitting shader compiler process

View file

@ -1,2 +1,4 @@
Base path: 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data', plugins path 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data/PlaybackEngines'
Cmd: initializeCompiler
Quitting shader compiler process

View file

@ -1,2 +1,4 @@
Base path: 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data', plugins path 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data/PlaybackEngines'
Cmd: initializeCompiler
Quitting shader compiler process

View file

@ -1,2 +1,4 @@
Base path: 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data', plugins path 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data/PlaybackEngines'
Cmd: initializeCompiler
Quitting shader compiler process

View file

@ -1,2 +1,4 @@
Base path: 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data', plugins path 'C:/Program Files/Unity/Hub/Editor/2019.4.20f1/Editor/Data/PlaybackEngines'
Cmd: initializeCompiler
Quitting shader compiler process

View file

@ -124,7 +124,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.1.1
bundleVersion: 0.1.2
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0