aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-02-08 18:01:13 -0500
committerMichael <[email protected]>2017-02-08 18:01:13 -0500
commit48fd30794f61de671fd556c05226c2cfc7c548ee (patch)
tree2fcd6a6c51a6a642bfb2996611e1ac1182dfbeff
parentbeb2bb27d7cd957a43c26ec73ad96a8241a34008 (diff)
downloadshiftos_thereturn-48fd30794f61de671fd556c05226c2cfc7c548ee.tar.gz
shiftos_thereturn-48fd30794f61de671fd556c05226c2cfc7c548ee.tar.bz2
shiftos_thereturn-48fd30794f61de671fd556c05226c2cfc7c548ee.zip
Shop fixes
-rw-r--r--ShiftOS.Objects/Save.cs15
-rw-r--r--ShiftOS.Server/Program.cs2
-rw-r--r--ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs2
-rw-r--r--ShiftOS.WinForms/Applications/MUDControlCentre.cs15
4 files changed, 21 insertions, 13 deletions
diff --git a/ShiftOS.Objects/Save.cs b/ShiftOS.Objects/Save.cs
index 6231875..ddf41ff 100644
--- a/ShiftOS.Objects/Save.cs
+++ b/ShiftOS.Objects/Save.cs
@@ -77,13 +77,20 @@ namespace ShiftOS.Objects
public override bool TrySetMember(SetMemberBinder binder, object value)
{
- if (_settings.ContainsKey(binder.Name))
+ try
{
- _settings[binder.Name] = value;
+ if (_settings.ContainsKey(binder.Name))
+ {
+ _settings[binder.Name] = value;
+ }
+ else
+ {
+ _settings.Add(binder.Name, value);
+ }
}
- else
+ catch
{
- _settings.Add(binder.Name, value);
+
}
return true;
diff --git a/ShiftOS.Server/Program.cs b/ShiftOS.Server/Program.cs
index 7a4b457..9ac5702 100644
--- a/ShiftOS.Server/Program.cs
+++ b/ShiftOS.Server/Program.cs
@@ -407,8 +407,8 @@ Contents:
Name = "shop_taken",
GUID = "server",
}));
+ return;
}
- return;
}
shopFile.Add(newShop);
diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs
index 220f061..cced521 100644
--- a/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs
+++ b/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs
@@ -643,7 +643,7 @@ namespace ShiftOS.WinForms.Applications
this.btnbuy.Name = "btnbuy";
this.btnbuy.Size = new System.Drawing.Size(75, 23);
this.btnbuy.TabIndex = 0;
- this.btnbuy.Text = "button3";
+ this.btnbuy.Text = "Buy";
this.btnbuy.UseVisualStyleBackColor = true;
this.btnbuy.Click += new System.EventHandler(this.btnbuy_Click);
//
diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs
index 3fa5984..e2758ae 100644
--- a/ShiftOS.WinForms/Applications/MUDControlCentre.cs
+++ b/ShiftOS.WinForms/Applications/MUDControlCentre.cs
@@ -147,7 +147,7 @@ namespace ShiftOS.WinForms.Applications
Infobox.Show("No shop.", "You do not currently own any shops. You must open one to use this screen.");
}));
}
- else if (msg.Name == "shop_allshops")
+ else if (msg.Name == "shop_all")
{
this.Invoke(new Action(() =>
{
@@ -205,10 +205,6 @@ namespace ShiftOS.WinForms.Applications
bnr.Controls.Add(lTitle);
lTitle.Show();
var desc = new Label();
- desc.Left = lTitle.Left;
- desc.Width = (bnr.Width - desc.Left - desc.Left);
- desc.Top = lTitle.Top + lTitle.Height;
- desc.Height = (bnr.Height - lTitle.Top);
desc.Text = shop.Description;
bnr.Controls.Add(desc);
desc.Show();
@@ -236,6 +232,11 @@ namespace ShiftOS.WinForms.Applications
flshoplist.Controls.Add(bnr);
bnr.Show();
ControlManager.SetupControls(bnr);
+ desc.Left = lTitle.Left;
+ desc.Width = (bnr.Width - desc.Left - desc.Left);
+ desc.Top = lTitle.Top + lTitle.Height;
+ desc.Height = (bnr.Height - lTitle.Top);
+
}
}
@@ -243,7 +244,7 @@ namespace ShiftOS.WinForms.Applications
public void ShowShop(Shop shop)
{
shop_view.BringToFront();
-
+ CurrentShop = shop;
lbshopname.Text = shop.Name;
lbupgradetitle.Text = $"Welcome to {shop.Name}.";
lbupgradedesc.Text = shop.Description;
@@ -616,7 +617,7 @@ Current legions: {legionname}";
private void browseToolStripMenuItem_Click(object sender, EventArgs e)
{
- ServerManager.SendMessage("shop_getallshops", "");
+ ServerManager.SendMessage("shop_getall", "");
}
private void btnbuy_Click(object sender, EventArgs e)