Skip to content
Merged
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
2 changes: 0 additions & 2 deletions advtools.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
--@ module=true

local convo = reqscript('internal/advtools/convo')
local fastcombat = reqscript('internal/advtools/fastcombat')
local party = reqscript('internal/advtools/party')

OVERLAY_WIDGETS = {
conversation=convo.AdvRumorsOverlay,
fastcombat=fastcombat.AdvCombatOverlay,
}

if dfhack_flags.module then
Expand Down
187 changes: 0 additions & 187 deletions autocheese.lua

This file was deleted.

4 changes: 0 additions & 4 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ Template for new versions:
# Future

## New Tools
- `autocheese`: automatically make cheese using barrels that have accumulated sufficient milk

## New Features
- `advtools`: new overlay ``advtools.fastcombat``; allows you to skip combat animations and the announcement "More" button

## Fixes
- `advtools`: fix dfhack-added conversation options not appearing in the ask whereabouts conversation tree
Expand All @@ -39,8 +37,6 @@ Template for new versions:
## Misc Improvements
- `assign-preferences`: new ``--show`` option to display the preferences of the selected unit
- `pref-adjust`: new ``show`` command to display the preferences of the selected unit
- `hide-tutorials`: if enabled, also hide tutorial popups for adventure mode
- `hide-tutorials`: new ``reset`` command that will re-enable popups in the current game

## Removed
- `gui/control-panel`: removed ``craft-age-wear`` tweak for Windows users; the tweak doesn't currently load on Windows
Expand Down
13 changes: 0 additions & 13 deletions docs/advtools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,3 @@ enemies will gain the ``slay`` and ``kill`` keywords. It will also add
additional conversation options for asking whereabouts of your relationships --
in vanilla, you can only ask whereabouts of historical figures involved in
rumors you personally witnessed or heard about.

``advtools.fastcombat``
~~~~~~~~~~~~~~~~~~~~~~~

When enabled, this overlay will allow you to skip most combat animations,
including the whooshes and projectiles travelling through the screen. It will
also let you skip the announcements window when the "More" button is active,
scrolling you to the very bottom with the first press, and skipping the window
entirely with the second press. This drastically speeds up combat while still
giving you the option not to skip the announcements. Skip keys are left mouse click,
the SELECT button, the movement keys and combat-related keys that don't bring up a
menu (such as bump attack). If clicking to skip past combat, it will only skip the
announcements if you're clicking outside the announcements panel.
39 changes: 0 additions & 39 deletions docs/autocheese.rst

This file was deleted.

14 changes: 4 additions & 10 deletions docs/hide-tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@ hide-tutorials

.. dfhack-tool::
:summary: Hide new fort tutorial popups.
:tags: adventure fort interface
:tags: fort interface

If you've played the game before and don't need to see the tutorial popups that
show up on every new fort, ``hide-tutorials`` can hide them for you. You can
enable this tool as a system service in the "Services" tab of
`gui/control-panel` so it takes effect for all forts and adventures.
`gui/control-panel` so it takes effect for all new or loaded forts.

Specifically, this tool hides:

- The popup displayed when creating a new world
- The "Do you want to start a tutorial embark" popup
- Popups displayed the first time you open the labor, burrows, justice, and
other similar screens in a new fort
- Popups displayed when you perform certain actions for the first time in an
adventure

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 All @@ -29,10 +27,6 @@ Usage

enable hide-tutorials
hide-tutorials
hide-tutorials reset

If you haven't enabled the tool, but you run the command while a fort or
adventure is loaded, all future popups for the loaded game will be hidden.

If you run the command with the ``reset`` option, all popups will be re-enabled
as if they had never been seen or dismissed.
If you haven't enabled the tool, but you run the command while a fort is
loaded, all future popups for the loaded fort will be hidden.
37 changes: 9 additions & 28 deletions hide-tutorials.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ function isEnabled()
return enabled
end

local function is_fort_map_loaded()
return df.global.gamemode == df.game_mode.DWARF and dfhack.isMapLoaded()
end

local help = df.global.game.main_interface.help

local function close_help()
Expand Down Expand Up @@ -39,36 +43,15 @@ function skip_tutorial_prompt()
end
end

local function get_prefix()
if dfhack.world.isFortressMode() then
return 'POPUP_'
elseif dfhack.world.isAdventureMode() then
return 'ADVENTURE_POPUP_'
end
end

local function hide_all_popups()
local prefix = get_prefix()
if not prefix then return end
for i,name in ipairs(df.help_context_type) do
if not name:startswith(prefix) then goto continue end
if not name:startswith('POPUP_') then goto continue end
utils.insert_sorted(df.global.plotinfo.tutorial_seen, i)
utils.insert_sorted(df.global.plotinfo.tutorial_hide, i)
::continue::
end
end

local function show_all_popups()
local prefix = get_prefix()
if not prefix then return end
for i,name in ipairs(df.help_context_type) do
if not name:startswith(prefix) then goto continue end
utils.erase_sorted(df.global.plotinfo.tutorial_seen, i)
utils.erase_sorted(df.global.plotinfo.tutorial_hide, i)
::continue::
end
end

dfhack.onStateChange[GLOBAL_KEY] = function(sc)
if not enabled then return end

Expand All @@ -82,7 +65,7 @@ dfhack.onStateChange[GLOBAL_KEY] = function(sc)
dfhack.timeout(100, 'frames', skip_tutorial_prompt)
dfhack.timeout(1000, 'frames', skip_tutorial_prompt)
end
elseif sc == SC_MAP_LOADED then
elseif sc == SC_MAP_LOADED and df.global.gamemode == df.game_mode.DWARF then
hide_all_popups()
end
end
Expand All @@ -98,15 +81,13 @@ end

if args[1] == "enable" then
enabled = true
if dfhack.isMapLoaded() then
if is_fort_map_loaded() then
hide_all_popups()
end
elseif args[1] == "disable" then
enabled = false
elseif args[1] == "reset" then
show_all_popups()
elseif dfhack.isMapLoaded() then
elseif is_fort_map_loaded() then
hide_all_popups()
else
qerror('hide-tutorials needs a loaded fortress or adventure map to work')
qerror('hide-tutorials needs a loaded fortress map to work')
end
Loading