protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting) { if (inspecting) { return(true); } return(ManagerSituation.FindRabbitHole(RabbitHoleType.PoliceStation) != null); }
protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting) { if (inspecting) { return(true); } if (sim.Occupation is Retired) { return(false); } return(ManagerSituation.FindRabbitHole(RabbitHoleType.ScienceLab) != null); }
protected override bool Push() { if (Sim.CreatedSim == null) { return(false); } if (!Situations.Allow(this, Sim)) { return(false); } if (Sim.CreatedSim.InteractionQueue != null) { Sim.CreatedSim.InteractionQueue.CancelAllInteractions(); } PoliceStation target = ManagerSituation.FindRabbitHole(RabbitHoleType.PoliceStation) as PoliceStation; if (target == null) { return(false); } if (OnPushInteraction == null) { return(false); } InteractionDefinition pushInteraction = OnPushInteraction(); if (pushInteraction == null) { return(false); } InteractionInstance entry = pushInteraction.CreateInstance(target, Sim.CreatedSim, new InteractionPriority(InteractionPriorityLevel.High), false, false); Sim.CreatedSim.AddExitReason(ExitReason.CanceledByScript); Sim.CreatedSim.InteractionQueue.AddNext(entry); return(true); }
protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting) { if (!inspecting) { if (sim.Occupation is Retired) { return(false); } if (ManagerSituation.FindRabbitHole(RabbitHoleType.CityHall) == null) { return(false); } } if ((newLot == null) || (newLot.CountObjects <DraftingTable>() == 0)) { return(false); } return(true); }
protected bool ProgressPrivateEye(Occupation occupation) { if (!Test(Sim.CreatedSim, PoliceStation.LowLevelPoliceWork.Singleton)) { PoliceStation.LowLevelPoliceWork interaction = Sim.CreatedSim.InteractionQueue.GetCurrentInteraction() as PoliceStation.LowLevelPoliceWork; if (interaction != null) { if (interaction.CurrentTone == null) { List <ITone> allTones = new List <ITone>(); foreach (InteractionToneDisplay tone in interaction.AvailableTonesForDisplay()) { allTones.Add(tone.InteractionTone); } string name = null; if (CareerToneScenario.SetTone(interaction, allTones, ref name)) { IncStat("Private Eye Tone"); } } } return(true); } ; RabbitHole hole = ManagerSituation.FindRabbitHole(RabbitHoleType.PoliceStation); if (hole == null) { IncStat("No Police Station"); return(false); } return(Situations.PushInteraction <RabbitHole>(this, Sim, hole, PoliceStation.LowLevelPoliceWork.Singleton)); }