Ejemplo n.º 1
0
        public override void PreOpen()
        {
            base.PreOpen();
            stats          = stats_tab_0;
            statSize       = 25;
            buttons        = buttons_tab_0;
            resourceSize   = 40;
            faction        = Find.World.GetComponent <FactionFC>();
            settlementList = faction.settlements;
            faction.updateAverages();

            //Initial release - Autocreate faction
            //Faction faction = FactionColonies.getPlayerColonyFaction();
            //if (faction == null)
            //{
            //	FactionColonies.createPlayerColonyFaction();
            //}

            //if (faction.capitalLocation == -1)
            //{
            //	faction.setCapital();
            //}

            faction.updateTotalProfit();
        }
Ejemplo n.º 2
0
        public override void PreOpen()
        {
            base.PreOpen();
            stats        = statsTab0;
            statSize     = 25;
            buttons      = buttonsTab0;
            resourceSize = 40;
            faction      = Find.World.GetComponent <FactionFC>();
            if (faction != null)
            {
                settlementList = faction.settlements;
                faction.updateAverages();

                //Initial release - Autocreate faction
                //Faction faction = FactionColonies.getPlayerColonyFaction();
                //if (faction == null)
                //{
                //	FactionColonies.createPlayerColonyFaction();
                //}

                //if (faction.capitalLocation == -1)
                //{
                //	faction.setCapital();
                //}

                faction.updateTotalProfit();
            }
            else
            {
                Log.Message("WorldComp FactionFC is null - Something is wrong! Empire Mod");
            }
        }
Ejemplo n.º 3
0
        private void DrawTabFaction(Rect inRect)
        {
            Text.Anchor = TextAnchor.MiddleCenter;
            Text.Font   = GameFont.Small;

            if (Widgets.ButtonTextSubtle(new Rect(0, 0, tabSize, 30), "Faction".Translate(), 0f, 8f, SoundDefOf.Mouseover_Category, new Vector2(-1f, -1f)))
            {
                tab = 0;
                faction.updateTotalProfit();
            }
        }