Пример #1
0
        public void startup()
        {
            Log("Called startup");
            specificStartup();
            Params param = new Params();

            param.loadFromFile();
            map = new Map(param);
            GraphicalMap.map   = map;
            GraphicalMap.world = this;

            Property_Prototype.loadProperties(map);
            EconTrait.loadTraits(map);
            map.world = this;
            map.gen();

            staticMap = map;
            if (!developer)
            {
                for (int i = 0; i < param.mapGen_burnInSteps; i++)
                {
                    map.turnTick();
                }
            }

            ui.setToWorld();
            displayMessages = true;
            Log("Got to end of initial startup");
            ui.checkData();
        }
Пример #2
0
        public void startup(PopupGameOptions opts)
        {
            Log("Called startup");
            Params param = new Params();

            param.loadFromFile();

            //Apply the choices the user made in the choice screen
            param.overmind_powerRegen         *= opts.powerGainPercent / 100f;
            param.person_suspicionPerEvidence *= opts.susGainPercent / 100f;
            param.awareness_master_speed      *= opts.awarenessGainSpeed / 100f;
            param.mapGen_sizeX       = opts.sizeX;
            param.mapGen_sizeY       = opts.sizeY;
            param.mapGen_burnInSteps = opts.burnIn;
            param.useAwareness       = opts.useAwareness ? 1:0;

            map = new Map(param);
            GraphicalMap.map   = map;
            GraphicalMap.world = this;

            Property_Prototype.loadProperties(map);
            EconTrait.loadTraits(map);
            staticMap = map;
            map.world = this;
            map.globalist.buildBasicElements();
            map.gen();
            map.overmind.startedComplete();


            //ui.setToWorld();
            displayMessages = true;
            Log("Got to end of initial startup");
            ui.checkData();

            ui.setToVoting();
            ui.setToWorld();
            //bQuicksave();
        }
Пример #3
0
        public void startup(PopupGameOptions opts)
        {
            Log("Called startup");

            Params param = new Params();

            //param.loadFromFile();

            //Apply the choices the user made in the choice screen
            param.overmind_powerRegen           *= opts.powerGainPercent / 100f;
            param.person_suspicionPerEvidence   *= opts.susGainPercent / 100f;
            param.awareness_master_speed        *= opts.awarenessGainSpeed / 100f;
            param.unit_investigatorsPerProvince *= opts.investigatorCount / 100f;
            param.mapGen_sizeX       = opts.sizeX;
            param.mapGen_sizeY       = opts.sizeY;
            param.mapGen_burnInSteps = opts.burnIn;
            param.unit_investigatorsSeeEnthralled = opts.investigatorsSee ? 1 : 0;
            param.useLightbringer                 = opts.allowLightbringer ? 1 : 0;
            param.useAwareness                    = opts.useAwareness ? 1 : 0;
            param.usePaladins                     = opts.usePaladins ? 1 : 0;
            param.overmind_maxEnthralled          = opts.nAgents;
            param.overmind_allowDirectEnthralling = opts.politicalStart ? 1:0;
            param.unit_armyHPMult                 = opts.armyHPMult / 100d;
            param.society_bonusSecurityMult       = opts.bonusSecurity / 100d;

            World.log("Opts use awareness " + opts.useAwareness);

            map = new Map(param);
            GraphicalMap.map   = map;
            GraphicalMap.world = this;

            map.seed      = opts.currentSeed;
            map.automatic = automatic;

            if (opts.useSimplified)
            {
                map.simplified = true;
                map.param.overmind_allowDirectEnthralling = 0;
                map.agentsOnly = true;
                if (opts.difficultySetting > 0)
                {
                    map.param.usePaladins = 1;
                }
            }
            else
            {
                map.agentsOnly = false;
            }
            if (param.overmind_allowDirectEnthralling == 0)
            {
                param.flashEnthrallables = false;
            }

            Property_Prototype.loadProperties(map);
            EconTrait.loadTraits(map);
            staticMap = map;
            map.world = this;
            map.globalist.buildBasicElements();
            Eleven.random = new System.Random(opts.currentSeed);
            map.gen();
            if (advancedEdition)
            {
                map.param.option_useAdvancedGraphics = 1;
            }
            PopupIOOptions.load(map);
            if (!advancedEdition)//Force it down, even if the IO options deceive you, if you are not actually the advanced edition
            {
                map.param.option_useAdvancedGraphics = 0;
            }



            //ui.setToWorld();
            displayMessages = !automatic;
            Log("Got to end of initial startup");
            ui.checkData();

            ui.setToVoting();
            ui.setToWorld();
            //bQuicksave();

            musicPlayer.stopTheme();

            if (map.simplified)
            {
                printSimplifiedMessage();
            }
            else if (map.automatic)
            {
                map.overmind.autoAI.popAIModeMessage();
            }
            map.hintSystem.popHint(HintSystem.hintType.INFILTRATION);
        }