Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor, missed references, update to MySql 8.0.17 #6

Merged
merged 1 commit into from
Jul 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 11 additions & 39 deletions CommandBuy.cs
Original file line number Diff line number Diff line change
@@ -1,51 +1,23 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using Rocket.API;
using Rocket.Unturned.Commands;
using Rocket.Unturned.Player;
using Steamworks;

namespace ZaupShop
{
public class CommandBuy : IRocketCommand
{
public AllowedCaller AllowedCaller => AllowedCaller.Player;

public AllowedCaller AllowedCaller
{
get
{
return AllowedCaller.Player;
}
}
public string Name
{
get
{
return "buy";
}
}
public string Help
{
get
{
return "Allows you to buy items from the shop.";
}
}
public string Syntax
{
get
{
return "[v.]<name or id> [amount] [25 | 50 | 75 | 100]";
}
}
public List<string> Aliases
{
get { return new List<string>(); }
}
public List<string> Permissions
{
get { return new List<string>(); }
}
public string Name => "buy";

public string Help => "Allows you to buy items from the shop.";

public string Syntax => "[v.]<name or id> [amount] [25 | 50 | 75 | 100]";

public List<string> Aliases => new List<string>();

public List<string> Permissions => new List<string>();

public void Execute(IRocketPlayer playerid, string[] msg)
{
Expand Down
58 changes: 13 additions & 45 deletions CommandCost.cs
Original file line number Diff line number Diff line change
@@ -1,58 +1,26 @@
using System;
using System.Collections.Generic;

using System.Collections.Generic;
using Rocket.API;
using Rocket.Unturned.Commands;
using Rocket.Unturned.Player;
using SDG.Unturned;
using UnityEngine;
using fr34kyn01535.Uconomy;
using Steamworks;

namespace ZaupShop
{
public class CommandCost : IRocketCommand
{
public AllowedCaller AllowedCaller => AllowedCaller.Player;

public string Name => "cost";

public string Help => "Tells you the cost of a selected item.";

public string Syntax => "[v.]<name or id>";

public List<string> Aliases => new List<string>();

public List<string> Permissions => new List<string>();

public AllowedCaller AllowedCaller
{
get
{
return AllowedCaller.Player;
}
}
public string Name
{
get
{
return "cost";
}
}
public string Help
{
get
{
return "Tells you the cost of a selected item.";
}
}
public string Syntax
{
get
{
return "[v.]<name or id>";
}
}
public List<string> Aliases
{
get { return new List<string>(); }
}
public List<string> Permissions
{
get { return new List<string>(); }
}
public void Execute(IRocketPlayer playerid, string[] msg)
{
ZaupShop.Instance.Cost((UnturnedPlayer)playerid, msg);
ZaupShop.Instance.Cost((UnturnedPlayer) playerid, msg);
}
}
}
52 changes: 12 additions & 40 deletions CommandSell.cs
Original file line number Diff line number Diff line change
@@ -1,52 +1,24 @@
using System;
using System.Collections.Generic;

using System.Collections.Generic;
using Rocket.API;
using Rocket.Unturned.Commands;
using Rocket.Unturned.Player;
using Steamworks;

namespace ZaupShop
{
public class CommandSell : IRocketCommand
{
public AllowedCaller AllowedCaller => AllowedCaller.Player;

public string Name => "sell";

public string Help => "Allows you to sell items to the shop from your inventory.";

public string Syntax => "<name or id> [amount]";

public List<string> Aliases => new List<string>();

public List<string> Permissions => new List<string>();

public AllowedCaller AllowedCaller
{
get
{
return AllowedCaller.Player;
}
}
public string Name
{
get
{
return "sell";
}
}
public string Help
{
get
{
return "Allows you to sell items to the shop from your inventory.";
}
}
public string Syntax
{
get
{
return "<name or id> [amount]";
}
}
public List<string> Aliases
{
get { return new List<string>(); }
}
public List<string> Permissions
{
get { return new List<string>(); }
}
public void Execute(IRocketPlayer playerid, string[] msg)
{
ZaupShop.Instance.Sell(UnturnedPlayer.FromCSteamID(new CSteamID(ulong.Parse(playerid.Id))), msg);
Expand Down
Loading