Example #1
0
            public override bool Test(Sim a, PingPongTable target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (target.InUse)
                {
                    if (!target.IsHaunted)
                    {
                        if (target.IsActorUsingMe(a))
                        {
                            return(true);
                        }

                        greyedOutTooltipCallback = delegate
                        {
                            return(PingPongTable.LocalizeString("PingPongTableInUse", new object[0]));
                        };
                    }

                    return(false);
                }

                if (!Woohooer.Settings.mUnlockTeenActions)
                {
                    if (a.SimDescription.TeenOrBelow)
                    {
                        return(false);
                    }
                }

                if (PingPongTable.GetPotentialPlayers(a, target.LotCurrent, !Woohooer.Settings.mUnlockTeenActions, true).Count == 0)
                {
                    greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(Localization.LocalizeString(a.IsFemale, "Gameplay/Objects/Toys/PlayCatchObject:NoOneToPlayWith", new object[0]));
                    return(false);
                }

                return(true);
            }
Example #2
0
 public override void PopulatePieMenuPicker(ref InteractionInstanceParameters parameters, out List <ObjectPicker.TabInfo> listObjs, out List <ObjectPicker.HeaderInfo> headers, out int NumSelectableRows)
 {
     NumSelectableRows = 1;
     PopulateSimPicker(ref parameters, out listObjs, out headers, PingPongTable.GetPotentialPlayers(parameters.Actor as Sim, parameters.Target.LotCurrent, !Woohooer.Settings.mUnlockTeenActions, true), false);
 }