Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static IEnumerable<FloatMenuOption> Postfix(IEnumerable<FloatMenuOption>
}

var pawn = context.FirstSelectedPawn;
var abilityProvider = pawn.equipment?.Primary?.TryGetComp<CompAbilityProvider>();
var abilityProvider = pawn?.equipment?.Primary?.TryGetComp<CompAbilityProvider>();
if (abilityProvider == null) {
yield break;
}
Expand Down
1 change: 1 addition & 0 deletions Source/HarmonyPatches/Postfix_Projectile_Launch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public static void Postfix(Projectile __instance, Thing? equipment) {
}

if (!trait.extraDamages.NullOrEmpty()) {
__instance.extraDamages ??= [];
__instance.extraDamages.AddRange(trait.extraDamages);
}

Expand Down
4 changes: 2 additions & 2 deletions Source/ThingComps/CompDynamicTraits.cs
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ private void ClearAllCaches() {
if (verb == null) return;

// === cached ===
AccessTools.Field(typeof(Verb), "cachedBurstShotCount").SetValue(verb, null);
AccessTools.Field(typeof(Verb), "cachedTicksBetweenBurstShots").SetValue(verb, null);
AccessTools.Field(typeof(Verb), "cachedBurstShotCount").SetValue(verb, -1);
AccessTools.Field(typeof(Verb), "cachedTicksBetweenBurstShots").SetValue(verb, -1);
}

#endregion
Expand Down