예제 #1
0
파일: Swipe.cs 프로젝트: yakoder/NRaas
            public override bool Test(Sim a, GameObject target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                try
                {
                    if (a.Household == null)
                    {
                        return(false);
                    }

                    if (target.LotCurrent == a.LotHome)
                    {
                        return(false);
                    }

                    if (!target.IsStealable())
                    {
                        return(false);
                    }

                    OmniCareer omni = a.Occupation as OmniCareer;
                    if (omni == null)
                    {
                        return(false);
                    }

                    return(omni.CanSwipe());
                }
                catch (Exception e)
                {
                    Common.Exception(a, target, e);
                    return(false);
                }
            }