Skip to content

Commit

Permalink
adjust hide-tutorials to new embark message behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Oct 1, 2023
1 parent 4250c07 commit 7911f75
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions hide-tutorials.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@ local function close_help()
end

function skip_tutorial_prompt(scr)
if help.open and help.context == df.help_context_type.EMBARK_TUTORIAL_CHOICE then
if not help.open then return end
local mouse_y = 23
if help.context == df.help_context_type.EMBARK_TUTORIAL_CHOICE then
help.context = df.help_context_type.EMBARK_MESSAGE
-- dialog behavior changes for the button click, but the button is still
-- in the "tutorial choice" button position
mouse_y = 18
end
if help.context == df.help_context_type.EMBARK_MESSAGE then
df.global.gps.mouse_x = df.global.gps.dimx // 2
df.global.gps.mouse_y = 18
df.global.gps.mouse_y = mouse_y
df.global.enabler.tracking_on = 1
df.global.enabler.mouse_lbut = 1
df.global.enabler.mouse_lbut_down = 1
gui.simulateInput(scr, '_MOUSE_L')
Expand Down

0 comments on commit 7911f75

Please sign in to comment.