mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-17 16:59:20 +02:00
fix rum and coconut milk fluids drinking
This commit is contained in:
parent
c6c83bccea
commit
2911739928
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user