示例#1
0
        public override void ProcessInput(Event ev)
        {
            if (!base.CheckCanInteract())
            {
                return;
            }
            if (Designator_ExportToXmlFromArea.selectedArea != null)
            {
                base.ProcessInput(ev);
            }

            Designator_ExportToXmlFromArea.MakeAllowedAreaListFloatMenu(delegate(Area a)
            {
                Log.Clear();

                KCSG_Utilities.EdgeFromArea(a.ActiveCells.ToList(), out int height, out int width);
                List <IntVec3> cellExport = KCSG_Utilities.AreaToSquare(a, height, width);

                List <string> justCreated = new List <string>();
                Dictionary <IntVec3, List <Thing> > pairsCellThingList = new Dictionary <IntVec3, List <Thing> >();

                KCSG_Utilities.FillCellThingsList(cellExport, base.Map, pairsCellThingList);

                KCSG_Utilities.CreateSymbolIfNeeded(cellExport, base.Map, justCreated, pairsCellThingList, a);

                KCSG_Utilities.CreateStructureDef(cellExport, base.Map, KCSG_Utilities.FillpairsSymbolLabel(), pairsCellThingList, a);

                Log.TryOpenLogWindow();
            }, false, true, base.Map);
        }
示例#2
0
        public override void ProcessInput(Event ev)
        {
            if (!base.CheckCanInteract())
            {
                return;
            }
            if (Designator_ExportToXmlFromArea.selectedArea != null)
            {
                base.ProcessInput(ev);
            }

            Designator_ExportToXmlFromArea.MakeAllowedAreaListFloatMenu(delegate(Area a)
            {
                KCSG_Utilities.EdgeFromArea(a.ActiveCells.ToList(), out int height, out int width);
                List <IntVec3> cellExport = KCSG_Utilities.AreaToSquare(a, height, width);

                Dialog_ExportWindow exportWindow = new Dialog_ExportWindow(base.Map, cellExport);
                Find.WindowStack.Add(exportWindow);
            }, false, true, base.Map);
        }