Squashed commit of the following:

commit af4dab5546
Author: AbstractConcept <abstract.concept@mail.com>
Date:   Mon Oct 31 19:58:41 2022 -0500

    Code refactor

commit e14a12f2ab
Author: AbstractConcept <abstract.concept@mail.com>
Date:   Mon Oct 31 00:44:53 2022 -0500

    Code refactor

commit 5ca7e486f8
Author: AbstractConcept <abstract.concept@mail.com>
Date:   Fri Oct 28 19:52:58 2022 -0500

    Code refactor

commit a55ba7b95b
Author: AbstractConcept <abstract.concept@mail.com>
Date:   Fri Oct 28 00:28:51 2022 -0500

    Code refactor

commit 757badf4f6
Author: AbstractConcept <abstract.concept@mail.com>
Date:   Thu Oct 27 00:56:04 2022 -0500

    Code refactor
This commit is contained in:
AbstractConcept 2022-10-31 20:00:38 -05:00
parent cd4711a8e5
commit bb2cc29393
603 changed files with 9200 additions and 7528 deletions

View file

@ -17,23 +17,23 @@ namespace RimWorldAnimationStudio
Transform contentWindow = transform.FindDeepChild("Content");
Reset();
for (int i = 0; i < Tags.actorLayers.Count; i++)
for (int i = 0; i < DefaultTags.actorLayers.Count; i++)
{
string actorLayer = Tags.actorLayers[i];
string actorLayer = DefaultTags.actorLayers[i];
Transform _optionToggle = AddCloneObjectToParent(contentWindow).transform;
_optionToggle.Find("Text").GetComponent<Text>().text = actorLayer;
Toggle toggleComp = _optionToggle.GetComponent<Toggle>();
toggleComp.isOn = Workspace.Instance.GetCurrentPawnAnimationClip().layer == actorLayer;
toggleComp.isOn = Workspace.GetCurrentPawnAnimationClip().Layer == actorLayer;
toggleComp.onValueChanged.AddListener(delegate {
PawnAnimationClip clip = Workspace.Instance.GetCurrentPawnAnimationClip();
PawnAnimationClip clip = Workspace.GetCurrentPawnAnimationClip();
if (clip != null)
{ clip.layer = actorLayer; }
{ clip.Layer = actorLayer; }
Workspace.Instance.RecordEvent("Actor layer set");
Workspace.RecordEvent("Actor layer set");
});
toggleComp.group = contentWindow.GetComponent<ToggleGroup>();