Exemple #1
0
        public void bStartGameSeeded(int seed, PopupGameOptions opts)
        {
            audioStore.playActivate();

            Eleven.random = new System.Random(seed);
            startup(opts);
            for (int i = 0; i < map.param.mapGen_burnInSteps; i++)
            {
                map.turnTick();
            }
            map.overmind.namesChosen.AddRange(chosenGods);
            foreach (God chosenGod in chosenGods)
            {
                chosenGod.onStart(map);
            }
            map.overmind.addDefaultAbilities();
            chosenGods = null;//Just in case this f***s with something
            ui.setToWorld();
        }
Exemple #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();
        }
        public void getGameOptionsPopup()
        {
            GameObject       obj      = Instantiate(prefabGameOptions) as GameObject;
            PopupGameOptions specific = obj.GetComponent <PopupGameOptions>();

            specific.ui = ui;
            specific.bDismiss.onClick.AddListener(delegate { specific.dismiss(); });
            specific.seedField.onEndEdit.AddListener(delegate { specific.onEditEnd(); });
            specific.suspicionGain.onEndEdit.AddListener(delegate { specific.onEditEnd(); });
            specific.awarenessGain.onEndEdit.AddListener(delegate { specific.onEditEnd(); });
            specific.powerGain.onEndEdit.AddListener(delegate { specific.onEditEnd(); });
            specific.sizeXField.onEndEdit.AddListener(delegate { specific.onEditEnd(); });
            specific.sizeYField.onEndEdit.AddListener(delegate { specific.onEditEnd(); });
            specific.historicalField.onEndEdit.AddListener(delegate { specific.onEditEnd(); });

            specific.bEasy.onClick.AddListener(delegate { specific.setEasy(); });
            specific.bMedium.onClick.AddListener(delegate { specific.setMedium(); });
            specific.bHard.onClick.AddListener(delegate { specific.setHard(); });

            specific.currentSeed = Eleven.random.Next();
            specific.setTextFieldsToCurrentValues();
            ui.addBlocker(specific.gameObject);
        }
Exemple #4
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);
        }