added permission required to place explosives (tile type 141)
This commit is contained in:
parent
ec116a6b4c
commit
be9c22e09a
2 changed files with 10 additions and 0 deletions
|
|
@ -367,6 +367,13 @@ namespace TShockAPI
|
||||||
args.Player.SendTileSquare(x, y);
|
args.Player.SendTileSquare(x, y);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (tiletype == 141 && !args.Player.Group.HasPermission(Permissions.canexplosive))
|
||||||
|
{
|
||||||
|
args.Player.SendMessage("You do not have permission to place explosives.", Color.Red);
|
||||||
|
TShock.Utils.SendLogs(string.Format("{0} tried to place explosives", args.Player.Name), Color.Red);
|
||||||
|
args.Player.SendTileSquare(x, y);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!args.Player.Group.HasPermission(Permissions.editspawn) && !TShock.Regions.CanBuild(x, y, args.Player) && TShock.Regions.InArea(x, y))
|
if (!args.Player.Group.HasPermission(Permissions.editspawn) && !TShock.Regions.CanBuild(x, y, args.Player) && TShock.Regions.InArea(x, y))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,9 @@ namespace TShockAPI
|
||||||
[Description("User can change the homes of NPCs.")]
|
[Description("User can change the homes of NPCs.")]
|
||||||
public static readonly string moveNPC;
|
public static readonly string moveNPC;
|
||||||
|
|
||||||
|
[Description("Required to be able to place Explosives")]
|
||||||
|
public static readonly string canexplosive;
|
||||||
|
|
||||||
static Permissions()
|
static Permissions()
|
||||||
{
|
{
|
||||||
foreach (var field in typeof(Permissions).GetFields())
|
foreach (var field in typeof(Permissions).GetFields())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue