Expose area settings

This commit is contained in:
Jelle
2022-10-18 09:25:39 +02:00
parent 0901930001
commit 66df369404
4 changed files with 87 additions and 110 deletions

View File

@@ -1,4 +1,4 @@
namespace pkNX.WinForms.Subforms
namespace pkNX.WinForms.Subforms
{
partial class AreaEditor8a
{
@@ -31,6 +31,8 @@ private void InitializeComponent()
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AreaEditor8a));
this.CB_Area = new System.Windows.Forms.ComboBox();
this.TC_Editor = new System.Windows.Forms.TabControl();
this.Tab_Settings = new System.Windows.Forms.TabPage();
this.PG_AreaSettings = new System.Windows.Forms.PropertyGrid();
this.Tab_Encounters = new System.Windows.Forms.TabPage();
this.Edit_Encounters = new pkNX.WinForms.Controls.EncounterTableEditor8a();
this.Tab_Regular = new System.Windows.Forms.TabPage();
@@ -44,6 +46,7 @@ private void InitializeComponent()
this.PG_RandSettings = new System.Windows.Forms.PropertyGrid();
this.B_Save = new System.Windows.Forms.Button();
this.TC_Editor.SuspendLayout();
this.Tab_Settings.SuspendLayout();
this.Tab_Encounters.SuspendLayout();
this.Tab_Regular.SuspendLayout();
this.Tab_Wormhole.SuspendLayout();
@@ -56,38 +59,58 @@ private void InitializeComponent()
this.CB_Area.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CB_Area.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_Area.FormattingEnabled = true;
this.CB_Area.Location = new System.Drawing.Point(13, 14);
this.CB_Area.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.CB_Area.Location = new System.Drawing.Point(14, 18);
this.CB_Area.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.CB_Area.Name = "CB_Area";
this.CB_Area.Size = new System.Drawing.Size(316, 28);
this.CB_Area.Size = new System.Drawing.Size(351, 33);
this.CB_Area.TabIndex = 1;
this.CB_Area.SelectedIndexChanged += new System.EventHandler(this.CB_Map_SelectedIndexChanged);
//
// TC_Editor
//
this.TC_Editor.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.TC_Editor.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TC_Editor.Controls.Add(this.Tab_Encounters);
this.TC_Editor.Controls.Add(this.Tab_Regular);
this.TC_Editor.Controls.Add(this.Tab_Wormhole);
this.TC_Editor.Controls.Add(this.Tab_Landmarks);
this.TC_Editor.Controls.Add(this.Tab_Settings);
this.TC_Editor.Controls.Add(this.Tab_Randomize);
this.TC_Editor.Location = new System.Drawing.Point(13, 60);
this.TC_Editor.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.TC_Editor.MinimumSize = new System.Drawing.Size(773, 474);
this.TC_Editor.Location = new System.Drawing.Point(14, 75);
this.TC_Editor.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.TC_Editor.MinimumSize = new System.Drawing.Size(859, 592);
this.TC_Editor.Name = "TC_Editor";
this.TC_Editor.SelectedIndex = 0;
this.TC_Editor.Size = new System.Drawing.Size(1252, 750);
this.TC_Editor.Size = new System.Drawing.Size(1391, 938);
this.TC_Editor.TabIndex = 2;
//
// Tab_Settings
//
this.Tab_Settings.Controls.Add(this.PG_AreaSettings);
this.Tab_Settings.Location = new System.Drawing.Point(4, 34);
this.Tab_Settings.Name = "Tab_Settings";
this.Tab_Settings.Padding = new System.Windows.Forms.Padding(3);
this.Tab_Settings.Size = new System.Drawing.Size(1383, 900);
this.Tab_Settings.TabIndex = 5;
this.Tab_Settings.Text = "Settings";
this.Tab_Settings.UseVisualStyleBackColor = true;
//
// PG_AreaSettings
//
this.PG_AreaSettings.Dock = System.Windows.Forms.DockStyle.Fill;
this.PG_AreaSettings.Location = new System.Drawing.Point(3, 3);
this.PG_AreaSettings.Name = "PG_AreaSettings";
this.PG_AreaSettings.Size = new System.Drawing.Size(1377, 894);
this.PG_AreaSettings.TabIndex = 4;
//
// Tab_Encounters
//
this.Tab_Encounters.Controls.Add(this.Edit_Encounters);
this.Tab_Encounters.Location = new System.Drawing.Point(4, 29);
this.Tab_Encounters.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Tab_Encounters.Location = new System.Drawing.Point(4, 34);
this.Tab_Encounters.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.Tab_Encounters.Name = "Tab_Encounters";
this.Tab_Encounters.Size = new System.Drawing.Size(1244, 717);
this.Tab_Encounters.Size = new System.Drawing.Size(1383, 900);
this.Tab_Encounters.TabIndex = 0;
this.Tab_Encounters.Text = "Encounters";
this.Tab_Encounters.UseVisualStyleBackColor = true;
@@ -96,18 +119,20 @@ private void InitializeComponent()
//
this.Edit_Encounters.Dock = System.Windows.Forms.DockStyle.Fill;
this.Edit_Encounters.Location = new System.Drawing.Point(0, 0);
this.Edit_Encounters.Margin = new System.Windows.Forms.Padding(6, 8, 6, 8);
this.Edit_Encounters.Margin = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.Edit_Encounters.MinimumSize = new System.Drawing.Size(859, 568);
this.Edit_Encounters.Name = "Edit_Encounters";
this.Edit_Encounters.Size = new System.Drawing.Size(1244, 717);
this.Edit_Encounters.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Edit_Encounters.Size = new System.Drawing.Size(1383, 900);
this.Edit_Encounters.TabIndex = 0;
//
// Tab_Regular
//
this.Tab_Regular.Controls.Add(this.Edit_RegularSpawners);
this.Tab_Regular.Location = new System.Drawing.Point(4, 29);
this.Tab_Regular.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Tab_Regular.Location = new System.Drawing.Point(4, 34);
this.Tab_Regular.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.Tab_Regular.Name = "Tab_Regular";
this.Tab_Regular.Size = new System.Drawing.Size(1244, 717);
this.Tab_Regular.Size = new System.Drawing.Size(1383, 900);
this.Tab_Regular.TabIndex = 1;
this.Tab_Regular.Text = "*Regular";
this.Tab_Regular.UseVisualStyleBackColor = true;
@@ -116,18 +141,20 @@ private void InitializeComponent()
//
this.Edit_RegularSpawners.Dock = System.Windows.Forms.DockStyle.Fill;
this.Edit_RegularSpawners.Location = new System.Drawing.Point(0, 0);
this.Edit_RegularSpawners.Margin = new System.Windows.Forms.Padding(6, 8, 6, 8);
this.Edit_RegularSpawners.Margin = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.Edit_RegularSpawners.MinimumSize = new System.Drawing.Size(859, 568);
this.Edit_RegularSpawners.Name = "Edit_RegularSpawners";
this.Edit_RegularSpawners.Size = new System.Drawing.Size(1244, 717);
this.Edit_RegularSpawners.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Edit_RegularSpawners.Size = new System.Drawing.Size(1383, 900);
this.Edit_RegularSpawners.TabIndex = 1;
//
// Tab_Wormhole
//
this.Tab_Wormhole.Controls.Add(this.Edit_WormholeSpawners);
this.Tab_Wormhole.Location = new System.Drawing.Point(4, 29);
this.Tab_Wormhole.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Tab_Wormhole.Location = new System.Drawing.Point(4, 34);
this.Tab_Wormhole.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.Tab_Wormhole.Name = "Tab_Wormhole";
this.Tab_Wormhole.Size = new System.Drawing.Size(1244, 717);
this.Tab_Wormhole.Size = new System.Drawing.Size(1383, 900);
this.Tab_Wormhole.TabIndex = 2;
this.Tab_Wormhole.Text = "*Wormhole";
this.Tab_Wormhole.UseVisualStyleBackColor = true;
@@ -136,18 +163,20 @@ private void InitializeComponent()
//
this.Edit_WormholeSpawners.Dock = System.Windows.Forms.DockStyle.Fill;
this.Edit_WormholeSpawners.Location = new System.Drawing.Point(0, 0);
this.Edit_WormholeSpawners.Margin = new System.Windows.Forms.Padding(6, 8, 6, 8);
this.Edit_WormholeSpawners.Margin = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.Edit_WormholeSpawners.MinimumSize = new System.Drawing.Size(859, 568);
this.Edit_WormholeSpawners.Name = "Edit_WormholeSpawners";
this.Edit_WormholeSpawners.Size = new System.Drawing.Size(1244, 717);
this.Edit_WormholeSpawners.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Edit_WormholeSpawners.Size = new System.Drawing.Size(1383, 900);
this.Edit_WormholeSpawners.TabIndex = 2;
//
// Tab_Landmarks
//
this.Tab_Landmarks.Controls.Add(this.Edit_LandmarkSpawns);
this.Tab_Landmarks.Location = new System.Drawing.Point(4, 29);
this.Tab_Landmarks.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Tab_Landmarks.Location = new System.Drawing.Point(4, 34);
this.Tab_Landmarks.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.Tab_Landmarks.Name = "Tab_Landmarks";
this.Tab_Landmarks.Size = new System.Drawing.Size(1244, 717);
this.Tab_Landmarks.Size = new System.Drawing.Size(1383, 900);
this.Tab_Landmarks.TabIndex = 3;
this.Tab_Landmarks.Text = "*Landmarks";
this.Tab_Landmarks.UseVisualStyleBackColor = true;
@@ -156,20 +185,22 @@ private void InitializeComponent()
//
this.Edit_LandmarkSpawns.Dock = System.Windows.Forms.DockStyle.Fill;
this.Edit_LandmarkSpawns.Location = new System.Drawing.Point(0, 0);
this.Edit_LandmarkSpawns.Margin = new System.Windows.Forms.Padding(6, 8, 6, 8);
this.Edit_LandmarkSpawns.Margin = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.Edit_LandmarkSpawns.MinimumSize = new System.Drawing.Size(859, 568);
this.Edit_LandmarkSpawns.Name = "Edit_LandmarkSpawns";
this.Edit_LandmarkSpawns.Size = new System.Drawing.Size(1244, 717);
this.Edit_LandmarkSpawns.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Edit_LandmarkSpawns.Size = new System.Drawing.Size(1383, 900);
this.Edit_LandmarkSpawns.TabIndex = 0;
//
// Tab_Randomize
//
this.Tab_Randomize.Controls.Add(this.B_Randomize);
this.Tab_Randomize.Controls.Add(this.PG_RandSettings);
this.Tab_Randomize.Location = new System.Drawing.Point(4, 29);
this.Tab_Randomize.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Tab_Randomize.Location = new System.Drawing.Point(4, 34);
this.Tab_Randomize.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.Tab_Randomize.Name = "Tab_Randomize";
this.Tab_Randomize.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Tab_Randomize.Size = new System.Drawing.Size(1244, 717);
this.Tab_Randomize.Padding = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.Tab_Randomize.Size = new System.Drawing.Size(1383, 900);
this.Tab_Randomize.TabIndex = 4;
this.Tab_Randomize.Text = "Randomize";
this.Tab_Randomize.UseVisualStyleBackColor = true;
@@ -177,10 +208,10 @@ private void InitializeComponent()
// B_Randomize
//
this.B_Randomize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.B_Randomize.Location = new System.Drawing.Point(872, 5);
this.B_Randomize.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.B_Randomize.Location = new System.Drawing.Point(969, 6);
this.B_Randomize.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.B_Randomize.Name = "B_Randomize";
this.B_Randomize.Size = new System.Drawing.Size(364, 35);
this.B_Randomize.Size = new System.Drawing.Size(404, 44);
this.B_Randomize.TabIndex = 5;
this.B_Randomize.Text = "Randomize Current Map Encounters";
this.B_Randomize.UseVisualStyleBackColor = true;
@@ -189,19 +220,19 @@ private void InitializeComponent()
// PG_RandSettings
//
this.PG_RandSettings.Dock = System.Windows.Forms.DockStyle.Fill;
this.PG_RandSettings.Location = new System.Drawing.Point(4, 5);
this.PG_RandSettings.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.PG_RandSettings.Location = new System.Drawing.Point(4, 6);
this.PG_RandSettings.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.PG_RandSettings.Name = "PG_RandSettings";
this.PG_RandSettings.Size = new System.Drawing.Size(1236, 707);
this.PG_RandSettings.Size = new System.Drawing.Size(1375, 888);
this.PG_RandSettings.TabIndex = 0;
//
// B_Save
//
this.B_Save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.B_Save.Location = new System.Drawing.Point(1153, 11);
this.B_Save.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.B_Save.Location = new System.Drawing.Point(1281, 14);
this.B_Save.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.B_Save.Name = "B_Save";
this.B_Save.Size = new System.Drawing.Size(112, 35);
this.B_Save.Size = new System.Drawing.Size(124, 44);
this.B_Save.TabIndex = 3;
this.B_Save.Text = "Save All";
this.B_Save.UseVisualStyleBackColor = true;
@@ -209,19 +240,20 @@ private void InitializeComponent()
//
// AreaEditor8a
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1278, 824);
this.ClientSize = new System.Drawing.Size(1420, 1030);
this.Controls.Add(this.B_Save);
this.Controls.Add(this.TC_Editor);
this.Controls.Add(this.CB_Area);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.MinimumSize = new System.Drawing.Size(823, 624);
this.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.MinimumSize = new System.Drawing.Size(912, 766);
this.Name = "AreaEditor8a";
this.Text = "Area Editor";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AreaEditor8a_FormClosing);
this.TC_Editor.ResumeLayout(false);
this.Tab_Settings.ResumeLayout(false);
this.Tab_Encounters.ResumeLayout(false);
this.Tab_Regular.ResumeLayout(false);
this.Tab_Wormhole.ResumeLayout(false);
@@ -246,5 +278,7 @@ private void InitializeComponent()
private System.Windows.Forms.PropertyGrid PG_RandSettings;
private Controls.LandmarkEditor8a Edit_LandmarkSpawns;
private System.Windows.Forms.Button B_Randomize;
private System.Windows.Forms.TabPage Tab_Settings;
private System.Windows.Forms.PropertyGrid PG_AreaSettings;
}
}
}

View File

@@ -139,6 +139,7 @@ int GetRandomForm(int spec)
private void LoadArea()
{
Debug.WriteLine($"Loading Area {AreaIndex}");
PG_AreaSettings.SelectedObject = Area.Settings;
Edit_Encounters.LoadTable(Area.Encounters, Area.Settings.Encounters);
Edit_RegularSpawners.LoadTable(Area.Spawners, Area.Settings.Spawners);
Edit_WormholeSpawners.LoadTable(Area.Wormholes, Area.Settings.WormholeSpawners);

View File

@@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">

View File

@@ -40,7 +40,9 @@ private void InitializeComponent()
//
// Grid
//
this.Grid.Dock = System.Windows.Forms.DockStyle.Bottom;
this.Grid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.Grid.Location = new System.Drawing.Point(0, 15);
this.Grid.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
this.Grid.Name = "Grid";