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

@ -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)