Support using bottomless lava bucket

This is in response to discussion #1859. Due to the nature of this
already terrible handler, I refuse to add any other types of checks for
whether or not this item is banned and lava. If you want to ban lava,
ban a lava bucket. Don't ban an infinite lava bucket, because finite
lava is still infinite lava in this topsy turvy game where the client
rules the world.
This commit is contained in:
Lucas Nicodemus 2020-05-22 23:33:09 -07:00
parent a457e8c9ee
commit 7452d3c91d
No known key found for this signature in database
GPG key ID: A07BD9023D1664DB
2 changed files with 7 additions and 1 deletions

View file

@ -1307,8 +1307,12 @@ namespace TShockAPI
{
bucket = 5;
}
else if (selectedItemType == ItemID.BottomlessLavaBucket)
{
bucket = 6;
}
if (type == LiquidType.Lava && !(bucket == 2 || bucket == 0 || bucket == 5))
if (type == LiquidType.Lava && !(bucket == 2 || bucket == 0 || bucket == 5 || bucket == 6))
{
TShock.Log.ConsoleDebug("Bouncer / OnLiquidSet rejected bucket check 1 from {0}", args.Player.Name);
args.Player.SendErrorMessage("You do not have permission to perform this action.");