private static bool ShouldUseMeleeAttackGizmo(Pawn pawn) { if (!pawn.Drafted) { return(false); } return(PawnAttackGizmoUtility.AtLeastOneSelectedColonistHasRangedWeapon() || PawnAttackGizmoUtility.AtLeastOneSelectedColonistHasNoWeapon() || PawnAttackGizmoUtility.AtLeastTwoSelectedColonistsHaveDifferentWeapons()); }
public static IEnumerable <Gizmo> GetAttackGizmos(Pawn pawn) { if (PawnAttackGizmoUtility.ShouldUseMeleeAttackGizmo(pawn)) { yield return(PawnAttackGizmoUtility.GetMeleeAttackGizmo(pawn)); } if (PawnAttackGizmoUtility.ShouldUseSquadAttackGizmo()) { yield return(PawnAttackGizmoUtility.GetSquadAttackGizmo(pawn)); } }
public static IEnumerable <Gizmo> GetAttackGizmos(Pawn pawn) { if (PawnAttackGizmoUtility.ShouldUseMeleeAttackGizmo(pawn)) { yield return(PawnAttackGizmoUtility.GetMeleeAttackGizmo(pawn)); /*Error: Unable to find new state assignment for yield return*/; } if (!PawnAttackGizmoUtility.ShouldUseSquadAttackGizmo()) { yield break; } yield return(PawnAttackGizmoUtility.GetSquadAttackGizmo(pawn)); /*Error: Unable to find new state assignment for yield return*/; }
public bool MoveNext() { uint num = (uint)this.$PC; this.$PC = -1; switch (num) { case 0u: if (PawnAttackGizmoUtility.ShouldUseMeleeAttackGizmo(pawn)) { this.$current = PawnAttackGizmoUtility.GetMeleeAttackGizmo(pawn); if (!this.$disposing) { this.$PC = 1; } return(true); } break; case 1u: break; case 2u: goto IL_89; default: return(false); } if (PawnAttackGizmoUtility.ShouldUseSquadAttackGizmo()) { this.$current = PawnAttackGizmoUtility.GetSquadAttackGizmo(pawn); if (!this.$disposing) { this.$PC = 2; } return(true); } IL_89: this.$PC = -1; return(false); }
private static bool ShouldUseSquadAttackGizmo() { return(PawnAttackGizmoUtility.AtLeastOneSelectedColonistHasRangedWeapon() && PawnAttackGizmoUtility.AtLeastTwoSelectedColonistsHaveDifferentWeapons()); }
public static bool CanShowEquipmentGizmos() { return(!PawnAttackGizmoUtility.AtLeastTwoSelectedColonistsHaveDifferentWeapons()); }