mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
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:
parent
61c6c949d3
commit
6b44db7400
61 changed files with 89 additions and 68 deletions
|
@ -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(); }
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue