Exemplo n.º 1
0
        public override void Startup(PersistentOptionBase options)
        {
            base.Startup(options);

            mAccountKeys.Clear();

            AddListener(EventTypeId.kFamilyFundsChanged, OnFundsChanged);
        }
Exemplo n.º 2
0
        public override void Startup(PersistentOptionBase options)
        {
            base.Startup(options);

            mStats = new StatBin(UnlocalizedName);

            mTotalStats = new StatBin("Total " + UnlocalizedName);
        }
Exemplo n.º 3
0
        public override void Startup(PersistentOptionBase options)
        {
            base.Startup(options);

            mWorth.Clear();

            mNumServingsOnStartup = Household.kNumServingsOnStartup;

            Household.kNumServingsOnStartup = 0;
        }
Exemplo n.º 4
0
        public override void Startup(PersistentOptionBase options)
        {
            base.Startup(options);

            foreach (SimPersonality personality in PersonalityLookup.Personalities)
            {
                if (personality.Install(Main))
                {
                    mPersonalities.Add(personality);

                    personality.Startup(options);
                }
            }
        }
Exemplo n.º 5
0
        public override void Startup(PersistentOptionBase vOptions)
        {
            try
            {
                mManagers = new List <Manager>();

                Castes = new ManagerCaste(this);

                Lots = new ManagerLot(this);

                Households = new ManagerHousehold(this);

                Sims = new ManagerSim(this);

                Money = new ManagerMoney(this);

                Deaths = new ManagerDeath(this);

                Skills = new ManagerSkill(this);

                Careers = new ManagerCareer(this);

                Pregnancies = new ManagerPregnancy(this);

                Romances = new ManagerRomance(this);

                Flirts = new ManagerFlirt(this);

                Friends = new ManagerFriendship(this);

                Situations = new ManagerSituation(this);

                Personalities = new ManagerPersonality(this);

                Scenarios = new ManagerScenario(this);

                Scoring = new ManagerScoring(this);

                Stories = new ManagerStory(this);

                mManagerLookup = new Dictionary <Type, Manager>();
                mManagerLookup.Add(GetType(), this);

                mManagerByName = new Dictionary <string, Manager>();
                mManagerByName.Add(GetTitlePrefix(PrefixType.Pure), this);

                foreach (Manager manager in mManagers)
                {
                    mManagerLookup.Add(manager.GetType(), manager);
                    mManagerByName.Add(manager.GetTitlePrefix(PrefixType.Pure), manager);
                }

                InstallOptions(sInitialInstall);

                foreach (Manager manager in mManagers)
                {
                    manager.InstallOptions(sInitialInstall);
                }

                if (Common.IsAwayFromHomeworld())
                {
                    // Stop persistence for the moment
                    OptionStore optionStore = sOptions;
                    sOptions = null;

                    List <IAdjustForVacationOption> options = new List <IAdjustForVacationOption>();
                    GetOptions(options, false, null);

                    foreach (IAdjustForVacationOption option in options)
                    {
                        option.AdjustForVacationTown();
                    }

                    sOptions = optionStore;
                }

                Options.Restore();

                Common.kDebugging = GetValue <DebuggingOption, bool>();

                base.Startup(Options);

                RemoveStats();

                foreach (Manager manager in mManagers)
                {
                    try
                    {
                        manager.Startup(Options);
                    }
                    catch (Exception exception)
                    {
                        BooterLogger.AddError(exception.ToString());
                    }
                }

                if (DebuggingEnabled)
                {
                    TestOptionNameUniqueness();
                }

                sInitialInstall = false;

                mFirst = true;
                mTask  = new Common.AlarmTask(1f, TimeUnit.Seconds, OnTimer, 10f, TimeUnit.Minutes);
            }
            catch (Exception exception)
            {
                Common.Exception("Startup", exception);
            }
        }