diff --git a/BookSmart/Program.cs b/BookSmart/Program.cs index 1baeade..ed5461f 100644 --- a/BookSmart/Program.cs +++ b/BookSmart/Program.cs @@ -63,12 +63,18 @@ public static void RunPatch(IPatcherState state) { Skill.HeavyArmor => "Heavy Armor", Skill.LightArmor => "Light Armor", - Skill.OneHanded => "One Handed", - Skill.TwoHanded => "Two Handed", + Skill.OneHanded => "One-Handed", + Skill.TwoHanded => "Two-Handed", _ => skillTeach.Skill.ToString() }; - newName = $"{open}{skillName}{close} {book.Name}"; + switch (settings.labelPosition) + { + case Settings.LabelPosition.Before_Name: { newName = $"{open}{skillName}{close} {book.Name}"; break; } + case Settings.LabelPosition.After_Name: { newName = $"{book.Name} {open}{skillName}{close}"; break; } + default: throw new NotImplementedException("Somehow your set Label Position to something that isn't supported."); + } + } // Label Format: Short else if (settings.labelFormat == Settings.LabelFormat.Short) @@ -96,12 +102,22 @@ public static void RunPatch(IPatcherState state) _ => skillTeach.Skill.ToString() }; - newName = $"{open}{skillName}{close} {book.Name}"; + switch (settings.labelPosition) + { + case Settings.LabelPosition.Before_Name: { newName = $"{open}{skillName}{close} {book.Name}"; break; } + case Settings.LabelPosition.After_Name: { newName = $"{book.Name} {open}{skillName}{close}"; break; } + default: throw new NotImplementedException("Somehow your set Label Position to something that isn't supported."); + } } // Label Format: Star else if (settings.labelFormat == Settings.LabelFormat.Star) { - newName = $"*{book.Name}"; + switch (settings.labelPosition) + { + case Settings.LabelPosition.Before_Name: { newName = $"*{book.Name}"; break; } + case Settings.LabelPosition.After_Name: { newName = $"{book.Name}*"; break; } + default: throw new NotImplementedException("Somehow your set Label Position to something that isn't supported."); + } } else { diff --git a/BookSmart/Settings.cs b/BookSmart/Settings.cs index ffedd30..b65ec6e 100644 --- a/BookSmart/Settings.cs +++ b/BookSmart/Settings.cs @@ -12,6 +12,7 @@ namespace BookSmart { class Settings { + // Label Format public enum LabelFormat { Star, @@ -24,6 +25,7 @@ public enum LabelFormat [SynthesisTooltip("Star: *BookName\r\nShort: BookName\r\nLong: BookName")] public LabelFormat labelFormat { get; set; } = LabelFormat.Long; + // Encapsulating Characters public enum EncapsulatingCharacters { Parenthesis, @@ -38,5 +40,16 @@ public enum EncapsulatingCharacters [SynthesisTooltip("The characters to wrap the skill name in.\r\nParenthesis: ()\r\nCurly Brackets: {}\r\nSquare Brackets: []\r\nChevrons: <>\r\nStars: *")] public EncapsulatingCharacters encapsulatingCharacters { get; set; } = EncapsulatingCharacters.Chevrons; + // Label Position + public enum LabelPosition + { + Before_Name, + After_Name + } + + [SynthesisOrder] + [SynthesisSettingName("Label Position")] + [SynthesisTooltip("Where to put the label when creating the new name.")] + public LabelPosition labelPosition { get; set; } = LabelPosition.Before_Name; } }