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(); }
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"); } }
public void WindowUpdateFC() { faction.updateAverages(); maxScroll = (settlementList.Count() * yspacing) - 264; }