Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ Template for new versions:
- `gui/mod-manager`: warn when loading a preset that doesn't include vanilla mods that were added to the game after the preset was saved

## Fixes
- `combine`: dyes are combined again, but only when their ``dye_profile`` matches, so mixed dyes no longer revert to a component dye
- `bodyswap`: fix "invalid argument count" when the target unit has no nemesis record
- `caravan`: fix doubled "total value of items marked for trade" after toggling filter options, and keep item marks when switching between filter views in the ``Bring goods to depot`` overlay
- `combine`: dyes are combined again, but only when their ``dye_profile`` matches, so mixed dyes no longer revert to a component dye
- `fix/loyaltycascade`: guard against citizens that are not historical figures and emit a warning.
- `gui/settings-manager`: preserve built-in work details added after saved settings were created
- `gui/siegemanager`: fix nil index if there are no siege engines on the map
- `item`: the ``reachable``/``unreachable`` filters no longer count installed building parts, and now treat loose contents of unwalkable buildings (like bolts loaded in a bolt thrower) as reachable when a citizen can stand next to the building
- `hide-tutorials`: also suppress the adventure mode start tutorial (defaults its checkbox to off and dismisses the popups)

## Misc Improvements
- `caravan`: the ``Bring goods to depot``, ``Trade``, and ``Assign items for display`` overlays now allow searching for items with non-ASCII characters in their description
Expand Down
3 changes: 3 additions & 0 deletions docs/hide-tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Specifically, this tool hides:
other similar screens in a new fort
- Popups displayed when you perform certain actions for the first time in an
adventure
- The tutorial checkbox when creating an adventurer (it will default to
unchecked, but you can still enable it if you want the tutorial) and the
tutorial popups it would otherwise show at the start of the game

Note that only unsolicited tutorial popups are hidden. If you directly request
a tutorial page from the help, then it will still function normally.
Expand Down
28 changes: 28 additions & 0 deletions hide-tutorials.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,22 @@ function skip_tutorial_prompt()
end
end

local ADVENTURE_TUTORIAL_CONTEXTS = utils.invert{
'ADVENTURE_START_MESSAGE',
'ADVENTURE_START_TUTORIAL_CAMERA_CONTROLS',
'ADVENTURE_START_TUTORIAL_MOVEMENT',
'ADVENTURE_START_TUTORIAL_MENU_OVERVIEW',
'ADVENTURE_DONE_WITH_FIRST_STEPS_MESSAGE',
}

function skip_adventure_tutorial()
if not dfhack.world.isAdventureMode() then return end
df.global.plotinfo.flags.need_to_do_tutorial = false
if help.open and ADVENTURE_TUTORIAL_CONTEXTS[df.help_context_type[help.context]] then
close_help()
end
end

local function get_prefix()
if dfhack.world.isFortressMode() then
return 'POPUP_'
Expand Down Expand Up @@ -81,9 +97,19 @@ dfhack.onStateChange[GLOBAL_KEY] = function(sc)
dfhack.timeout(10, 'frames', skip_tutorial_prompt)
dfhack.timeout(100, 'frames', skip_tutorial_prompt)
dfhack.timeout(1000, 'frames', skip_tutorial_prompt)
elseif df.viewscreen_setupadventurest:is_instance(scr) then
-- default the "tutorial" checkbox to off; the player can still
-- check it if they want the tutorial
scr.want_tutorial = false
elseif df.viewscreen_dungeonmodest:is_instance(scr) then
-- the start tutorial can pop up shortly after the screen appears
skip_adventure_tutorial()
dfhack.timeout(10, 'frames', skip_adventure_tutorial)
dfhack.timeout(100, 'frames', skip_adventure_tutorial)
end
elseif sc == SC_MAP_LOADED then
hide_all_popups()
skip_adventure_tutorial()
end
end

Expand All @@ -100,13 +126,15 @@ if args[1] == "enable" then
enabled = true
if dfhack.isMapLoaded() then
hide_all_popups()
skip_adventure_tutorial()
end
elseif args[1] == "disable" then
enabled = false
elseif args[1] == "reset" then
show_all_popups()
elseif dfhack.isMapLoaded() then
hide_all_popups()
skip_adventure_tutorial()
else
qerror('hide-tutorials needs a loaded fortress or adventure map to work')
end
Loading