mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Improved undo redo function and timelines
This commit is contained in:
parent
1af7f41d63
commit
e36ef6a368
372 changed files with 4086 additions and 211 deletions
|
@ -10,9 +10,7 @@ namespace RimWorldAnimationStudio
|
|||
{
|
||||
public class SelectBodyPartsDialog : DialogBox
|
||||
{
|
||||
private Actor actor;
|
||||
|
||||
public void Start()
|
||||
public void OnEnable()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
@ -30,18 +28,12 @@ namespace RimWorldAnimationStudio
|
|||
Debug.Log("Add new body part: " + field.text);
|
||||
Workspace.bodyParts.Add(field.text);
|
||||
|
||||
Initialize(null, true);
|
||||
Initialize(true);
|
||||
}
|
||||
|
||||
public void Initialize(Actor actor = null, bool addedNewTag = false)
|
||||
public void Initialize(bool addedNewTag = false)
|
||||
{
|
||||
if (actor != null)
|
||||
{ this.actor = actor; }
|
||||
|
||||
if (actor == null)
|
||||
{ actor = this.actor; }
|
||||
|
||||
if (actor == null) return;
|
||||
Actor actor = Workspace.animationDef.actors[Workspace.actorID];
|
||||
|
||||
foreach (string bodyPart in actor.requiredGenitals)
|
||||
{
|
||||
|
@ -69,7 +61,7 @@ namespace RimWorldAnimationStudio
|
|||
else if (toggleComp.isOn == false && actor.requiredGenitals.Contains(bodyPart))
|
||||
{ actor.requiredGenitals.Remove(bodyPart); }
|
||||
|
||||
Workspace.Instance.MakeDirty();
|
||||
Workspace.Instance.RecordEvent("Actor required body part");
|
||||
});
|
||||
|
||||
if (addedNewTag && i == Workspace.sexTypes.Count - 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue