private void __ValidateKnowledgeOfOrderTarget(IUnitAttackable target, FacilityDirective directive) { if (directive == FacilityDirective.Disband || directive == FacilityDirective.Refit || directive == FacilityDirective.StopAttack) { // directives aren't yet implemented return; } if (directive == FacilityDirective.Scuttle || directive == FacilityDirective.Repair) { D.AssertNull(target); return; } if (!OwnerAIMgr.HasKnowledgeOf(target as IItem_Ltd)) { D.Error("{0} received {1} order with Target {2} that {3} has no knowledge of.", DebugName, directive.GetValueName(), target.DebugName, Owner.LeaderName); } }
protected void ExecuteAttackOrder_UponOrderOutcome(FacilityDirective directive, FacilityItem facility, bool isSuccess, IElementAttackable target, UnitItemOrderFailureCause failCause) { LogEvent(); if (directive != FacilityDirective.Attack) { D.Warn("{0} State {1} erroneously received OrderOutcome callback with {2} {3}.", DebugName, CurrentState.GetValueName(), typeof(FacilityDirective).Name, directive.GetValueName()); return; } // TODO What? It will be common for an attack by a facility to fail for cause unreachable as its target moves out of range... }