diff options
| author | Michael <[email protected]> | 2017-02-03 21:13:51 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-02-03 21:13:51 -0500 |
| commit | ce300026cb6935b9bb7dfe5a8e47a1d75193047f (patch) | |
| tree | 0e637dfaeaf4617eb47405069ef4f5f96321c9e1 /ShiftOS.WinForms | |
| parent | 318fef283e57221349eb6412db63d63399f4fb86 (diff) | |
| download | shiftos_thereturn-ce300026cb6935b9bb7dfe5a8e47a1d75193047f.tar.gz shiftos_thereturn-ce300026cb6935b9bb7dfe5a8e47a1d75193047f.tar.bz2 shiftos_thereturn-ce300026cb6935b9bb7dfe5a8e47a1d75193047f.zip | |
Add prevention of duplicate legion entries.
Diffstat (limited to 'ShiftOS.WinForms')
| -rw-r--r-- | ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs | 2 | ||||
| -rw-r--r-- | ShiftOS.WinForms/Applications/MUDControlCentre.cs | 17 |
2 files changed, 13 insertions, 6 deletions
diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs index 06c562e..cc97864 100644 --- a/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs +++ b/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs @@ -305,9 +305,9 @@ namespace ShiftOS.WinForms.Applications // // toolStripContainer1.ContentPanel // + this.toolStripContainer1.ContentPanel.Controls.Add(this.lgn_create); this.toolStripContainer1.ContentPanel.Controls.Add(this.job_current); this.toolStripContainer1.ContentPanel.Controls.Add(this.shop_view); - this.toolStripContainer1.ContentPanel.Controls.Add(this.lgn_create); this.toolStripContainer1.ContentPanel.Controls.Add(this.lgn_view); this.toolStripContainer1.ContentPanel.Controls.Add(this.lgn_join); this.toolStripContainer1.ContentPanel.Controls.Add(this.you_memos); diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs index 1756e99..439d5ab 100644 --- a/ShiftOS.WinForms/Applications/MUDControlCentre.cs +++ b/ShiftOS.WinForms/Applications/MUDControlCentre.cs @@ -66,6 +66,17 @@ namespace ShiftOS.WinForms.Applications BannerColor = ConsoleColor.DarkRed }); } + else if(msg.Name == "legion_create_ok") + { + SaveSystem.CurrentSave.CurrentLegions.Clear(); + SaveSystem.CurrentSave.CurrentLegions.Add(editingLegion.ShortName); + SaveSystem.SaveGame(); + myLegionToolStripMenuItem_Click(this, EventArgs.Empty); + } + else if(msg.Name == "legion_alreadyexists") + { + Infobox.Show("Legion already exists", "A legion with the short name you provided already exists. Please choose another."); + } else if(msg.Name == "legion_users_found") { lvusers.Items.Clear(); @@ -421,11 +432,7 @@ Current legions: {legionname}"; private void btncreate_Click(object sender, EventArgs e) { - ServerManager.SendMessage("legion_create", JsonConvert.SerializeObject(editingLegion)); - SaveSystem.CurrentSave.CurrentLegions.Clear(); - SaveSystem.CurrentSave.CurrentLegions.Add(editingLegion.ShortName); - SaveSystem.SaveGame(); - myLegionToolStripMenuItem_Click(sender, e); + ServerManager.SendMessage("legion_createnew", JsonConvert.SerializeObject(editingLegion)); } private void txtnewlegiondescription_TextChanged(object sender, EventArgs e) |
