Skip to content

Commit

Permalink
Various Fixes./
Browse files Browse the repository at this point in the history
  • Loading branch information
DerpleMQ2 committed Jan 6, 2024
1 parent 07a40d3 commit 03dcba9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion extras/version.lua
Original file line number Diff line number Diff line change
@@ -1 +1 @@
return { commitId = '4902a7c 2024-01-06' }
return { commitId = '07a40d3 2024-01-06' }
24 changes: 22 additions & 2 deletions modules/class.lua
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,28 @@ function Module:DoGetState()
-- Reture a reasonable state if queried
local actionMap = "Action Map\n"
actionMap = actionMap .. "-=-=-=-=-=\n"
for k, v in pairs(self.ResolvedActionMap) do
actionMap = actionMap .. string.format("%-20s ==> %s\n", k, (v.name or k))
for k, entry in pairs(self.ResolvedActionMap) do
local mappedAction = entry

if mappedAction then
if type(mappedAction) ~= "string" then
mappedAction = mappedAction.RankName()
end
else
if entry.type:lower() == "cmd" then
mappedAction = entry.cmd
elseif entry.type:lower() == "spell" then
mappedAction = "<Missing Spell>"
elseif entry.type:lower() == "ability" then
mappedAction = entry.name
elseif entry.type:lower() == "aa" then
mappedAction = entry.name
else
mappedAction = entry.name
end
end

actionMap = actionMap .. string.format("%-20s ==> %s\n", k, mappedAction)
end
local spellLoadout = "Spell Loadout\n-=-=-=-=-=-=-\n"

Expand Down
3 changes: 1 addition & 2 deletions utils/rgmercs_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,7 @@ function Utils.ExecEntry(e, targetId, map, bAllowMem)
end

function Utils.GetEntryConditionArg(map, entry)
local condArg = map[entry.name] or mq.TLO.Spell(entry.name)()

local condArg = map[entry.name] or mq.TLO.Spell(entry.name)
if condArg == nil or entry.type:lower() == "aa" then
condArg = entry.name
end
Expand Down

0 comments on commit 03dcba9

Please sign in to comment.