Skip to content

Commit d5836bc

Browse files
authored
Merge pull request #1390 from myk002/myk_temp_back_out_new_features
temporarily back out new features
2 parents 191cdbe + 9e9d64f commit d5836bc

File tree

8 files changed

+13
-285
lines changed

8 files changed

+13
-285
lines changed

advtools.lua

-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
--@ module=true
22

33
local convo = reqscript('internal/advtools/convo')
4-
local fastcombat = reqscript('internal/advtools/fastcombat')
54
local party = reqscript('internal/advtools/party')
65

76
OVERLAY_WIDGETS = {
87
conversation=convo.AdvRumorsOverlay,
9-
fastcombat=fastcombat.AdvCombatOverlay,
108
}
119

1210
if dfhack_flags.module then

autocheese.lua

-187
This file was deleted.

changelog.txt

-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ Template for new versions:
2727
# Future
2828

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

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

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

4541
## Removed
4642
- `gui/control-panel`: removed ``craft-age-wear`` tweak for Windows users; the tweak doesn't currently load on Windows

docs/advtools.rst

-13
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,3 @@ enemies will gain the ``slay`` and ``kill`` keywords. It will also add
3535
additional conversation options for asking whereabouts of your relationships --
3636
in vanilla, you can only ask whereabouts of historical figures involved in
3737
rumors you personally witnessed or heard about.
38-
39-
``advtools.fastcombat``
40-
~~~~~~~~~~~~~~~~~~~~~~~
41-
42-
When enabled, this overlay will allow you to skip most combat animations,
43-
including the whooshes and projectiles travelling through the screen. It will
44-
also let you skip the announcements window when the "More" button is active,
45-
scrolling you to the very bottom with the first press, and skipping the window
46-
entirely with the second press. This drastically speeds up combat while still
47-
giving you the option not to skip the announcements. Skip keys are left mouse click,
48-
the SELECT button, the movement keys and combat-related keys that don't bring up a
49-
menu (such as bump attack). If clicking to skip past combat, it will only skip the
50-
announcements if you're clicking outside the announcements panel.

docs/autocheese.rst

-39
This file was deleted.

docs/hide-tutorials.rst

+4-10
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,19 @@ hide-tutorials
33

44
.. dfhack-tool::
55
:summary: Hide new fort tutorial popups.
6-
:tags: adventure fort interface
6+
:tags: fort interface
77

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

1313
Specifically, this tool hides:
1414

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

2220
Note that only unsolicited tutorial popups are hidden. If you directly request
2321
a tutorial page from the help, then it will still function normally.
@@ -29,10 +27,6 @@ Usage
2927

3028
enable hide-tutorials
3129
hide-tutorials
32-
hide-tutorials reset
3330

34-
If you haven't enabled the tool, but you run the command while a fort or
35-
adventure is loaded, all future popups for the loaded game will be hidden.
36-
37-
If you run the command with the ``reset`` option, all popups will be re-enabled
38-
as if they had never been seen or dismissed.
31+
If you haven't enabled the tool, but you run the command while a fort is
32+
loaded, all future popups for the loaded fort will be hidden.

hide-tutorials.lua

+9-28
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ function isEnabled()
1212
return enabled
1313
end
1414

15+
local function is_fort_map_loaded()
16+
return df.global.gamemode == df.game_mode.DWARF and dfhack.isMapLoaded()
17+
end
18+
1519
local help = df.global.game.main_interface.help
1620

1721
local function close_help()
@@ -39,36 +43,15 @@ function skip_tutorial_prompt()
3943
end
4044
end
4145

42-
local function get_prefix()
43-
if dfhack.world.isFortressMode() then
44-
return 'POPUP_'
45-
elseif dfhack.world.isAdventureMode() then
46-
return 'ADVENTURE_POPUP_'
47-
end
48-
end
49-
5046
local function hide_all_popups()
51-
local prefix = get_prefix()
52-
if not prefix then return end
5347
for i,name in ipairs(df.help_context_type) do
54-
if not name:startswith(prefix) then goto continue end
48+
if not name:startswith('POPUP_') then goto continue end
5549
utils.insert_sorted(df.global.plotinfo.tutorial_seen, i)
5650
utils.insert_sorted(df.global.plotinfo.tutorial_hide, i)
5751
::continue::
5852
end
5953
end
6054

61-
local function show_all_popups()
62-
local prefix = get_prefix()
63-
if not prefix then return end
64-
for i,name in ipairs(df.help_context_type) do
65-
if not name:startswith(prefix) then goto continue end
66-
utils.erase_sorted(df.global.plotinfo.tutorial_seen, i)
67-
utils.erase_sorted(df.global.plotinfo.tutorial_hide, i)
68-
::continue::
69-
end
70-
end
71-
7255
dfhack.onStateChange[GLOBAL_KEY] = function(sc)
7356
if not enabled then return end
7457

@@ -82,7 +65,7 @@ dfhack.onStateChange[GLOBAL_KEY] = function(sc)
8265
dfhack.timeout(100, 'frames', skip_tutorial_prompt)
8366
dfhack.timeout(1000, 'frames', skip_tutorial_prompt)
8467
end
85-
elseif sc == SC_MAP_LOADED then
68+
elseif sc == SC_MAP_LOADED and df.global.gamemode == df.game_mode.DWARF then
8669
hide_all_popups()
8770
end
8871
end
@@ -98,15 +81,13 @@ end
9881

9982
if args[1] == "enable" then
10083
enabled = true
101-
if dfhack.isMapLoaded() then
84+
if is_fort_map_loaded() then
10285
hide_all_popups()
10386
end
10487
elseif args[1] == "disable" then
10588
enabled = false
106-
elseif args[1] == "reset" then
107-
show_all_popups()
108-
elseif dfhack.isMapLoaded() then
89+
elseif is_fort_map_loaded() then
10990
hide_all_popups()
11091
else
111-
qerror('hide-tutorials needs a loaded fortress or adventure map to work')
92+
qerror('hide-tutorials needs a loaded fortress map to work')
11293
end

0 commit comments

Comments
 (0)