Code format

This commit is contained in:
2025-01-09 10:55:32 +01:00
parent 2e44a1ef31
commit be81a31302
15 changed files with 274 additions and 231 deletions

View File

@@ -131,7 +131,10 @@ function shared.Commander.Init()
return text
end
local function CountClassPartitionedStinkies()
if Heimdall_Data.config.commander.debug then print(string.format("[%s] Executing: CountClassPartitionedStinkies", ModuleName)) end
if Heimdall_Data.config.commander.debug then
print(string.format("[%s] Executing: CountClassPartitionedStinkies",
ModuleName))
end
local res = CountClassPartitioned(HeimdallStinkies)
if #res == 0 then
return { "No stinkies found" }
@@ -139,7 +142,10 @@ function shared.Commander.Init()
return res
end
local function WhoPartitionedStinkies()
if Heimdall_Data.config.commander.debug then print(string.format("[%s] Executing: WhoPartitionedStinkies", ModuleName)) end
if Heimdall_Data.config.commander.debug then
print(string.format("[%s] Executing: WhoPartitionedStinkies",
ModuleName))
end
local res = WhoPartitioned(HeimdallStinkies)
if #res == 0 then
return { "No stinkies found" }
@@ -147,7 +153,10 @@ function shared.Commander.Init()
return res
end
local function CountPartitionedStinkies()
if Heimdall_Data.config.commander.debug then print(string.format("[%s] Executing: CountPartitionedStinkies", ModuleName)) end
if Heimdall_Data.config.commander.debug then
print(string.format("[%s] Executing: CountPartitionedStinkies",
ModuleName))
end
local res = CountPartitioned(HeimdallStinkies)
if #res == 0 then
return { "No stinkies found" }
@@ -212,21 +221,21 @@ function shared.Commander.Init()
local commanderChannelFrame = CreateFrame("Frame")
commanderChannelFrame:RegisterEvent("CHAT_MSG_CHANNEL")
commanderChannelFrame:SetScript("OnEvent", function(self, event, msg, sender, ...)
-- if Heimdall_Data.config.commander.debug then
-- print(string.format("[%s] Event received", ModuleName))
-- shared.dumpTable(Heimdall_Data.config.commander)
-- end
if not Heimdall_Data.config.commander.enabled then
-- if Heimdall_Data.config.commander.debug then
-- print(string.format("[%s] Module disabled, ignoring event", ModuleName))
-- end
return
-- if Heimdall_Data.config.commander.debug then
-- print(string.format("[%s] Event received", ModuleName))
-- shared.dumpTable(Heimdall_Data.config.commander)
-- end
if not Heimdall_Data.config.commander.enabled then
-- if Heimdall_Data.config.commander.debug then
-- print(string.format("[%s] Module disabled, ignoring event", ModuleName))
-- end
return
end
local channelId = select(6, ...)
local _, channelname = GetChannelName(channelId)
-- if Heimdall_Data.config.commander.debug then
-- print(string.format("[%s] Channel received: %s", ModuleName, channelname))
-- end
-- if Heimdall_Data.config.commander.debug then
-- print(string.format("[%s] Channel received: %s", ModuleName, channelname))
-- end
if channelname ~= Heimdall_Data.config.commander.masterChannel then return end
sender = string.match(sender, "^[^-]+")
if Heimdall_Data.config.commander.debug then