Beispiel #1
0
 private static bool HasValidCandidates(Lot lot, Sim actor, WeatherStone.SummonWeatherType type)
 {
     return(lot.DoesSimExist(delegate(Sim s)
     {
         return (s != actor) && IsValidCandidate(s, actor, type);
     }));
 }
Beispiel #2
0
 private static List <Sim> GetValidCandidates(Lot lot, Sim actor, WeatherStone.SummonWeatherType type)
 {
     return(lot.GetSims(delegate(Sim s)
     {
         return IsValidCandidate(s, actor, type);
     }));
 }
Beispiel #3
0
        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);
        }
Beispiel #4
0
            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));
            }
Beispiel #5
0
 public Definition(WeatherStone.SummonWeatherType type)
 {
     mType = type;
 }
Beispiel #6
0
 public Definition(WeatherStone.SummonWeatherType type)
 {
     mType = type;
 }