Beispiel #1
0
        public static bool Test(Sim actor, Sim target, ActiveTopic topic, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
        {
            try
            {
                if (NRaas.Careers.Settings.mMaxShakedown <= 0)
                {
                    return(false);
                }

                if (actor.Occupation is Criminal)
                {
                    return(true);
                }

                if (actor.Occupation is LawEnforcement)
                {
                    return(true);
                }

                OmniCareer actorCareer = actor.Occupation as OmniCareer;
                if (actorCareer != null)
                {
                    return(actorCareer.CanShakedown());
                }

                return(false);
            }
            catch (Exception e)
            {
                Common.Exception(actor, target, e);
                return(false);
            }
        }