Skip to content

Commit

Permalink
Separate dragonflying state from vehicle states
Browse files Browse the repository at this point in the history
This fixes paging to a vehicle bar if activating it straight from your
dragon.
  • Loading branch information
Nevcairiel committed Dec 8, 2022
1 parent 6355a73 commit 327c603
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions StateBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function StateBar:UpdateStates(returnOnly)

-- possessing will always be the most important change, if enabled
if self:GetStateOption("possess") then
table_insert(statedriver, "[overridebar][possessbar][shapeshift][bonusbar:5]possess")
table_insert(statedriver, "[overridebar][possessbar][shapeshift]possess;[bonusbar:5]dragon")
end

-- highest priority have our temporary quick-swap keys
Expand Down Expand Up @@ -211,11 +211,11 @@ function StateBar:UpdateStates(returnOnly)
end

if statedriver then
statedriver = statedriver:gsub("%[bonusbar:5%]11", "[overridebar][possessbar][shapeshift][bonusbar:5]possess")
statedriver = statedriver:gsub("%[bonusbar:5%]11", "[overridebar][possessbar][shapeshift]possess;[bonusbar:5]dragon")
end

self:SetAttribute("_onstate-page", [[
if newstate == "possess" or newstate == "11" then
if newstate == "possess" or newstate == "dragon" or newstate == "11" then
if HasVehicleActionBar() then
newstate = GetVehicleBarIndex()
elseif HasOverrideActionBar() then
Expand Down

0 comments on commit 327c603

Please sign in to comment.