We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6ed95c4 + 1011716 commit b6775e2Copy full SHA for b6775e2
Source/TinyTweaks/HarmonyPatches/Patch_SkillRecord.cs
@@ -21,8 +21,9 @@ public static class Interval
21
22
public static bool Prefix(SkillRecord __instance, Pawn ___pawn)
23
{
24
+ CompSkillRecordCache cache = ___pawn.GetComp<CompSkillRecordCache>();
25
// Delay skill decay
- if (TinyTweaksSettings.delayedSkillDecay && !___pawn.GetComp<CompSkillRecordCache>().CanDecaySkill(__instance.def))
26
+ if (TinyTweaksSettings.delayedSkillDecay && cache != null && !cache.CanDecaySkill(__instance.def))
27
return false;
28
return true;
29
}
0 commit comments