diff --git a/MinecraftUSkinEditor/Classes/FileTypes/PCKProperties.cs b/MinecraftUSkinEditor/Classes/FileTypes/PCKProperties.cs index d76af14d..7f8aa1b8 100644 --- a/MinecraftUSkinEditor/Classes/FileTypes/PCKProperties.cs +++ b/MinecraftUSkinEditor/Classes/FileTypes/PCKProperties.cs @@ -8,5 +8,25 @@ namespace PckStudio.Classes.FileTypes { public class PCKProperties : List> // class because `using` is file scoped :| { + public bool HasProperty(string property) + { + return GetProperty(property) != default; + } + + public ValueTuple GetProperty(string property) + { + return this.FirstOrDefault(p => p.Item1.Equals(property)); + } + + public void SetProperty(string property, string value) + { + if (HasProperty(property)) + { + this[IndexOf(GetProperty(property))] = (property, value); + return; + } + Add((property, value)); + } + } }