diff --git a/data/actions/scripts/misc/fluids.lua b/data/actions/scripts/misc/fluids.lua index e300dcb..79f5465 100644 --- a/data/actions/scripts/misc/fluids.lua +++ b/data/actions/scripts/misc/fluids.lua @@ -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) diff --git a/src/luascript.cpp b/src/luascript.cpp index 529d559..bfb34fc 100644 --- a/src/luascript.cpp +++ b/src/luascript.cpp @@ -1408,6 +1408,7 @@ void LuaScriptInterface::registerFunctions() registerEnum(FLUID_LIFEFLUID) registerEnum(FLUID_LEMONADE) registerEnum(FLUID_RUM) + registerEnum(FLUID_COCONUTMILK) registerEnum(TALKTYPE_SAY) registerEnum(TALKTYPE_WHISPER) diff --git a/src/tools.cpp b/src/tools.cpp index 8933c31..cfc6174 100644 --- a/src/tools.cpp +++ b/src/tools.cpp @@ -720,7 +720,8 @@ FluidNames fluidNames[] = { {"manafluid", FLUID_MANAFLUID}, {"lifefluid", FLUID_LIFEFLUID}, {"lemonade", FLUID_LEMONADE}, - {"rum", FLUID_RUM} + {"rum", FLUID_RUM}, + {"coconutmilk", FLUID_COCONUTMILK} }; MagicEffectClasses getMagicEffect(const std::string& strValue)