require "ISUI/ISWorldObjectContextMenu"

-- For Do Drink Menu with Bath Salt in Tub Fluid Container
local original_doDrinkWaterMenu = ISWorldObjectContextMenu.doDrinkWaterMenu
local function addBathSaltTaintedTooltip()
    local doDrinkWaterMenu = function(object, player, context)
        original_doDrinkWaterMenu(object, player, context)
        if not object:getModData().bathSalt then return end

        local option = context:getOptionFromName(getText("ContextMenu_Drink"))
        if not option then return end

        local tooltip = option.toolTip
        if getSandboxOptions():getOptionByName("EnableTaintedWaterText"):getValue() then
            tooltip.description = tooltip.description .. " <BR> <RGB:1,0.5,0.5> " .. getText("Tooltip_item_TaintedWater")
            option.toolTip = tooltip
        end
    end
    ISWorldObjectContextMenu.doDrinkWaterMenu = doDrinkWaterMenu
end
Events.OnGameStart.Add(addBathSaltTaintedTooltip)