diff --git a/Src/AtlasGridDataLibrary/ServerGrid.cs b/Src/AtlasGridDataLibrary/ServerGrid.cs index a1e9d52..627ea89 100644 --- a/Src/AtlasGridDataLibrary/ServerGrid.cs +++ b/Src/AtlasGridDataLibrary/ServerGrid.cs @@ -118,10 +118,6 @@ namespace AtlasGridDataLibrary [JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate, NullValueHandling = NullValueHandling.Include)] public bool showIslandNames = true; - [DefaultValue(false)] - [JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate, NullValueHandling = NullValueHandling.Include)] - public bool exportPngs = false; - [DefaultValue(true)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] public bool showLines = true; diff --git a/Src/ServerGridEditor/Code/Project.cs b/Src/ServerGridEditor/Code/Project.cs index e58cd68..f36efc0 100644 --- a/Src/ServerGridEditor/Code/Project.cs +++ b/Src/ServerGridEditor/Code/Project.cs @@ -202,7 +202,7 @@ namespace ServerGridEditor string WorldAtlasId, string WorldFriendlyName, string MetaWorldURL, float coordsScaling, bool showServerInfo, bool showLines, bool alphaBackground, bool showBackground, string backgroundImgPath, MainForm mainForm, int idGenerator, int regionsIdGenerator, List spawnerOverrideTemplates, bool bUseUTCTime, string Day0, float globalTransitionMinZ, string AdditionalCmdLineParams, Dictionary OverrideShooterGameModeDefaultGameIni, DateTime lastImageOverride, bool showDiscoZoneInfo, string discoZonesImagePath, List shipPaths, int shipPathsIdGenerator, - bool showShipPathsInfo, string modIDs, bool showIslandNames, bool exportPngs, bool showForeground, string foregroundImgPath, string globalGameplaySetup, + bool showShipPathsInfo, string modIDs, bool showIslandNames, bool showForeground, string foregroundImgPath, string globalGameplaySetup, List serverTemplates, bool bIsFinalExport, string MapImageURL,string AuthListURL, string WorldAtlasPassword, float columnUTCOffset) { @@ -345,7 +345,6 @@ namespace ServerGridEditor Data.shipPaths = shipPaths; Data.shipPathsIdGenerator = shipPathsIdGenerator; Data.showIslandNames = showIslandNames; - Data.exportPngs = exportPngs; Data.globalGameplaySetup = globalGameplaySetup; if (serverTemplates == null) serverTemplates = new List(); @@ -400,7 +399,6 @@ namespace ServerGridEditor public bool showDiscoZoneInfo = true; public bool showShipPathsInfo = true; public bool showIslandNames = true; - public bool exportPngs = false; public bool disableImageExporting = false; public bool showLines = true; public bool alphaBackground = false; @@ -484,7 +482,7 @@ namespace ServerGridEditor AtlasGridData ProjectObj = new AtlasGridData().SetFromData(cellSize, servers, islandInstances, discoZones, spawnRegions, WorldAtlasId, WorldFriendlyName, MetaWorldURL, coordsScaling, showServerInfo, showLines, alphaBackground, showBackground, backgroundImgPath, mainForm, idGenerator, regionsIdGenerator, mainForm.spawners.spawnersInfo, bUseUTCTime, Day0, globalTransitionMinZ, AdditionalCmdLineParams, OverrideShooterGameModeDefaultGameIni, LastImageOverrideUTC, showDiscoZoneInfo, discoZonesImagePath, shipPaths, - shipPathsIdGenerator, showShipPathsInfo, ModIDs, showIslandNames, exportPngs, showForeground, foregroundImgPath, globalGameplaySetup, serverTemplates, bIsFinalExport, MapImageURL, AuthListURL, + shipPathsIdGenerator, showShipPathsInfo, ModIDs, showIslandNames, showForeground, foregroundImgPath, globalGameplaySetup, serverTemplates, bIsFinalExport, MapImageURL, AuthListURL, WorldAtlasPassword, columnUTCOffset); ProjectObj.BaseServerArgs = BaseServerArgs; ProjectObj.totalGridsX = numOfCellsX; @@ -653,7 +651,6 @@ namespace ServerGridEditor showServerInfo = deserializedProject.showServerInfo; showDiscoZoneInfo = deserializedProject.showDiscoZoneInfo; showIslandNames = deserializedProject.showIslandNames; - exportPngs = deserializedProject.exportPngs; showShipPathsInfo = deserializedProject.showShipPathsInfo; showLines = deserializedProject.showLines; alphaBackground = deserializedProject.alphaBackground; diff --git a/Src/ServerGridEditor/Forms/CreateIslandForm.cs b/Src/ServerGridEditor/Forms/CreateIslandForm.cs index c975379..54aeab5 100644 --- a/Src/ServerGridEditor/Forms/CreateIslandForm.cs +++ b/Src/ServerGridEditor/Forms/CreateIslandForm.cs @@ -201,7 +201,7 @@ namespace ServerGridEditor mainForm.islands.Add(editedIsland.name, editedIsland); //rename image - string newImgPath = MainForm.imgsDir + "/" + editedIsland.name + "_img" + (mainForm.currentProject.exportPngs ? ".png" : ".jpg"); + string newImgPath = MainForm.imgsDir + "/" + editedIsland.name + "_img.jpg"; editedIsland.InvalidateImage(); File.Move(editedIsland.imagePath, newImgPath); @@ -280,7 +280,7 @@ namespace ServerGridEditor } //Copy the image to our local imgs directory - string newImgPath = MainForm.imgsDir + "/" + Name + "_img" + (mainForm.currentProject.exportPngs ? ".png" : ".jpg"); + string newImgPath = MainForm.imgsDir + "/" + Name + "_img.jpg"; File.Copy(ImgLocation, newImgPath, true); diff --git a/Src/ServerGridEditor/Forms/MainForm.Designer.cs b/Src/ServerGridEditor/Forms/MainForm.Designer.cs index 79cc603..ca60513 100644 --- a/Src/ServerGridEditor/Forms/MainForm.Designer.cs +++ b/Src/ServerGridEditor/Forms/MainForm.Designer.cs @@ -86,7 +86,6 @@ this.imageQualityTxtbox = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.showIslandNamesChckBox = new System.Windows.Forms.CheckBox(); - this.exportPngsChckBox = new System.Windows.Forms.CheckBox(); this.showForegroundChckBox = new System.Windows.Forms.CheckBox(); this.chooseForegroundBtn = new System.Windows.Forms.Button(); this.foregroundScaleBox = new System.Windows.Forms.NumericUpDown(); @@ -680,20 +679,6 @@ this.showIslandNamesChckBox.UseVisualStyleBackColor = true; this.showIslandNamesChckBox.CheckedChanged += new System.EventHandler(this.showIslandNamesChckBox_CheckedChanged); // - // exportPngsChckBox - // - this.exportPngsChckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.exportPngsChckBox.AutoSize = true; - this.exportPngsChckBox.Checked = true; - this.exportPngsChckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.exportPngsChckBox.Location = new System.Drawing.Point(404, 618); - this.exportPngsChckBox.Name = "exportPngsChckBox"; - this.exportPngsChckBox.Size = new System.Drawing.Size(89, 17); - this.exportPngsChckBox.TabIndex = 31; - this.exportPngsChckBox.Text = "Export PNGS"; - this.exportPngsChckBox.UseVisualStyleBackColor = true; - this.exportPngsChckBox.CheckedChanged += new System.EventHandler(this.exportPngsChckBox_CheckedChanged); - // // showForegroundChckBox // this.showForegroundChckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -777,7 +762,6 @@ this.Controls.Add(this.foregroundScaleBox); this.Controls.Add(this.chooseForegroundBtn); this.Controls.Add(this.showForegroundChckBox); - this.Controls.Add(this.exportPngsChckBox); this.Controls.Add(this.showIslandNamesChckBox); this.Controls.Add(this.imageQualityTxtbox); this.Controls.Add(this.label4); @@ -887,7 +871,6 @@ private System.Windows.Forms.TextBox imageQualityTxtbox; private System.Windows.Forms.Label label4; private System.Windows.Forms.CheckBox showIslandNamesChckBox; - private System.Windows.Forms.CheckBox exportPngsChckBox; private System.Windows.Forms.CheckBox showForegroundChckBox; private System.Windows.Forms.Button chooseForegroundBtn; private System.Windows.Forms.NumericUpDown foregroundScaleBox; diff --git a/Src/ServerGridEditor/Forms/MainForm.cs b/Src/ServerGridEditor/Forms/MainForm.cs index b775652..b8b1272 100644 --- a/Src/ServerGridEditor/Forms/MainForm.cs +++ b/Src/ServerGridEditor/Forms/MainForm.cs @@ -1147,7 +1147,6 @@ namespace ServerGridEditor showServerInfoCheckbox.Checked = currentProject.showServerInfo; showDiscoZoneInfoCheckbox.Checked = currentProject.showDiscoZoneInfo; showIslandNamesChckBox.Checked = currentProject.showIslandNames; - exportPngsChckBox.Checked = currentProject.exportPngs; showShipPathsInfoChckBox.Checked = currentProject.showShipPathsInfo; disableImageExportingCheckBox.Checked = currentProject.disableImageExporting; showLinesCheckbox.Checked = currentProject.showLines; @@ -1531,7 +1530,7 @@ namespace ServerGridEditor return; MagickImage tgaImg = new MagickImage(image); - tgaImg.Format = currentProject.exportPngs ? MagickFormat.Png : MagickFormat.Jpeg; + tgaImg.Format = MagickFormat.Jpeg; tgaImg.Quality = editorConfig.ImageQuality; tgaImg.Write(filePath); tgaImg.Dispose(); @@ -1644,7 +1643,6 @@ namespace ServerGridEditor showServerInfoCheckbox.Checked = currentProject.showServerInfo; showDiscoZoneInfoCheckbox.Checked = currentProject.showDiscoZoneInfo; showIslandNamesChckBox.Checked = currentProject.showIslandNames; - exportPngsChckBox.Checked = currentProject.exportPngs; showShipPathsInfoChckBox.Checked = currentProject.showShipPathsInfo; disableImageExportingCheckBox.Checked = currentProject.disableImageExporting; showLinesCheckbox.Checked = currentProject.showLines; @@ -1666,7 +1664,7 @@ namespace ServerGridEditor if (currentProject == null) return; - saveFileDialog.Filter = currentProject.exportPngs ? "png files (*.png)|*.png" : "jpg files (*.jpg)|*.jpg"; + saveFileDialog.Filter = "jpg files (*.jpg)|*.jpg"; if (saveFileDialog.ShowDialog() == DialogResult.OK) { ExportImage(saveFileDialog.FileName, -1, -1, true, editorConfig.AtlasImagesRes); @@ -2143,7 +2141,7 @@ namespace ServerGridEditor if (!Directory.Exists(mapExportDir)) Directory.CreateDirectory(mapExportDir); - string imgPath = mapExportDir + "/MapImg" + (currentProject.exportPngs ? ".png" : ".jpg"); + string imgPath = mapExportDir + "/MapImg.jpg"; string cellImgName = "CellImg"; string serverConfigPath = exportDir + "/" + actualJsonFile; @@ -2172,8 +2170,8 @@ namespace ServerGridEditor if (!disableImageExportingCheckBox.Checked) { - ExportImage(gameMapExportDir + "/MapImg" + (currentProject.exportPngs ? ".png" : ".jpg"), -1, -1, true, editorConfig.AtlasImagesRes); - ExportCellImages(gameMapExportDir + string.Format("/{0}" + (currentProject.exportPngs ? ".png" : ".jpg"), cellImgName)); + ExportImage(gameMapExportDir + "/MapImg.jpg", -1, -1, true, editorConfig.AtlasImagesRes); + ExportCellImages(gameMapExportDir + string.Format("/{0}.jpg", cellImgName)); } } } @@ -2238,13 +2236,6 @@ namespace ServerGridEditor mapPanel.Invalidate(); } - private void exportPngsChckBox_CheckedChanged(object sender, EventArgs e) - { - if (currentProject != null) - currentProject.exportPngs = exportPngsChckBox.Checked; - mapPanel.Invalidate(); - } - private void showForegroundChckBox_CheckedChanged(object sender, EventArgs e) { currentProject.showForeground = showForegroundChckBox.Checked;