Esempio n. 1
0
        public static void GenerateFactionsIntoWorldPostFix()
        {
            Log.Message("Generating PlayerFaction Story Tracker");
            PlayerFactionStoryTracker corrTracker = (PlayerFactionStoryTracker)WorldObjectMaker.MakeWorldObject(FactionColorsDefOf.PlayerFactionStoryTracker);

            corrTracker.Tile = TileFinder.RandomStartingTile();
            Find.WorldObjects.Add(corrTracker);
        }
Esempio n. 2
0
        public static void GenerateFactionsIntoWorldPostFix()
        {
            Log.Message("Generating PlayerFaction Story Tracker");
            PlayerFactionStoryTracker corrTracker = (PlayerFactionStoryTracker)WorldObjectMaker.MakeWorldObject(FactionColorsDefOf.PlayerFactionStoryTracker);
            int tile = 0;

            while (!(Find.WorldObjects.AnyWorldObjectAt(tile) || Find.WorldGrid[tile].biome == BiomeDefOf.Ocean))
            {
                tile = Rand.Range(0, Find.WorldGrid.TilesCount);
            }
            corrTracker.Tile = tile;
            Find.WorldObjects.Add(corrTracker);
        }
Esempio n. 3
0
        public override void PostMake()
        {
            base.PostMake();
            PlayerFactionStoryTracker tracker = FactionColorUtilities.currentPlayerStoryTracker;

            if (tracker != null)
            {
                Col1 = tracker.PlayerColorOne;
                Col2 = tracker.PlayerColorTwo;
                CompFactionColor compF = this.GetComp <CompFactionColor>();
                if (compF == null)
                {
                    Log.Error("Uniform Apparel " + this.ToString() + " is missing a CompFactionColors");
                }
                if ((compF != null && compF.CProps.UseCamouflageColor))
                {
                    Col1 = CamouflageColorsUtility.CamouflageColors[0];
                    Col2 = CamouflageColorsUtility.CamouflageColors[1];
                }
            }
        }