Ejemplo n.º 1
0
        public FCPolicy(FCPolicyDef def)
        {
            FactionFC faction = Find.World.GetComponent <FactionFC>();

            this.def    = def;
            timeEnacted = Find.TickManager.TicksGame;


            //Road Builder Trait
            if (def == FCPolicyDefOf.roadBuilders)
            {
                ResearchProjectDef researchdef = DefDatabase <ResearchProjectDef> .GetNamed("FCRoadBuildingDirt", false);

                if (researchdef == null)
                {
                    Log.Message("Empire Error - Road research returned Null");
                }
                if (!(Find.ResearchManager.GetProgress(researchdef) == researchdef.baseCost))
                {
                    Find.ResearchManager.FinishProject(researchdef);
                }
            }

            //Mercantile Trait
            if (def == FCPolicyDefOf.mercantile)
            {
                faction.resetTraitMercantileCaravanTime();
            }
        }