Skip to content

Commit 1e288db

Browse files
committed
use new overlay isOverlayEnabled API
1 parent 637eb47 commit 1e288db

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

agitation-rebalance.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,8 +729,7 @@ local function print_status()
729729
for k,v in pairs(state.features) do
730730
print((' %15s: %s'):format(k, v))
731731
end
732-
print((' %15s: %s'):format('monitor',
733-
overlay.get_state().config[WIDGET_NAME].enabled or 'false'))
732+
print((' %15s: %s'):format('monitor', overlay.isOverlayEnabled(WIDGET_NAME) or 'false'))
734733
print()
735734
print('difficulty settings:')
736735
print((' Wilderness irritation minimum: %d (about %d tree(s) until initial attacks are possible)'):format(

gui/notes.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,7 @@ function NotesScreen:onRenderFrame(dc, rect)
335335
end
336336

337337
function NotesScreen:onAboutToShow()
338-
local notes_overlay = overlay.get_state().config[OVERLAY_NAME]
339-
if notes_overlay and not notes_overlay.enabled then
338+
if overlay.isOverlayEnabled(OVERLAY_NAME) then
340339
self.should_disable_overlay = true
341340
overlay.overlay_command({'enable', 'notes.map_notes'})
342341
end

0 commit comments

Comments
 (0)