public void SetOrder(Order order, string option) { CurrentOrderOption = option; CurrentOrder = order; objectiveManager.SetOrder(order, option); SetOrderProjSpecific(order); }
public void SetOrder(Order order, string option) { CurrentOrderOption = option; CurrentOrder = order; objectiveManager.SetOrder(order, option); GameMain.GameSession.CrewManager.SetCharacterOrder(Character, order); }
public void SetOrder(Order order, string option, Character orderGiver, bool speak = true) { CurrentOrderOption = option; CurrentOrder = order; objectiveManager.SetOrder(order, option, orderGiver); if (speak && Character.SpeechImpediment < 100.0f) { Character.Speak(TextManager.Get("DialogAffirmative"), null, 1.0f); } SetOrderProjSpecific(order); }
public void SetOrder(Order order, string option, Character orderGiver, bool speak = true) { CurrentOrderOption = option; CurrentOrder = order; objectiveManager.SetOrder(order, option, orderGiver); if (ObjectiveManager.CurrentOrder != null && speak && Character.SpeechImpediment < 100.0f) { if (ObjectiveManager.CurrentOrder is AIObjectiveRepairItems repairItems && repairItems.Targets.None()) { Character.Speak(TextManager.Get("DialogNoRepairTargets"), null, 3.0f, "norepairtargets"); } else if (ObjectiveManager.CurrentOrder is AIObjectiveChargeBatteries chargeBatteries && chargeBatteries.Targets.None()) { Character.Speak(TextManager.Get("DialogNoBatteries"), null, 3.0f, "nobatteries"); }
public HumanAIController(Character c) : base(c) { steeringManager = new IndoorsSteeringManager(this, true); objectiveManager = new AIObjectiveManager(c); objectiveManager.AddObjective(new AIObjectiveFindSafety(c)); objectiveManager.AddObjective(new AIObjectiveIdle(c)); updateObjectiveTimer = Rand.Range(0.0f, UpdateObjectiveInterval); if (GameMain.GameSession != null && GameMain.GameSession.CrewManager != null) { CurrentOrder = Order.PrefabList.Find(o => o.Name.ToLowerInvariant() == "dismissed"); objectiveManager.SetOrder(CurrentOrder, ""); GameMain.GameSession.CrewManager.SetCharacterOrder(Character, CurrentOrder); } }