Add debug logging for stinky changes and simplify stinky handling

This commit is contained in:
2025-05-18 10:31:36 +02:00
parent 52246e2e16
commit f70c5adfcf
2 changed files with 4 additions and 13 deletions

View File

@@ -92,6 +92,7 @@ function shared.Macroer.Init()
shared.stinkyTracker.stinkies:onChange(function(value) shared.stinkyTracker.stinkies:onChange(function(value)
if Heimdall_Data.config.macroer.debug then if Heimdall_Data.config.macroer.debug then
print(string.format("[%s] Stinkies changed, updating macro", ModuleName)) print(string.format("[%s] Stinkies changed, updating macro", ModuleName))
shared.dumpTable(value)
end end
FixMacro(value) FixMacro(value)
end) end)

View File

@@ -171,19 +171,9 @@ function shared.StinkyTracker.Init()
print(string.format("[%s] Found stinkies in SEE message", ModuleName)) print(string.format("[%s] Found stinkies in SEE message", ModuleName))
end end
for name, stinky in pairs(seeStinkies) do for name, stinky in pairs(seeStinkies) do
if stinky.hostile then
shared.stinkyTracker.stinkies[name] = stinky shared.stinkyTracker.stinkies[name] = stinky
if Heimdall_Data.config.stinkyTracker.debug then if Heimdall_Data.config.stinkyTracker.debug then
print( print(string.format("[%s] Added hostile stinky from SEE: %s (%s)", ModuleName, name, stinky.class))
string.format("[%s] Added hostile stinky from SEE: %s (%s)", ModuleName, name, stinky.class)
)
end
end
if not stinky.hostile then
shared.stinkyTracker.stinkies[name] = nil
if Heimdall_Data.config.stinkyTracker.debug then
print(string.format("[%s] Removed non-hostile stinky from SEE: %s", ModuleName, name))
end
end end
end end
end end