fix rum and coconut milk fluids drinking

This commit is contained in:
ErikasKontenis
2019-11-24 12:34:29 +02:00
parent c6c83bccea
commit 2911739928
3 changed files with 7 additions and 3 deletions

View File

@@ -21,7 +21,9 @@ local messages = {
[FLUID_MILK] = "Mmmh.",
[FLUID_MANAFLUID] = "Aaaah...",
[FLUID_LIFEFLUID] = "Aaaah...",
[FLUID_LEMONADE] = "Mmmh."
[FLUID_LEMONADE] = "Mmmh.",
[FLUID_RUM] = "Aah...",
[FLUID_COCONUTMILK] = "Mmmh."
}
function onUse(player, item, fromPosition, target, toPosition)
@@ -43,7 +45,7 @@ function onUse(player, item, fromPosition, target, toPosition)
player:sendCancelMessage("It is empty.")
else
local self = target == player
if self and item:getFluidType() == FLUID_BEER or item:getFluidType() == FLUID_WINE then
if self and item:getFluidType() == FLUID_BEER or item:getFluidType() == FLUID_WINE or item:getFluidType() == FLUID_RUM then
player:addCondition(drunk)
elseif self and item:getFluidType() == FLUID_SLIME then
player:addCondition(slime)