Skip to content

Commit

Permalink
Major CAI cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kbatbouta committed Dec 24, 2023
1 parent 1bbe6e7 commit c29a988
Show file tree
Hide file tree
Showing 4 changed files with 716 additions and 649 deletions.
Binary file modified 1.4/Assemblies/CombatAI.dll
Binary file not shown.
12 changes: 12 additions & 0 deletions Source/Rule56/CombatAI_Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,18 @@ public static int GetSquadFlagsIndex(this Pawn pawn)
{
return pawn.AI()?.squad?.squadIDNumber ?? 0;
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsRangedSappingCompatible(this Verb verb)
{
return verb != null && !verb.IsMeleeAttack && verb != null && !(verb is Verb_SpewFire || verb is Verb_ShootBeam) && !verb.IsEMP() && !verb.verbProps.CausesExplosion;
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsUsingVerb(this Pawn pawn)
{
return pawn.CurJobDef?.Is(JobDefOf.UseVerbOnThing) ?? false;
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static PersonalityTacker.PersonalityResult GetCombatPersonality(this Thing thing, int expiry = 240)
Expand Down
Loading

0 comments on commit c29a988

Please sign in to comment.