aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/MUDControlCentre.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-02-08 18:19:09 -0500
committerMichael <[email protected]>2017-02-08 18:19:09 -0500
commitf7c53542052b271e367cf81324034a56d4f7d19e (patch)
treef9c999597984171edb98a63daeb9fe8a1193f021 /ShiftOS.WinForms/Applications/MUDControlCentre.cs
parent48fd30794f61de671fd556c05226c2cfc7c548ee (diff)
downloadshiftos_thereturn-f7c53542052b271e367cf81324034a56d4f7d19e.tar.gz
shiftos_thereturn-f7c53542052b271e367cf81324034a56d4f7d19e.tar.bz2
shiftos_thereturn-f7c53542052b271e367cf81324034a56d4f7d19e.zip
Fix shop editor
Diffstat (limited to 'ShiftOS.WinForms/Applications/MUDControlCentre.cs')
-rw-r--r--ShiftOS.WinForms/Applications/MUDControlCentre.cs24
1 files changed, 23 insertions, 1 deletions
diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs
index e2758ae..5e93e2f 100644
--- a/ShiftOS.WinForms/Applications/MUDControlCentre.cs
+++ b/ShiftOS.WinForms/Applications/MUDControlCentre.cs
@@ -180,7 +180,13 @@ namespace ShiftOS.WinForms.Applications
public void PopulateShopEditor()
{
-
+ txtshopdescription.Text = editingShop.Description;
+ txtshopname.Text = editingShop.Description;
+ lbeditingshopitems.Items.Clear();
+ foreach(var item in editingShop.Items)
+ {
+ lbeditingshopitems.Items.Add(item.Name);
+ }
}
public void PopulateShopList(Shop[] shops)
@@ -265,6 +271,14 @@ namespace ShiftOS.WinForms.Applications
lbprice.Text = $"Cost: {item.Cost} CP";
btnbuy.Show();
};
+ if(shop.Owner == SaveSystem.CurrentSave.Username)
+ {
+ btneditshop.Show();
+ }
+ else
+ {
+ btneditshop.Hide();
+ }
}
private ShopItem item = null;
@@ -740,5 +754,13 @@ Current legions: {legionname}";
{
ServerManager.SendMessage("user_get_shop", SaveSystem.CurrentSave.Username);
}
+
+ private void btneditshop_Click(object sender, EventArgs e)
+ {
+ editingShop = CurrentShop;
+ creatingShop = false;
+ shop_editor.BringToFront();
+ PopulateShopEditor();
+ }
}
}