private static bool HasValidCandidates(Lot lot, Sim actor, WeatherStone.SummonWeatherType type) { return(lot.DoesSimExist(delegate(Sim s) { return (s != actor) && IsValidCandidate(s, actor, type); })); }
private static List <Sim> GetValidCandidates(Lot lot, Sim actor, WeatherStone.SummonWeatherType type) { return(lot.GetSims(delegate(Sim s) { return IsValidCandidate(s, actor, type); })); }
public static bool CommonTest(WeatherStone ths, Sim actor, WeatherStone.SummonWeatherType type, ref GreyedOutTooltipCallback greyedOutTooltipCallback, bool isAutonomous) { if (!isAutonomous) { switch (ths.CurrentWeatherStoneState) { case WeatherStone.WeatherStoneState.ReadyForSummoning: return(true); case WeatherStone.WeatherStoneState.SummoningWeather: if (type == ths.mSummonWeatherType) { return(true); } greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(WeatherStone.LocalizeString(actor.IsFemale, "TryingToSummonTooltip", new object[0])); break; case WeatherStone.WeatherStoneState.AfterSuccessfulSummon: greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(WeatherStone.LocalizeString(actor.IsFemale, "StoneCurrentSummoningWeatherTooltip", new object[0])); break; case WeatherStone.WeatherStoneState.AfterFailureSummon: case WeatherStone.WeatherStoneState.Resting: greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(WeatherStone.LocalizeString(actor.IsFemale, "StoneRestingTooltip", new object[0])); break; } } return(false); }
private static bool IsValidCandidate(Sim sim, Sim actor, WeatherStone.SummonWeatherType type) { if (sim.SimDescription.ChildOrBelow) { return(false); } else if (sim == actor) { return(false); } return(SummonWeatherEx.GetSummonWeatherTypeForSim(sim.SimDescription).Contains(type)); }
public Definition(WeatherStone.SummonWeatherType type) { mType = type; }