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

@ -12,10 +12,10 @@ namespace RimWorldAnimationStudio
{
public override void Initialize(bool addedNewTag = false)
{
IEnumerable<string> allTags = Tags.defNames.Concat(CustomTags.defNames);
IEnumerable<string> allTags = DefaultTags.defNames.Concat(CustomTags.defNames);
string placeHolderText = "Enter new def name...";
Actor actor = Workspace.animationDef.actors[Workspace.actorID];
Actor actor = Workspace.animationDef.Actors[Workspace.ActorID];
Transform contentWindow = transform.FindDeepChild("Content");
Reset();
@ -27,16 +27,16 @@ namespace RimWorldAnimationStudio
_optionToggle.Find("Text").GetComponent<Text>().text = tag;
Toggle toggleComp = _optionToggle.GetComponent<Toggle>();
toggleComp.isOn = actor.defNames.Contains(tag);
toggleComp.isOn = actor.DefNames.Contains(tag);
toggleComp.onValueChanged.AddListener(delegate
{
if (toggleComp.isOn && actor.defNames.Contains(tag) == false)
{ actor.defNames.Add(tag); }
if (toggleComp.isOn && actor.DefNames.Contains(tag) == false)
{ actor.DefNames.Add(tag); }
else if (toggleComp.isOn == false && actor.defNames.Contains(tag))
{ actor.defNames.Remove(tag); }
else if (toggleComp.isOn == false && actor.DefNames.Contains(tag))
{ actor.DefNames.Remove(tag); }
Workspace.Instance.RecordEvent("Actor def name");
Workspace.RecordEvent("Actor def name");
});
if (CustomTags.defNames.Contains(tag))
@ -56,7 +56,7 @@ namespace RimWorldAnimationStudio
InputField fieldComp = _optionField.GetComponent<InputField>();
fieldComp.onEndEdit.AddListener(delegate
{
AddCustomTag(fieldComp, ref Tags.defNames, ref CustomTags.defNames);
AddCustomTag(fieldComp, ref DefaultTags.defNames, ref CustomTags.defNames);
AddCustomRace(fieldComp);
});
}