Skip to content

Commit

Permalink
Merge pull request #1 from Synthesis-Collective/dev
Browse files Browse the repository at this point in the history
No skill label if skill is -1
  • Loading branch information
kjack9 committed May 25, 2021
2 parents 44e8c70 + 6381b20 commit ce1bdd9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions BookSmart/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,9 @@ public static List<string> CreateQuestBookCache(IPatcherState<ISkyrimMod, ISkyri

public static string? GetSkillLabelName(IBookGetter book)
{
// variables for use in this section
if (book.Teaches == null) { return null; }
IBookSkillGetter skillTeach = (IBookSkillGetter)book.Teaches;
if (skillTeach == null || skillTeach.Skill == null) { return null; }
if (book.Teaches is not IBookSkillGetter skillTeach) return null;
if (skillTeach.Skill == null) return null;
if ((int)skillTeach.Skill == -1) return null;

// Label Format: Long
if (settings.labelFormat == Settings.LabelFormat.Long)
Expand Down

0 comments on commit ce1bdd9

Please sign in to comment.