mirror of
https://github.com/kwsch/NHSE.git
synced 2026-09-30 22:06:37 -05:00
Add more removal options
- remove flowers - remove shells - remove branches Closes #163 rename plazaX/Y to match internal field name
This commit is contained in:
@@ -30,8 +30,8 @@ public BuildingEditor(MainSave sav)
|
||||
Scale1 = new int[Manager.Terrain.MapWidth * Manager.Terrain.MapHeight];
|
||||
ScaleX = new int[Scale1.Length * scale * scale];
|
||||
Map = new Bitmap(Manager.Terrain.MapWidth * scale, Manager.Terrain.MapHeight * scale);
|
||||
NUD_PlazaX.Value = sav.PlazaX;
|
||||
NUD_PlazaY.Value = sav.PlazaY;
|
||||
NUD_PlazaX.Value = sav.EventPlazaLeftUpX;
|
||||
NUD_PlazaY.Value = sav.EventPlazaLeftUpZ;
|
||||
|
||||
foreach (var obj in Manager.Buildings)
|
||||
LB_Items.Items.Add(obj.ToString());
|
||||
@@ -48,8 +48,8 @@ public BuildingEditor(MainSave sav)
|
||||
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
SAV.PlazaX = (uint)NUD_PlazaX.Value;
|
||||
SAV.PlazaY = (uint)NUD_PlazaY.Value;
|
||||
SAV.EventPlazaLeftUpX = (uint)NUD_PlazaX.Value;
|
||||
SAV.EventPlazaLeftUpZ = (uint)NUD_PlazaY.Value;
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
SAV.Buildings = Manager.Buildings;
|
||||
|
||||
@@ -120,6 +120,9 @@ private void InitializeComponent()
|
||||
this.RB_Item = new System.Windows.Forms.RadioButton();
|
||||
this.RB_Terrain = new System.Windows.Forms.RadioButton();
|
||||
this.L_TileMode = new System.Windows.Forms.Label();
|
||||
this.B_RemoveBranches = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.B_RemoveShells = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.B_RemoveFlowers = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.CM_Click.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PB_Map)).BeginInit();
|
||||
this.CM_Picture.SuspendLayout();
|
||||
@@ -425,58 +428,61 @@ private void InitializeComponent()
|
||||
this.B_RemoveObjects,
|
||||
this.B_RemovePlacedItems,
|
||||
this.B_RemoveFences,
|
||||
this.B_RemoveBranches,
|
||||
this.B_RemoveShells,
|
||||
this.B_RemoveFlowers,
|
||||
this.B_FillHoles,
|
||||
this.B_RemoveAll});
|
||||
this.CM_Remove.Name = "CM_Picture";
|
||||
this.CM_Remove.ShowImageMargin = false;
|
||||
this.CM_Remove.Size = new System.Drawing.Size(117, 158);
|
||||
this.CM_Remove.Size = new System.Drawing.Size(156, 246);
|
||||
//
|
||||
// B_RemoveAllWeeds
|
||||
//
|
||||
this.B_RemoveAllWeeds.Name = "B_RemoveAllWeeds";
|
||||
this.B_RemoveAllWeeds.Size = new System.Drawing.Size(116, 22);
|
||||
this.B_RemoveAllWeeds.Size = new System.Drawing.Size(155, 22);
|
||||
this.B_RemoveAllWeeds.Text = "Weeds";
|
||||
this.B_RemoveAllWeeds.Click += new System.EventHandler(this.B_RemoveAllWeeds_Click);
|
||||
//
|
||||
// B_RemovePlants
|
||||
//
|
||||
this.B_RemovePlants.Name = "B_RemovePlants";
|
||||
this.B_RemovePlants.Size = new System.Drawing.Size(116, 22);
|
||||
this.B_RemovePlants.Size = new System.Drawing.Size(155, 22);
|
||||
this.B_RemovePlants.Text = "Plants";
|
||||
this.B_RemovePlants.Click += new System.EventHandler(this.B_RemovePlants_Click);
|
||||
//
|
||||
// B_RemoveObjects
|
||||
//
|
||||
this.B_RemoveObjects.Name = "B_RemoveObjects";
|
||||
this.B_RemoveObjects.Size = new System.Drawing.Size(116, 22);
|
||||
this.B_RemoveObjects.Size = new System.Drawing.Size(155, 22);
|
||||
this.B_RemoveObjects.Text = "Objects";
|
||||
this.B_RemoveObjects.Click += new System.EventHandler(this.B_RemoveObjects_Click);
|
||||
//
|
||||
// B_RemovePlacedItems
|
||||
//
|
||||
this.B_RemovePlacedItems.Name = "B_RemovePlacedItems";
|
||||
this.B_RemovePlacedItems.Size = new System.Drawing.Size(116, 22);
|
||||
this.B_RemovePlacedItems.Size = new System.Drawing.Size(155, 22);
|
||||
this.B_RemovePlacedItems.Text = "Placed Items";
|
||||
this.B_RemovePlacedItems.Click += new System.EventHandler(this.B_RemovePlacedItems_Click);
|
||||
//
|
||||
// B_RemoveFences
|
||||
//
|
||||
this.B_RemoveFences.Name = "B_RemoveFences";
|
||||
this.B_RemoveFences.Size = new System.Drawing.Size(116, 22);
|
||||
this.B_RemoveFences.Size = new System.Drawing.Size(155, 22);
|
||||
this.B_RemoveFences.Text = "Fences";
|
||||
this.B_RemoveFences.Click += new System.EventHandler(this.B_RemoveFences_Click);
|
||||
//
|
||||
// B_FillHoles
|
||||
//
|
||||
this.B_FillHoles.Name = "B_FillHoles";
|
||||
this.B_FillHoles.Size = new System.Drawing.Size(116, 22);
|
||||
this.B_FillHoles.Size = new System.Drawing.Size(155, 22);
|
||||
this.B_FillHoles.Text = "Holes";
|
||||
this.B_FillHoles.Click += new System.EventHandler(this.B_FillHoles_Click);
|
||||
//
|
||||
// B_RemoveAll
|
||||
//
|
||||
this.B_RemoveAll.Name = "B_RemoveAll";
|
||||
this.B_RemoveAll.Size = new System.Drawing.Size(116, 22);
|
||||
this.B_RemoveAll.Size = new System.Drawing.Size(155, 22);
|
||||
this.B_RemoveAll.Text = "All";
|
||||
this.B_RemoveAll.Click += new System.EventHandler(this.B_RemoveAll_Click);
|
||||
//
|
||||
@@ -1080,6 +1086,27 @@ private void InitializeComponent()
|
||||
this.L_TileMode.Text = "Tile Editor Mode";
|
||||
this.L_TileMode.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// B_RemoveBranches
|
||||
//
|
||||
this.B_RemoveBranches.Name = "B_RemoveBranches";
|
||||
this.B_RemoveBranches.Size = new System.Drawing.Size(155, 22);
|
||||
this.B_RemoveBranches.Text = "Branches";
|
||||
this.B_RemoveBranches.Click += new System.EventHandler(this.B_RemoveBranches_Click);
|
||||
//
|
||||
// B_RemoveShells
|
||||
//
|
||||
this.B_RemoveShells.Name = "B_RemoveShells";
|
||||
this.B_RemoveShells.Size = new System.Drawing.Size(155, 22);
|
||||
this.B_RemoveShells.Text = "Shells";
|
||||
this.B_RemoveShells.Click += new System.EventHandler(this.B_RemoveShells_Click);
|
||||
//
|
||||
// B_RemoveFlowers
|
||||
//
|
||||
this.B_RemoveFlowers.Name = "B_RemoveFlowers";
|
||||
this.B_RemoveFlowers.Size = new System.Drawing.Size(155, 22);
|
||||
this.B_RemoveFlowers.Text = "Flowers";
|
||||
this.B_RemoveFlowers.Click += new System.EventHandler(this.B_RemoveFlowers_Click);
|
||||
//
|
||||
// FieldItemEditor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -1238,5 +1265,8 @@ private void InitializeComponent()
|
||||
private System.Windows.Forms.Label L_BuildingTransparency;
|
||||
private System.Windows.Forms.Label L_TerrainTileLabelTransparency;
|
||||
private System.Windows.Forms.TrackBar TR_Terrain;
|
||||
private System.Windows.Forms.ToolStripMenuItem B_RemoveBranches;
|
||||
private System.Windows.Forms.ToolStripMenuItem B_RemoveShells;
|
||||
private System.Windows.Forms.ToolStripMenuItem B_RemoveFlowers;
|
||||
}
|
||||
}
|
||||
@@ -33,8 +33,8 @@ public FieldItemEditor(MainSave sav)
|
||||
foreach (var acre in MapGrid.Acres)
|
||||
CB_Acre.Items.Add(acre.Name);
|
||||
|
||||
NUD_PlazaX.Value = sav.PlazaX;
|
||||
NUD_PlazaY.Value = sav.PlazaY;
|
||||
NUD_PlazaX.Value = sav.EventPlazaLeftUpX;
|
||||
NUD_PlazaY.Value = sav.EventPlazaLeftUpZ;
|
||||
|
||||
foreach (var obj in Map.Buildings)
|
||||
LB_Items.Items.Add(obj.ToString());
|
||||
@@ -265,8 +265,8 @@ private void B_Save_Click(object sender, EventArgs e)
|
||||
Map.Items.Save();
|
||||
SAV.SetTerrainTiles(Map.Terrain.Tiles);
|
||||
SAV.Buildings = Map.Buildings;
|
||||
SAV.PlazaX = Map.PlazaX;
|
||||
SAV.PlazaY = Map.PlazaY;
|
||||
SAV.EventPlazaLeftUpX = Map.PlazaX;
|
||||
SAV.EventPlazaLeftUpZ = Map.PlazaY;
|
||||
Close();
|
||||
}
|
||||
|
||||
@@ -517,6 +517,9 @@ private void Remove(ToolStripItem sender, Func<int, int, int, int, int> removal)
|
||||
private void B_RemoveObjects_Click(object sender, EventArgs e) => Remove(B_RemoveObjects, Map.CurrentLayer.RemoveAllObjects);
|
||||
private void B_RemoveAll_Click(object sender, EventArgs e) => Remove(B_RemoveAll, Map.CurrentLayer.RemoveAll);
|
||||
private void B_RemovePlacedItems_Click(object sender, EventArgs e) => Remove(B_RemovePlacedItems, Map.CurrentLayer.RemoveAllPlacedItems);
|
||||
private void B_RemoveShells_Click(object sender, EventArgs e) => Remove(B_RemoveShells, Map.CurrentLayer.RemoveAllShells);
|
||||
private void B_RemoveBranches_Click(object sender, EventArgs e) => Remove(B_RemoveBranches, Map.CurrentLayer.RemoveAllBranches);
|
||||
private void B_RemoveFlowers_Click(object sender, EventArgs e) => Remove(B_RemoveFlowers, Map.CurrentLayer.RemoveAllFlowers);
|
||||
|
||||
private void PG_Tile_PropertyValueChanged(object s, PropertyValueChangedEventArgs e) => PG_Tile.SelectedObject = PG_Tile.SelectedObject;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user