public override bool BeforeEnteringRabbitHole() { try { List <Stage> list = new List <Stage>(); TimedStage item = new TimedStage(LocalizeString("EatAtRestaurant", new object[] { Food.GetCurrentMealTimeString() }), Target.RestaurantTuning.EatLength, false, true, true); list.Add(item); switch (Food.GetCurrentMealTime()) { case Recipe.MealTime.Lunch: case Recipe.MealTime.Dinner: { TimedStage stage2 = new EatHere.EatDessertStage(LocalizeString("StayForDessert", new object[0x0]), Target.RestaurantTuning.DessertLength, false, true, true); list.Add(stage2); break; } } Stages = list; } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); } return(base.BeforeEnteringRabbitHole()); }
public override void ConfigureInteraction() { base.ConfigureInteraction(); TimedStage stage = new TimedStage(GetInteractionName(), RabbitHole.InvestInRabbithole.kTimeToSpendInside, false, false, true); Stages = new List <Stage>(new Stage[] { stage }); ActiveStage = stage; }
public override void ConfigureInteraction() { base.ConfigureInteraction(); TimedStage stage = new TimedStage(GetInteractionName(), mMaster ? KamaSimtra.Settings.mRendezvousWaitPeriod : KamaSimtra.Settings.mRendezvousDuration, false, false, true); Stages = new List <Stage>(new Stage[] { stage }); ActiveStage = stage; }
public override void ConfigureInteraction() { base.ConfigureInteraction(); TimedStage stage = new TimedStage(GetInteractionName(), 30, false, true, true); Stages = new List <Stage>(new Stage[] { stage }); ActiveStage = stage; }
public override void ConfigureInteraction() { float weedDuration = Target.GetWeedDuration(Actor); TimedStage timedStage = new TimedStage(GetInteractionName(), weedDuration, showCompletionTime: false, selectable: true, visibleProgress: true); base.Stages = new List <Stage>(new Stage[1] { timedStage }); }
public override void ConfigureInteraction() { TimedStage timedStage = new TimedStage(this.GetInteractionName(), (float)Sim.NapLengthInMinutes, false, true, true); base.Stages = new List <Stage>(new Stage[] { timedStage }); }
public override void ConfigureInteraction() { base.ConfigureInteraction(); TimedStage stage = new TimedStage(GetInteractionName(), Hospital.GetFluShot.kSimMinutesForFluShot, false, false, true); Stages = new List <Stage>(new Stage[] { stage }); ActiveStage = stage; }
public override void ConfigureInteraction() { base.ConfigureInteraction(); TimedStage stage = new TimedStage(GetInteractionName(), Vector.Settings.mDoctorsVisitLength, false, false, true); Stages = new List <Stage>(new Stage[] { stage }); ActiveStage = stage; }
// Methods public override void ConfigureInteraction() { LawEnforcement job = OmniCareer.Career <LawEnforcement>(base.Actor.Occupation); if (job == null) { return; } TimedStage stage = new TimedStage(this.GetInteractionName(), Computer.RunForensicAnalysis.kInteractionStageLength - job.MinutesSpentDoingForensicAnalysis, false, true, true); base.Stages = new List <Stage>(new Stage[] { stage }); }
public override void ConfigureInteraction() { float num = Target.GetWaterDuration(Actor); if (num == 0f) { num = 1f; } TimedStage timedStage = new TimedStage(GetInteractionName(), num, showCompletionTime: false, selectable: true, visibleProgress: true); base.Stages = new List <Stage>(new Stage[1] { timedStage }); }
public override bool Run() { timeToGo = false; TimedStage timedStage = new TimedStage(GetInteractionName(), kSimMinutesForVet, showCompletionTime: false, selectable: true, visibleProgress: true); Stages = new List <Stage>(new Stage[1] { timedStage }); ActiveStage = timedStage; if (mPet == null || mPet.HasBeenDestroyed) { return(false); } AddFollower(mPet); return(base.Run()); }
public override bool Test(Sim a, RabbitHole target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { try { /*if (a.Posture.Container != target.RabbitHoleProxy) * { * greyedOutTooltipCallback = Common.DebugTooltip("Not Container"); * return false; * }*/ if (!base.Test(a, target, isAutonomous, ref greyedOutTooltipCallback)) { return(false); } /*if (GetRomanticSimsAtSameLevel(target, a, isAutonomous, GetStyle(null), Makeout, true).Count == 0x0) * { * greyedOutTooltipCallback = Common.DebugTooltip("No Other Sims"); * return false; * }*/ /*RabbitHole.RabbitHoleInteraction<Sim, RabbitHole> currentInteraction = a.CurrentInteraction as RabbitHole.RabbitHoleInteraction<Sim, RabbitHole>; * if (currentInteraction == null) * { * greyedOutTooltipCallback = Common.DebugTooltip("Not Rabbithole Interaction"); * return false; * } * * if (!currentInteraction.CanWooHooDuringInteraction) * { * greyedOutTooltipCallback = Common.DebugTooltip("CanWooHooDuringInteraction Fail"); * return false; * }*/ TimedStage currentStage = a.CurrentInteraction.ActiveStage as TimedStage; return(currentStage != null && currentStage.mbTimerActive); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(a, target, e); return(false); } }
public override void ConfigureInteraction() { try { Definition interactionDefinition = base.InteractionDefinition as Definition; mStyle = interactionDefinition.mStyle; TimedStage stage = new TimedStage(GetInteractionName(), NectarMaker.kPushButtonTimeMinutes, false, true, true); Stages = new List <Stage>(new Stage[] { stage }); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); } }
public override void ConfigureInteraction() { try { Definition interactionDefinition = base.InteractionDefinition as Definition; mStyle = interactionDefinition.mStyle; TimedStage stage = new TimedStage(GetInteractionName(), NectarMaker.kPushButtonTimeMinutes, false, true, true); Stages = new List<Stage>(new Stage[] { stage }); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); } }
public override bool InRabbitHole() { try { ActiveStage.Start(); SimDescription choice = null; if (mMaster) { if (!AcceptCancelDialog.Show(Common.Localize("Rendezvous:Prompt", Actor.IsFemale, new object[] { KamaSimtra.Settings.mRendezvousCostPerLevel }))) { return(false); } Dictionary <int, List <SimDescription> > potentials = KamaSimtra.GetPotentials(Woohooer.Settings.AllowTeen(true)); List <SimDescription> choices = new List <SimDescription>(); for (int i = 1; i <= 10; i++) { List <SimDescription> fullList; if (!potentials.TryGetValue(i, out fullList)) { continue; } bool needFemale = false; if (Actor.SimDescription.CanAutonomouslyBeRomanticWithGender(CASAgeGenderFlags.Male)) { if (Actor.SimDescription.CanAutonomouslyBeRomanticWithGender(CASAgeGenderFlags.Female)) { if (RandomUtil.CoinFlip()) { needFemale = true; } } else { needFemale = false; } } else if (Actor.SimDescription.CanAutonomouslyBeRomanticWithGender(CASAgeGenderFlags.Female)) { needFemale = true; } else { needFemale = !Actor.IsFemale; } List <SimDescription> randomList = new List <SimDescription>(); foreach (SimDescription sim in fullList) { if (sim.IsFemale != needFemale) { continue; } if (sim.Household == Actor.Household) { continue; } string reason; GreyedOutTooltipCallback callback = null; if (!CommonSocials.CanGetRomantic(Actor.SimDescription, sim, false, true, true, ref callback, out reason)) { if (callback != null) { Common.DebugNotify(sim.FullName + Common.NewLine + callback()); } continue; } if (choices.Contains(sim)) { continue; } randomList.Add(sim); } if (randomList.Count > 0) { choices.Add(RandomUtil.GetRandomObjectFromList(randomList)); } } if (choices.Count == 0) { Common.Notify(Common.Localize("Rendezvous:NoneAvailable", Actor.IsFemale)); return(false); } choice = new SimSelection(Common.Localize("Rendezvous:MenuName"), Actor.SimDescription, choices, SimSelection.Type.Rendezvous, -1000).SelectSingle(); if (choice == null) { Common.Notify(Common.Localize("Rendezvous:NoSelect", Actor.IsFemale)); return(false); } if (Instantiation.PerformOffLot(choice, Target.LotCurrent, null) == null) { Common.Notify(Common.Localize("Rendezvous:BadSim", Actor.IsFemale, new object[] { choice })); return(false); } Rendezvous interaction = Singleton.CreateInstance(Target, choice.CreatedSim, new InteractionPriority(InteractionPriorityLevel.UserDirected), false, true) as Rendezvous; interaction.mMaster = false; interaction.LinkedInteractionInstance = this; choice.CreatedSim.InteractionQueue.CancelAllInteractions(); if (!choice.CreatedSim.InteractionQueue.AddNext(interaction)) { Common.Notify(Common.Localize("Rendezvous:BadSim", Actor.IsFemale, new object[] { choice })); return(false); } if (!DoLoop(~(ExitReason.Replan | ExitReason.MidRoutePushRequested | ExitReason.ObjectStateChanged | ExitReason.PlayIdle | ExitReason.MaxSkillPointsReached), WaitPeriodLoop, null)) { Common.Notify(Common.Localize("Rendezvous:BadSim", Actor.IsFemale, new object[] { choice })); return(false); } if (!mBegin) { Common.Notify(Common.Localize("Rendezvous:BadSim", Actor.IsFemale, new object[] { choice })); return(false); } else { Actor.ClearExitReasons(); TimedStage stage = new TimedStage(GetInteractionName(), KamaSimtra.Settings.mRendezvousDuration, false, false, true); Stages = new List <Stage>(new Stage[] { stage }); ActiveStage = stage; ActiveStage.Start(); } } else { Rendezvous interaction = LinkedInteractionInstance as Rendezvous; if (interaction == null) { return(false); } interaction.mBegin = true; } if (mMaster) { if (!CelebrityManager.TryModifyFundsWithCelebrityDiscount(Actor, Target, KamaSimtra.Settings.mRendezvousCostPerLevel * choice.SkillManager.GetSkillLevel(KamaSimtra.StaticGuid), true)) { Common.Notify(Common.Localize("Rendezvous:CannotPay", Actor.IsFemale)); return(false); } Common.Notify(choice.CreatedSim, Common.Localize("Rendezvous:Success", Actor.IsFemale, choice.IsFemale, new object[] { choice })); KamaSimtra skill = KamaSimtra.EnsureSkill(Actor); if (skill != null) { skill.RendezvousActive = true; } } BeginCommodityUpdates(); bool succeeded = DoLoop(~(ExitReason.Replan | ExitReason.MidRoutePushRequested | ExitReason.ObjectStateChanged | ExitReason.PlayIdle | ExitReason.MaxSkillPointsReached)); EndCommodityUpdates(succeeded); if (KamaSimtra.Settings.mRandomRendezvousMoodlet) { Actor.BuffManager.AddElement(RandomUtil.GetRandomObjectFromList(sRandomBuffs), WoohooBuffs.sWoohooOrigin); } if (mMaster) { CommonWoohoo.WoohooLocation location = CommonWoohoo.WoohooLocation.RabbitHole; List <WoohooLocationControl> choices = CommonWoohoo.GetValidLocations(Actor.SimDescription); if (choices.Count > 0) { location = RandomUtil.GetRandomObjectFromList(choices).Location; } CommonWoohoo.RunPostWoohoo(Actor, choice.CreatedSim, Target, CommonWoohoo.WoohooStyle.Safe, location, false); } return(succeeded); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); return(false); } }
public override void ConfigureInteraction() { TimedStage stage = new TimedStage("CheckSelfOutInMirror", kInteractionTimeLength, false, true, false); base.Stages = new List <Stage>(new Stage[] { stage }); }