Skip to content

Commit

Permalink
Merge pull request #6 from Pustalorc/legacy
Browse files Browse the repository at this point in the history
Refactor, missed references, update to MySql 8.0.17
  • Loading branch information
fr34kyn01535 authored Jul 22, 2019
2 parents 84cc8a3 + e6123ad commit 8b34fbf
Show file tree
Hide file tree
Showing 13 changed files with 662 additions and 990 deletions.
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

0 comments on commit 8b34fbf

Please sign in to comment.