public override bool Test(IActor a, GameObject target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (!base.Test(a, target, isAutonomous, ref greyedOutTooltipCallback)) { return(false); } Sim sim = target as Sim; if (sim != null) { if (sim.InteractionQueue == null) { return(false); } if (sim.InteractionQueue.Count == 0) { return(false); } return(true); } else { Sims3.Gameplay.Objects.RabbitHoles.CityHall cityHall = target as Sims3.Gameplay.Objects.RabbitHoles.CityHall; return(cityHall != null); } }
public override bool Run() { try { Sim sim = Target as Sim; if (sim != null) { Perform(sim); } else { Sims3.Gameplay.Objects.RabbitHoles.CityHall cityHall = Target as Sims3.Gameplay.Objects.RabbitHoles.CityHall; if (cityHall != null) { foreach (Sim member in LotManager.Actors) { Perform(member); } } } } catch (Exception exception) { Common.Exception(Actor, Target, exception); } return(true); }
public override bool Run() { try { Sim sim = Target as Sim; if (sim != null) { string msg = null; foreach (InteractionInstance instance in sim.InteractionQueue.InteractionList) { msg += Common.NewLine + Common.NewLine + instance.InteractionDefinition.GetType().AssemblyQualifiedName; if (instance.InteractionDefinition is SocialInteractionA) { msg += Common.NewLine + "(" + instance.InteractionDefinition.ToString() + ")"; } } DebugEnabler.WriteLog(msg); SimpleMessageDialog.Show(Common.Localize("CurrentInteraction:MenuName"), msg); } else { string msg = null; Sims3.Gameplay.Objects.RabbitHoles.CityHall cityHall = Target as Sims3.Gameplay.Objects.RabbitHoles.CityHall; if (cityHall != null) { foreach (Sim member in LotManager.Actors) { if ((member.InteractionQueue != null) && (member.InteractionQueue.GetHeadInteraction() != null)) { msg += Common.NewLine + member.SimDescription.FullName; foreach (InteractionInstance instance in member.InteractionQueue.InteractionList) { msg += Common.NewLine + Common.NewLine + instance.InteractionDefinition.GetType().AssemblyQualifiedName; if (instance.InteractionDefinition is SocialInteractionA.Definition) { msg += Common.NewLine + "(" + instance.InteractionDefinition.ToString() + ")"; } } } } } DebugEnabler.WriteLog(msg); } } catch (Exception exception) { Common.Exception(Actor, Target, exception); } return(true); }
public override bool Run() { try { Sim sim = Target as Sim; if (sim != null) { string msg = null; foreach (Situation situation in sim.Autonomy.SituationComponent.Situations) { msg += Common.NewLine + ToString(situation); } DebugEnabler.WriteLog(msg); SimpleMessageDialog.Show(Common.Localize("CurrentSituation:MenuName"), msg); } else { Lot lot = Target as Lot; if (lot != null) { string msg = null; foreach (Situation situation in Situation.sAllSituations) { if (situation.Lot != lot) { continue; } msg += Common.NewLine + ToString(situation); } DebugEnabler.WriteLog(msg); SimpleMessageDialog.Show(Common.Localize("CurrentSituation:MenuName"), msg); } else { string msg = null; Sims3.Gameplay.Objects.RabbitHoles.CityHall cityHall = Target as Sims3.Gameplay.Objects.RabbitHoles.CityHall; if (cityHall != null) { foreach (Sim member in LotManager.Actors) { if (member.Autonomy == null) { continue; } if (member.Autonomy.SituationComponent == null) { continue; } if (member.Autonomy.SituationComponent.Situations.Count > 0) { msg += Common.NewLine + member.SimDescription.FullName; foreach (Situation situation in member.Autonomy.SituationComponent.Situations) { msg += Common.NewLine + " " + ToString(situation); } } } } DebugEnabler.WriteLog(msg); } } } catch (Exception exception) { Common.Exception(Actor, Target, exception); } return(true); }