Bug fixes

This commit is contained in:
AbstractConcept 2022-09-26 00:50:26 -05:00
parent 7e1680a7fb
commit 73f7e32e0c
69 changed files with 107 additions and 91 deletions

View file

@ -91,6 +91,7 @@ namespace RimWorldAnimationStudio
Actor actor = Workspace.animationDef.actors[Workspace.actorID];
ActorBody actorBody = AnimationController.Instance.actorBodies.GetComponentsInChildren<ActorBody>()[Workspace.actorID];
PawnAnimationClip clip = Workspace.Instance.GetCurrentPawnAnimationClip();
string bodyType = actorBody.bodyType;
bodyType = bodyType == null || bodyType == "" ? "Male" : bodyType;
@ -110,6 +111,21 @@ namespace RimWorldAnimationStudio
{ raceOffsetZField.text = actor.GetAlienRaceOffset().z.ToString(); }
initiatorToggle.isOn = actor.initiator;
if (actor.requiredGender.Contains("Female"))
{ genderDropdown.SetValueWithoutNotify(0); }
else if (actor.requiredGender.Contains("Male"))
{ genderDropdown.SetValueWithoutNotify(2); }
else
{ genderDropdown.SetValueWithoutNotify(1); }
for (int i = 0; i < selectActorLayerDropdown.options.Count; i++)
{
if (selectActorLayerDropdown.options[i].text == clip.layer)
{ selectActorLayerDropdown.SetValueWithoutNotify(i); }
}
}
}
}

View file

@ -107,15 +107,13 @@ namespace RimWorldAnimationStudio
AnimationController.Instance.stageTick = keyframe.atTick.Value;
Workspace.actorID = actorID;
Workspace.keyframeID = keyframeID;
if (keyframe.atTick == 1)
{ return; }
interactable = true;
}
public override void OnDrag(PointerEventData eventData)
{
if (keyframe.atTick == 1)
{ value = 1; return; }
base.OnDrag(eventData);
AnimationController.Instance.stageTick = keyframe.atTick.Value;
@ -124,7 +122,8 @@ namespace RimWorldAnimationStudio
public void OnEndDrag(PointerEventData eventData)
{
interactable = false;
if (keyframe.atTick == 1)
{ value = 1; return; }
Workspace.Instance.RecordEvent("Keyframe tick");
}