Add config option to allow cutable and breakable tiles to be cut or broken by users with no permissions etc.
This commit is contained in:
parent
691204f319
commit
55f969f250
2 changed files with 7 additions and 0 deletions
|
|
@ -276,6 +276,8 @@ namespace TShockAPI
|
||||||
|
|
||||||
[Description("Forces your world to be in Halloween mode regardless of the data.")] public bool ForceHalloween = false;
|
[Description("Forces your world to be in Halloween mode regardless of the data.")] public bool ForceHalloween = false;
|
||||||
|
|
||||||
|
[Description("Allows anyone to break grass, pots, etc.")] public bool AllowCutTilesAndBreakables = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a configuration file from a given path
|
/// Reads a configuration file from a given path
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1948,6 +1948,11 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (TShock.Config.AllowCutTilesAndBreakables && (Main.tileCut[Main.tile[tileX, tileY].type] || breakableTiles.Contains(Main.tile[tileX, tileY].type)))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (TShock.CheckIgnores(args.Player))
|
if (TShock.CheckIgnores(args.Player))
|
||||||
{
|
{
|
||||||
args.Player.SendTileSquare(tileX, tileY, 4);
|
args.Player.SendTileSquare(tileX, tileY, 4);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue