Commit 56986269 authored by Maiyannah Bishop's avatar Maiyannah Bishop

Add manual toadstool eat to hotbar, completing #235

parent e6509902
......@@ -649,12 +649,9 @@ function Kauna.Imperian.Hotbar.DrawButtons()
f4override = Config.UI.Hotbar.F4HardOverride or nil
if (f4override==true) then
-- use user-supplied values
Kauna.setF4Button(f4action, f4icon, f4tooltip)
elseif (prof=="berserker") then
-- rage
Kauna.setF4Button("UI.Hotbar.BerserkerRage", "btn-f4-berserker-rage.png", "Kauna.Imperian.Tooltips.DisplayBerserkerRageTooltip")
else
Kauna.setF4Button(f4action, f4icon, f4tooltip)
else
Kauna.setF4Button("Kauna.Imperian.Hotbar.F4", "btn-imp-eattoadstool.png", "Kauna.Imperian.Tooltips.DisplayF4Tooltip")
end
f4action, f4icon, f4tooltip, f4override = nil, nil, nil, nil
......@@ -668,11 +665,11 @@ function Kauna.Imperian.Hotbar.DrawButtons()
-- Assign icon and actions
f5action = Config.UI.HotbarF5Action or false
f5icon = Config.UI.HotbarF5Icon or nil
f5tooltip = Config.UI.HotbarF5Tooltip or nil
f5override = Config.UI.HotbarF5HardOverride or nil
if (f5override==true) then
f5tooltip = Config.UI.HotbarF5Tooltip or nil
f5override = Config.UI.HotbarF5HardOverride or nil
if (f5override==true) then
-- use user-supplied values
Kauna.setF5Button(f5action, f5icon, f5tooltip)
Kauna.setF5Button(f5action, f5icon, f5tooltip)
elseif (prof=="templar") then
Kauna.setF5Button("Berkana.Imperian.ClassStrike", "btn-f5-bashing-templar.png", "Kauna.Tooltips.DisplayBashingStrikeTooltip")
elseif (prof=="berserker") then
......@@ -902,6 +899,20 @@ function Kauna.Imperian.Tooltips.DisplayF3Tooltip()
message = nil
end
-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Tooltips.DisplayF4Tooltip
-- Display the appropriate tooltip for the F4 hotbar slot depending on class.
function Kauna.Imperian.Tooltips.DisplayF4Tooltip()
Kauna.DisplayingTooltip=true
local message_title = "Eat toadstool"
local message_body = "<hr>".."Normally Valkryja will automate eating toadstool to recover, but if it has hung up, or you have disabled that, you can use this button to do so normally."..
"<hr>"..[[<span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'>]].."Takes:</span> Elixir Balance"
message = [[<span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'>]].. message_title .."</span>"..
[[<span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'>]]..message_body.."</span>"
echo("infopanel", message)
message = nil
end
-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Tooltips.DisplayF6Tooltip
-- Display the appropriate tooltip for the F6 hotbar slot depending on class.
......@@ -1116,6 +1127,15 @@ function Kauna.Imperian.Hotbar.F3()
send("sip mana")
end
-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Hotbar.F3
-- Function to perform the appropriate action for the F3 hotbar slot, depending
-- on class.
function Kauna.Imperian.Hotbar.F4()
local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
send("eat toadstool")
end
-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Hotbar.F6
-- Function to perform the appropriate action for the F6 hotbar slot, depending
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment