public override void PostPassingParameters(ResolveParams rp)
        {
            //BaseGen.symbolStack.Push("agencyDoorsNSEW", rp);

            // If we're wider, then we're horizontal.
            // This is later passed so we can have vertical hallways intersect our center.
            if (rp.rect.Width > rp.rect.Height)
            {
                greaterWidth = true;
            }

            _ = new List <IntVec3>();
            var rectRots = new List <CellRectRot>(FactionUtility.AdjacentHallwayAreas(rp.rect, out var doorLocs));

            foreach (var doorLoc in doorLocs)
            {
                var resolveParamsDoor = rp;
                resolveParamsDoor.rect           = CellRect.SingleCell(doorLoc);
                resolveParamsDoor.singleThingDef = CthulhuFactionsDefOf.ROM_TemporaryDoorMarker;
                BaseGen.symbolStack.Push("thing", resolveParamsDoor);
            }

            foreach (var rectrot in rectRots.InRandomOrder())
            {
                var current = rectrot.Rect;
                /////////////////////////// OFFICES ///////////////////////////

                if (!spawnedOffice)
                {
                    spawnedOffice = true;
                    var resolveParamsOffice = rp;
                    resolveParamsOffice.wallStuff = DefaultWallDef;
                    resolveParamsOffice.floorDef  = DefaultFloorDef;
                    resolveParamsOffice.rect      = current;
                    //ROOF
                    if (!rp.noRoof.HasValue || !rp.noRoof.Value)
                    {
                        BaseGen.symbolStack.Push("roof", resolveParamsOffice);
                    }

                    //BaseGen.symbolStack.Push("agencyDoorsNSEW", resolveParamsOffice);
                    BaseGen.symbolStack.Push("edgeWalls", resolveParamsOffice);
                    if (greaterWidth)
                    {
                        if (rectrot.Rot == Rot4.West || rectrot.Rot == Rot4.East)
                        {
                            BaseGen.symbolStack.Push("agencyOfficeSpaceH", resolveParamsOffice);
                        }
                        else
                        {
                            BaseGen.symbolStack.Push("agencyOfficeSpace", resolveParamsOffice);
                        }
                    }
                    else
                    {
                        if (rectrot.Rot == Rot4.North || rectrot.Rot == Rot4.South)
                        {
                            BaseGen.symbolStack.Push("agencyOfficeSpace", resolveParamsOffice);
                        }
                        else
                        {
                            BaseGen.symbolStack.Push("agencyOfficeSpaceH", resolveParamsOffice);
                        }
                    }

                    BaseGen.symbolStack.Push("floor", resolveParamsOffice);
                    BaseGen.symbolStack.Push("clear", resolveParamsOffice);
                    continue;
                }

                /////////////////////////// RESEARCH ///////////////////////////////

                if (!spawnedResearchStation)
                {
                    spawnedResearchStation = true;
                    var resolveParamsLab = rp;
                    resolveParamsLab.rect      = current;
                    resolveParamsLab.floorDef  = DefaultFloorDef;
                    resolveParamsLab.wallStuff = DefaultWallDef;
                    //ROOF
                    if (!rp.noRoof.HasValue || !rp.noRoof.Value)
                    {
                        BaseGen.symbolStack.Push("roof", resolveParamsLab);
                    }

                    //BaseGen.symbolStack.Push("agencyDoorsNSEW", resolveParamsLab);
                    BaseGen.symbolStack.Push("edgeWalls", resolveParamsLab);
                    BaseGen.symbolStack.Push("fillWithResearchBenches", resolveParamsLab);
                    //BaseGen.symbolStack.Push("barracks", resolveParamsOffice);
                    BaseGen.symbolStack.Push("floor", resolveParamsLab);
                    BaseGen.symbolStack.Push("clear", resolveParamsLab);
                    continue;
                }

                ///////////////////////// INTERROGATIONS /////////////////

                //ROOF
                var resolveParamsTemp = rp;
                resolveParamsTemp.rect      = current;
                resolveParamsTemp.wallStuff = DefaultWallDef;
                resolveParamsTemp.floorDef  = DefaultFloorDef;
                BaseGen.symbolStack.Push("roof", resolveParamsTemp);
                //BaseGen.symbolStack.Push("agencyDoorsNSEW", resolveParamsTemp);
                BaseGen.symbolStack.Push("edgeWalls", resolveParamsTemp);
                if (greaterWidth)
                {
                    if (rectrot.Rot == Rot4.West || rectrot.Rot == Rot4.East)
                    {
                        BaseGen.symbolStack.Push("agencyInterrogationsH", resolveParamsTemp);
                    }
                    else
                    {
                        BaseGen.symbolStack.Push("agencyInterrogations", resolveParamsTemp);
                    }
                }
                else
                {
                    if (rectrot.Rot == Rot4.North || rectrot.Rot == Rot4.South)
                    {
                        BaseGen.symbolStack.Push("agencyInterrogations", resolveParamsTemp);
                    }
                    else
                    {
                        BaseGen.symbolStack.Push("agencyInterrogationsH", resolveParamsTemp);
                    }
                }

                BaseGen.symbolStack.Push("floor", resolveParamsTemp);
                BaseGen.symbolStack.Push("clear", resolveParamsTemp);
            }

            spawnedOffice          = false;
            spawnedResearchStation = false;
            FactionUtility.RectReport(rp.rect);
        }
        public override void PostPassingParameters(ResolveParams rp)
        {
            rp.faction = Find.FactionManager.AllFactions.FirstOrDefault(x => x.def.defName == "TheAgency");

            //BaseGen.symbolStack.Push("agencyDoorsNSEW", rp);

            // If we're wider, then we're horizontal.
            // This is later passed so we can have vertical hallways intersect our center.
            if (rp.rect.Width > rp.rect.Height)
            {
                greaterWidth = true;
            }

            var rectRots = new List <CellRectRot>(FactionUtility.AdjacentHallwayAreas(rp.rect, out var doorLocs));

            foreach (var doorLoc in doorLocs)
            {
                var resolveParamsDoor = rp;
                resolveParamsDoor.rect           = CellRect.SingleCell(doorLoc);
                resolveParamsDoor.singleThingDef = CthulhuFactionsDefOf.ROM_TemporaryDoorMarker;
                BaseGen.symbolStack.Push("thing", resolveParamsDoor);
            }

            foreach (var rectrot in rectRots.InRandomOrder())
            {
                var current = rectrot.Rect;
                /////////////////////////// Containment Cells ///////////////////////////

                if (!spawnedCells)
                {
                    spawnedCells = true;
                    var resolveParamsCells = rp;
                    resolveParamsCells.wallStuff = DefaultWallDef;
                    resolveParamsCells.floorDef  = DefaultFloorDef;
                    resolveParamsCells.rect      = current;
                    //ROOF
                    if (!rp.noRoof.HasValue || !rp.noRoof.Value)
                    {
                        BaseGen.symbolStack.Push("roof", resolveParamsCells);
                    }

                    //BaseGen.symbolStack.Push("agencyDoorsNSEW", resolveParamsCells);
                    BaseGen.symbolStack.Push("edgeWalls", resolveParamsCells);
                    if (greaterWidth)
                    {
                        if (rectrot.Rot == Rot4.West || rectrot.Rot == Rot4.East)
                        {
                            BaseGen.symbolStack.Push("agencyCellsH", resolveParamsCells);
                        }
                        else
                        {
                            BaseGen.symbolStack.Push("agencyCells", resolveParamsCells);
                        }
                    }
                    else
                    {
                        if (rectrot.Rot == Rot4.North || rectrot.Rot == Rot4.South)
                        {
                            BaseGen.symbolStack.Push("agencyCells", resolveParamsCells);
                        }
                        else
                        {
                            BaseGen.symbolStack.Push("agencyCellsH", resolveParamsCells);
                        }
                    }

                    BaseGen.symbolStack.Push("floor", resolveParamsCells);
                    continue;
                }

                /////////////////////////// Storage ///////////////////////////////

                if (!spawnedStorage)
                {
                    spawnedStorage = true;
                    var resolveParamsCells = rp;
                    resolveParamsCells.floorDef  = DefaultFloorDef;
                    resolveParamsCells.wallStuff = DefaultWallDef;
                    resolveParamsCells.rect      = current;
                    //ROOF
                    if (!rp.noRoof.HasValue || !rp.noRoof.Value)
                    {
                        BaseGen.symbolStack.Push("roof", resolveParamsCells);
                    }

                    BaseGen.symbolStack.Push("edgeWalls", resolveParamsCells);
                    if (greaterWidth)
                    {
                        if (rectrot.Rot == Rot4.West || rectrot.Rot == Rot4.East)
                        {
                            BaseGen.symbolStack.Push("agencyStorageH", resolveParamsCells);
                        }
                        else
                        {
                            BaseGen.symbolStack.Push("agencyStorage", resolveParamsCells);
                        }
                    }
                    else
                    {
                        if (rectrot.Rot == Rot4.North || rectrot.Rot == Rot4.South)
                        {
                            BaseGen.symbolStack.Push("agencyStorage", resolveParamsCells);
                        }
                        else
                        {
                            BaseGen.symbolStack.Push("agencyStorageH", resolveParamsCells);
                        }
                    }

                    BaseGen.symbolStack.Push("floor", resolveParamsCells);
                    continue;
                }

                ///////////////////////// MERF OPERATIONS ROOM /////////////////

                //Lord singlePawnLord = rp.singlePawnLord ?? LordMaker.MakeNewLord(rp.faction, new LordJob_DefendBase(rp.faction, current.CenterCell), map, null);
                //ResolveParams resolveParams = rp;
                //resolveParams.rect = current.ContractedBy(2);
                //for (int i = 0; i < Rand.Range(4, 8); i++)
                //{
                //    Cthulhu.Utility.SpawnPawnsOfCountAt(PawnKindDef.Named("MERF"), resolveParams.rect.Cells.RandomElement<IntVec3>(), map, 1, rp.faction);
                //}

                //ROOF
                var resolveParamsMERF = rp;
                resolveParamsMERF.rect      = current;
                resolveParamsMERF.floorDef  = DefaultFloorDef;
                resolveParamsMERF.wallStuff = DefaultWallDef;
                //ROOF
                if (!rp.noRoof.HasValue || !rp.noRoof.Value)
                {
                    BaseGen.symbolStack.Push("roof", resolveParamsMERF);
                }

                //BaseGen.symbolStack.Push("agencyDoorsNSEW", resolveParamsMERF);
                BaseGen.symbolStack.Push("edgeWalls", resolveParamsMERF);
                BaseGen.symbolStack.Push("agencyFillMERF", resolveParamsMERF);
                //BaseGen.symbolStack.Push("barracks", resolveParamsOffice);
                BaseGen.symbolStack.Push("floor", resolveParamsMERF);
                BaseGen.symbolStack.Push("clear", resolveParamsMERF);
            }

            spawnedCells   = false;
            spawnedStorage = false;
            FactionUtility.RectReport(rp.rect);
        }
        public override void PostPassingParameters(ResolveParams rp)
        {
            //BaseGen.symbolStack.Push("agencyDoorsNSEW", rp);

            // If we're wider, then we're horizontal.
            // This is later passed so we can have vertical hallways intersect our center.
            if (rp.rect.Width > rp.rect.Height)
            {
                greaterWidth = true;
            }

            _ = new List <IntVec3>();
            var rectRots = new List <CellRectRot>(FactionUtility.AdjacentHallwayAreas(rp.rect, out var doorLocs));

            foreach (var doorLoc in doorLocs)
            {
                var resolveParamsDoor = rp;
                resolveParamsDoor.rect           = CellRect.SingleCell(doorLoc);
                resolveParamsDoor.singleThingDef = CthulhuFactionsDefOf.ROM_TemporaryDoorMarker;
                BaseGen.symbolStack.Push("thing", resolveParamsDoor);
            }

            foreach (var rectrot in rectRots.InRandomOrder())
            {
                var current = rectrot.Rect;
                /////////////////////////// Sleeping Quarters ///////////////////////////

                //if (!spawnedCells)
                //{
                //    spawnedCells = true;
                var resolveParamsCells = rp;
                resolveParamsCells.wallStuff = DefaultWallDef;
                resolveParamsCells.floorDef  = DefaultFloorDef;
                resolveParamsCells.rect      = current;
                //ROOF
                if (!rp.noRoof.HasValue || !rp.noRoof.Value)
                {
                    BaseGen.symbolStack.Push("roof", resolveParamsCells);
                }

                //BaseGen.symbolStack.Push("agencyDoorsNSEW", resolveParamsCells);
                BaseGen.symbolStack.Push("edgeWalls", resolveParamsCells);
                if (greaterWidth)
                {
                    if (rectrot.Rot == Rot4.West || rectrot.Rot == Rot4.East)
                    {
                        BaseGen.symbolStack.Push("agencyBedroomsH", resolveParamsCells);
                    }
                    else
                    {
                        BaseGen.symbolStack.Push("agencyBedrooms", resolveParamsCells);
                    }
                }
                else
                {
                    if (rectrot.Rot == Rot4.North || rectrot.Rot == Rot4.South)
                    {
                        BaseGen.symbolStack.Push("agencyBedrooms", resolveParamsCells);
                    }
                    else
                    {
                        BaseGen.symbolStack.Push("agencyBedroomsH", resolveParamsCells);
                    }
                }

                BaseGen.symbolStack.Push("floor", resolveParamsCells);
                //    continue;
                //}

                /////////////////////////// Mess Hall ///////////////////////////////

                //if (!spawnedStorage)
                //{
                //    spawnedStorage = true;
                //    ResolveParams resolveParamsCells = rp;
                //    resolveParamsCells.wallStuff = defaultWallDef;
                //    resolveParamsCells.floorDef = defaultFloorDef;
                //    resolveParamsCells.rect = current;
                //    ///ROOF
                //    if (!rp.noRoof.HasValue || !rp.noRoof.Value)
                //        BaseGen.symbolStack.Push("roof", resolveParamsCells);

                //    BaseGen.symbolStack.Push("edgeWalls", resolveParamsCells);
                //    if (greaterWidth)
                //    {
                //        if (rectrot.Rot == Rot4.West || rectrot.Rot == Rot4.East)
                //        {
                //            BaseGen.symbolStack.Push("agencyMessHallH", resolveParamsCells);
                //        }
                //        else BaseGen.symbolStack.Push("agencyMessHall", resolveParamsCells);
                //    }
                //    else
                //    {
                //        if (rectrot.Rot == Rot4.North || rectrot.Rot == Rot4.South)
                //        {
                //            BaseGen.symbolStack.Push("agencyMessHall", resolveParamsCells);
                //        }
                //        else BaseGen.symbolStack.Push("agencyMessHallH", resolveParamsCells);
                //    }
                //    BaseGen.symbolStack.Push("floor", resolveParamsCells);
                //    continue;
                //}

                ///////////////////////// Manufacture /////////////////

                /////ROOF
                //ResolveParams resolveParamsTemp = rp;
                //resolveParamsTemp.rect = current;
                //resolveParamsTemp.wallStuff = defaultWallDef;
                //resolveParamsTemp.floorDef = defaultFloorDef;
                //BaseGen.symbolStack.Push("roof", resolveParamsTemp);
                ////BaseGen.symbolStack.Push("agencyDoorsNSEW", resolveParamsTemp);
                //BaseGen.symbolStack.Push("edgeWalls", resolveParamsTemp);
                //if (greaterWidth)
                //{
                //    if (rectrot.Rot == Rot4.West || rectrot.Rot == Rot4.East)
                //    {
                //        BaseGen.symbolStack.Push("agencyInterrogationsH", resolveParamsTemp);
                //    }
                //    else BaseGen.symbolStack.Push("agencyInterrogations", resolveParamsTemp);
                //}
                //else
                //{
                //    if (rectrot.Rot == Rot4.North || rectrot.Rot == Rot4.South)
                //    {
                //        BaseGen.symbolStack.Push("agencyInterrogations", resolveParamsTemp);
                //    }
                //    else BaseGen.symbolStack.Push("agencyInterrogationsH", resolveParamsTemp);
                //}
                //BaseGen.symbolStack.Push("floor", resolveParamsTemp);
            }

            spawnedCells   = false;
            spawnedStorage = false;
            FactionUtility.RectReport(rp.rect);
        }