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 { DebugEnabler.WriteLog(Target.GetResourceKey().ToString()); SimpleMessageDialog.Show(Common.Localize("ResourceKey:MenuName"), Target.GetResourceKey().ToString()); } catch (Exception exception) { Common.Exception(Actor, Target, exception); } return(true); }
public override bool Run() { try { string msg = Target.GetType().AssemblyQualifiedName; DebugEnabler.WriteLog(msg); SimpleMessageDialog.Show(Common.Localize("TypeName:MenuName"), msg); } catch (Exception exception) { Common.Exception(Actor, Target, exception); } return(true); }
public override bool Run() { try { Sim target = Target as Sim; SimOutfit outfit = target.SimDescription.GetOutfit(target.CurrentOutfitCategory, target.CurrentOutfitIndex); DebugEnabler.WriteLog(outfit.Key.ToString()); SimpleMessageDialog.Show(Common.Localize("ShowOutfitKey:MenuName"), outfit.Key.ToString()); } 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); }