Beispiel #1
0
        public static bool CanSimTriggerTravelToVacationWorld(Sim actor, bool testMoveRequested, ref GreyedOutTooltipCallback callback)
        {
            if (actor == null)
            {
                callback = Common.DebugTooltip("No Actor");
                return(false);
            }

            if (!Traveler.HasBeenSaved())
            {
                callback = delegate { return(Common.Localize("Save:Prompt")); };
                return(false);
            }

            /*
             * if (!GameUtils.IsInstalled(ProductVersion.EP1))
             * {
             *  callback = Common.DebugTooltip("Pack Not Installed");
             *  return false;
             * }
             */

            string reason = CommonSpace.Helpers.TravelUtilEx.CheckForReasonsToFailTravel(actor.SimDescription, Traveler.Settings.mTravelFilter, WorldName.Undefined, false, testMoveRequested);

            if (!string.IsNullOrEmpty(reason))
            {
                callback = delegate { return(reason); };
                return(false);
            }

            return(true);
        }