Update StinkyTracker to use ReactiveValue for accessing ignored and stinkies lists
This commit is contained in:
@@ -38,8 +38,8 @@ shared.StinkyTracker = {
|
||||
stinky.class
|
||||
)
|
||||
)
|
||||
shared.dumpTable(shared.stinkyTracker.ignored)
|
||||
shared.dumpTable(shared.stinkyTracker.stinkies)
|
||||
shared.dumpTable(shared.stinkyTracker.ignored:get())
|
||||
shared.dumpTable(shared.stinkyTracker.stinkies:get())
|
||||
end
|
||||
return false
|
||||
else
|
||||
@@ -50,8 +50,8 @@ shared.StinkyTracker = {
|
||||
shared.stinkyTracker.stinkies[stinky.name] = stinky
|
||||
if Heimdall_Data.config.stinkyTracker.debug then
|
||||
print(string.format("[%s] Stinky is now tracked: %s (%s)", ModuleName, stinky.name, stinky.class))
|
||||
shared.dumpTable(shared.stinkyTracker.stinkies)
|
||||
shared.dumpTable(shared.stinkyTracker.ignored)
|
||||
shared.dumpTable(shared.stinkyTracker.stinkies:get())
|
||||
shared.dumpTable(shared.stinkyTracker.ignored:get())
|
||||
end
|
||||
return true
|
||||
end,
|
||||
@@ -59,12 +59,15 @@ shared.StinkyTracker = {
|
||||
---@param name string
|
||||
---@return nil
|
||||
Ignore = function(name)
|
||||
if Heimdall_Data.config.stinkyTracker.debug then
|
||||
print(string.format("[%s] Request to ignore stinky: %s", ModuleName, name))
|
||||
end
|
||||
shared.stinkyTracker.ignored[name] = GetTime()
|
||||
shared.stinkyTracker.stinkies[name] = nil
|
||||
if Heimdall_Data.config.stinkyTracker.debug then
|
||||
print(string.format("[%s] Stinky is now ignored: %s", ModuleName, name))
|
||||
shared.dumpTable(shared.stinkyTracker.ignored)
|
||||
shared.dumpTable(shared.stinkyTracker.stinkies)
|
||||
shared.dumpTable(shared.stinkyTracker.ignored:get())
|
||||
shared.dumpTable(shared.stinkyTracker.stinkies:get())
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user