Remove and save custom tags

This commit is contained in:
AbstractConcept 2022-09-21 16:15:25 -05:00
parent e36ef6a368
commit 2f3f807911
264 changed files with 1118 additions and 498 deletions

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using System.Xml.Serialization;
using UnityEngine;
@ -16,11 +17,13 @@ namespace RimWorldAnimationStudio
[XmlArray("tags"), XmlArrayItem("li")] public List<string> tags;
[XmlIgnore] public ActorGender gender;
[XmlIgnore] public string raceDef;
public BodyTypeOffset bodyTypeOffset = new BodyTypeOffset();
public bool initiator = false;
public bool? controlGenitalAngle;
public bool? isFucking;
public bool? isFucked;
public bool controlGenitalAngle;
public bool isFucking;
public bool isFucked;
public bool ShouldSerializedefNames() { return defNames.NotNullOrEmpty(); }
public bool ShouldSerializebodyDefTypes() { return bodyDefTypes.NotNullOrEmpty(); }
@ -30,9 +33,16 @@ namespace RimWorldAnimationStudio
public bool ShouldSerializeblacklistedRaces() { return blacklistedRaces.NotNullOrEmpty(); }
public bool ShouldSerializetags() { return tags.NotNullOrEmpty(); }
public bool ShouldSerializecontrolGenitalAngle() { return controlGenitalAngle != null; }
public bool ShouldSerializeisFucking() { return isFucking != null; }
public bool ShouldSerializeisFucked() { return isFucked != null; }
public bool ShouldSerializecontrolGenitalAngle() { return controlGenitalAngle; }
public bool ShouldSerializeisFucking() { return isFucking; }
public bool ShouldSerializeisFucked() { return isFucked; }
public void ValidateData()
{
defNames = defNames.Intersect(Tags.defNames.Concat(CustomTags.defNames))?.ToList();
bodyDefTypes = bodyDefTypes.Intersect(Tags.bodyDefTypes.Concat(CustomTags.bodyDefTypes))?.ToList();
requiredGenitals = requiredGenitals.Intersect(Tags.bodyParts.Concat(CustomTags.bodyParts))?.ToList();
}
public bool MakeNew()
{