Skip to content

Commit b919971

Browse files
authored
Merge branch 'develop' into gui-slider-min-max
2 parents 37b9890 + f01d405 commit b919971

220 files changed

Lines changed: 16057 additions & 4554 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/test-suite.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
DISPLAY: :0
7878
TERM: xterm-256color
7979
with:
80-
timeout_minutes: 1
80+
timeout_minutes: 3
8181
command: python ci/run-tests.py --keep-status "${{ env.DF_FOLDER }}"
8282
- name: Check RPC interface
8383
run: python ci/check-rpc.py "${{ env.DF_FOLDER }}/dfhack-rpc.txt"

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
args: ['--fix=lf']
2121
- id: trailing-whitespace
2222
- repo: https://github.com/python-jsonschema/check-jsonschema
23-
rev: 0.37.4
23+
rev: 0.38.0
2424
hooks:
2525
- id: check-github-workflows
2626
- repo: https://github.com/Lucas-C/pre-commit-hooks

‎CMakeLists.txt‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ cmake_policy(SET CMP0074 NEW)
77
set(CMAKE_INSTALL_MESSAGE "LAZY")
88

99
# set up versioning.
10-
set(DF_VERSION "53.15")
11-
set(DFHACK_RELEASE "r1")
10+
set(DF_VERSION "53.16")
11+
set(DFHACK_RELEASE "r1.1")
1212
set(DFHACK_PRERELEASE FALSE)
1313

1414
set(DFHACK_VERSION "${DF_VERSION}-${DFHACK_RELEASE}")
@@ -33,7 +33,7 @@ else(CMAKE_CONFIGURATION_TYPES)
3333
set(DFHACK_TYPE_HELP "Choose the type of build, options are: Release and RelWithDebInfo")
3434
# Prevent cmake C module attempts to overwrite our help string
3535
if(NOT CMAKE_BUILD_TYPE)
36-
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "${DFHACK_TYPE_HELP}")
36+
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "${DFHACK_TYPE_HELP}" FORCE)
3737
else(NOT CMAKE_BUILD_TYPE)
3838
set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "${DFHACK_TYPE_HELP}")
3939
endif(NOT CMAKE_BUILD_TYPE)
@@ -50,6 +50,12 @@ macro(CHECK_GCC compiler_path)
5050
if(${GCC_VERSION_OUT} VERSION_LESS "11")
5151
message(SEND_ERROR "${compiler_path} version ${GCC_VERSION_OUT} cannot be used - use GCC 11 or later")
5252
endif()
53+
# GCC 16 currently has a defect that prevents it from compiling DFHack
54+
# -Warray-bounds is broken in GCC 16 and we'd rather disable the compiler than remove this warning
55+
# will reconsider when this defect is fixed in a future GCC release
56+
if(${GCC_VERSION_OUT} VERSION_GREATER_EQUAL "16")
57+
message(SEND_ERROR "${compiler_path} version ${GCC_VERSION_OUT} cannot be used - use GCC 15 or earlier")
58+
endif()
5359
endmacro()
5460

5561
if(UNIX)
@@ -437,7 +443,7 @@ macro(dfhack_test name files)
437443
if(BUILD_LIBRARY AND UNIX AND NOT APPLE) # remove this once our MSVC build env has been updated
438444
add_executable(${name} ${files})
439445
target_include_directories(${name} PUBLIC depends/googletest/googletest/include)
440-
target_link_libraries(${name} dfhack ${FMTLIB} gtest)
446+
target_link_libraries(${name} dfhack lua ${FMTLIB} gtest)
441447
add_test(NAME ${name} COMMAND ${name})
442448
endif()
443449
endmacro()

‎ci/download-df.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fi
1414
df_url="https://www.bay12games.com/dwarves/df_${minor}_${patch}"
1515
if test "$OS_TARGET" = "windows"; then
1616
WGET="C:/msys64/usr/bin/wget.exe"
17-
df_url="${df_url}_win_s.zip"
17+
df_url="${df_url}_win.zip"
1818
df_archive_name="df.zip"
1919
df_extract_cmd="unzip -d ${DF_FOLDER}"
2020
elif test "$OS_TARGET" = "ubuntu"; then

‎ci/test.lua‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,10 @@ local function main(args)
727727
qerror(('Invalid test folder: "%s"'):format(config.test_dir))
728728
end
729729

730+
if config.done_command then
731+
print(('Will run "%s" after tests complete'):format(config.done_command))
732+
end
733+
730734
local counts = {
731735
tests = 0,
732736
tests_ok = 0,

‎data/init/onMapLoad.default.init‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
# Please do not edit this file directly. It will be overwritten with new
55
# defaults when you update DFHack. Instead, add your configuration to
66
# dfhack-config/init/onMapLoad.init
7+
8+
lua require('quickfix').repair_site_id()

‎docs/Tags.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ for the tag assignment spreadsheet.
4343
- `map <map-tag-index>`: Tools that interact with the game map.
4444
- `military <military-tag-index>`: Tools that interact with the military.
4545
- `plants <plants-tag-index>`: Tools that interact with grass, trees, shrubs, and crops.
46-
- `stockpiles <stockpiles-tag-index>`: Tools that interact with stockpiles.
46+
- `stockpile <stockpile-tag-index>`: Tools that interact with stockpiles.
4747
- `units <units-tag-index>`: Tools that interact with units.
4848
- `workorders <workorders-tag-index>`: Tools that interact with workorders.
4949

‎docs/about/Authors.rst‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Clayton Hughes
4949
Clément Vuchener cvuchener
5050
Corey CoreyJ87
5151
daedsidog daedsidog
52+
Dailton Filho notliad
5253
Dan Amlund danamlund
5354
Daniel Brooks db48x
5455
David Nilsolm
@@ -121,6 +122,7 @@ Kurik Amudnil
121122
Kévin Boissonneault KABoissonneault
122123
Lethosor lethosor
123124
LordGolias LordGolias
125+
Magnus Anderson magnus-ISU
124126
Mark Nielson pseudodragon
125127
Mason11987 Mason11987
126128
Matt Regul mattregul
@@ -261,6 +263,7 @@ Vitaly Pronkin pronvit mifki
261263
ViTuRaS ViTuRaS
262264
Vjek vjek
263265
Vladimir Florov foxxelias
266+
wala343 wala343
264267
Warmist warmist
265268
Wes Malone wesQ3
266269
Will H TSM-EVO

‎docs/about/Removed.rst‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ autohauler
2828
==========
2929
An automated labor management tool that only addressed hauling labors, leaving the assignment
3030
of skilled labors entirely up to the player. Fundamentally incompatible with the work detail
31-
system of labor management in v50 of Dwarf Fortress.
31+
system of labor management in v50 of Dwarf Fortress. A dedicated laborer pool for unskilled
32+
jobs (including hauling) is now provided by the `labormanager` command of `autolabor`.
3233

3334
.. _automaterial:
3435

@@ -261,7 +262,7 @@ Replaced by `gui/create-item`.
261262
.. _gui/logcleaner:
262263

263264
gui/logcleaner
264-
===============
265+
==============
265266
Removed because changes to Dwarf Fortress internals made the functionality
266267
impossible to implement safely.
267268

‎docs/changelog.txt‎

Lines changed: 146 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,169 @@ Template for new versions:
5555
# Future
5656

5757
## New Tools
58+
- `stockflow`: (reinstated) queue manager jobs based on free space in stockpiles
59+
- `smooth-movement`: smoothly animate creature, item, and vehicle movement in the fortress viewport
60+
- `export-world-map`: Export world map data for GIS and other external tools.
5861

5962
## New Features
63+
- `autodump`: new ``undestroy`` option reverts pending item destruction while the game is still paused
64+
- `buildingplan`: new "Do now" option marks the jobs of subsequently placed buildings as high priority
65+
- `getplants`: new ``--dry-run`` option counts affected plants without designating, and new ``--brewable``/``--edible``/``--oil``/``--cloth``/``--dye`` trait filters restrict the selection by plant use
66+
- `labormanager`: the `autolabor` plugin now provides a second command that manages labors through the work detail system instead of writing the labor matrix; use ``<cmd> mode legacy|modern`` or the work details overlay to switch
67+
- `labormanager`: track job posting age and show a "task starvation" notification in the DFHack warning panel when any posting sits unclaimed for over a day
68+
- `sort`: the stress/happiness icons in the top bar are now clickable, opening a list of the citizens in that stress category; selecting a citizen centers the map on them
69+
- `stocks`: the overlay's ``collapse all`` hotkey now toggles, expanding all categories again when everything is collapsed
70+
- `stockpiles`: the overlay now also attaches to the minecart hauling stop conditions panel, offering import/export of route stop conditions
71+
- `suspendmanager`: suspend deconstruction jobs that would collapse connected machinery, such as waterwheels supporting other components
72+
- ``quickfix``: repair ``plotinfo.site_id`` on load when DF leaves it unassigned on reclaimed fortresses
73+
74+
## Fixes
75+
- Plugin commands that throw uncaught C++ exceptions now report an error instead of crashing the game
76+
- Fixed broken weather lookup in ``World::ReadCurrentWeather``
77+
- Fixed ``dfhack.items.createItem`` making glob items of an incorrect size
78+
- Fixed a possible hang or assertion failure when pressing a hotkey while a DFHack GUI window was open but unfocused
79+
- Fixed persistent site data API (``dfhack.persistent.saveSiteData``/``getSiteData``) failing on newly reclaimed fortresses until the first save
80+
- Fixed out-of-bounds color table access in ``Screen`` module when Lua pens use ``COLOR_RESET``
81+
- ``Units::teleport``: update unit occupancy on the full 3x3 footprint of EQUIPMENT units (e.g. wagons) instead of only their center tile
82+
- ``Units::teleport``: only clear tile unit occupancy flags when no other unit of the same kind remains on the tile
83+
- `3dveins`: fix crash when a tile's biome cannot be resolved
84+
- `3dveins`: fix failure on embarks that cross midmap tiles
85+
- `aquifer`: make ``--skip-top`` and top-relative ``--levels`` take effect for the ``drain``, ``convert``, and ``add`` actions instead of being silently ignored
86+
- `aquifer`: make ``--help``/``-h`` actually print help instead of running a map-wide ``list``
87+
- `autochop`: fix crash when a burrow-based command names a burrow that doesn't exist
88+
- `autodump`: ``destroy`` no longer leaves the contents of destroyed containers in limbo or crashes when destroying unit-held items
89+
- `buildingplan`: fix roller material estimate asking for one chain per tile instead of one chain total
90+
- `buildingplan`: fix "Unlink all" only unlinking some mechanisms (or crashing) when freeing mechanisms from the building
91+
- `burrow`: fix ``tiles clear`` and other tile operations silently failing because burrow block z-coordinates were stored incorrectly in the ``Burrows`` module
92+
- `export-world-map`: fix crash exporting site data for a site whose owner has an undefined race
93+
- `gui/quickfort`: show smoothing designations immediately after applying a blueprint
94+
- `overlay`: overlay hotkeys no longer steal typed characters while the game is capturing text input, e.g. when renaming a building
95+
- `sort`: fix the Places/Workshops and task searches missing workshops by their current display names (e.g. "Stoneworker's Workshop", "Screw Press")
96+
- `stocks`: overlay now resets scroll position when collapsing categories so the item list is no longer left blank and unscrollable
97+
- `strangemood`: updated to match behavior of current DF version
98+
- `tiletypes`: remove plants (including trees) rooted on a tile that is painted into something that cannot host them, so cleared ground no longer regrows floating trees
99+
- `timestream`: deal properly with units who have breathing difficulties
100+
- `timestream`: pass the validated numeric value to the fps setter so ``set fps`` with unusual numeric strings (e.g. ``60.9``) can't be silently misapplied
101+
- `stocks`: overlay now resets scroll position when collapsing categories so the item list is no longer left blank and unscrollable
102+
- `strangemood`: fix crash when ``--id`` is given a non-numeric unit id
103+
- `suspendmanager`: fix out-of-bounds parameter read when ``set`` is given too few arguments
104+
105+
## Misc Improvements
106+
- Added ``Coord2d`` and ``Coord3d`` C++ templates, providing a standard set operations for 2-tuples and 3-tuples of any numeric type
107+
- Renamed the ``stockpiles`` tool tag to ``stockpile`` so it no longer collides with the `stockpiles` plugin in `gui/launcher`
60108

61-
## Fixes
109+
## Documentation
110+
- Document ``autodump-destroy-here``. Remove mention of ``autodump destroy`` able to revert destruction.
111+
112+
## API
113+
- Added ``Maps::getSiteTypeName`` to print the sites classification as a string (e.g. "mountain halls")
114+
- Added ``Maps::addRegionBiomeOffset`` to shift world region coordinate by region_details biome reference
115+
- Added ``Maps::describeSurroundings`` to get surroundings classification from savagery and evilness
116+
- Added ``Maps::getCurrentWeather`` to determine the current weather on the map.
117+
- Added ``Maps::forEachTile`` with ``Maps::TileFilter``/``Maps::TileActions`` to scan a cuboid of tiles, matching tiles by tiletype, tiletype attributes, and designation/occupancy bits, and counting, rewriting tiletypes, editing designation/occupancy bits, spawning constructions, or invoking a callback on matching tiles
118+
- Added ``MiscUtils::print_range`` to print ranges with prefix, separator, and suffix
119+
- Added ``Units::breathes`` and ``Units::getBreathingState``
120+
- Deprecated ``World::ReadCurrentWeather`` in favor of ``Maps::getCurrentWeather``
121+
122+
## Lua
123+
- Added ``dfhack.maps.forEachTile`` to scan a cuboid of tiles with a declarative filter and apply actions (count, set tiletype or per-tiletype replacements, set designation/occupancy fields, spawn constructions, Lua callback) in a single native call
62124
- ``widgets.Slider`` and ``widgets.RangeSlider``: fix sliders allowing values outside their number of stops (``num_stops``) when clicked or dragged with the mouse
125+
126+
## Removed
127+
128+
# 53.16-r1.1
129+
130+
## New Tools
131+
132+
## New Features
133+
134+
## Fixes
135+
- `stockpiles` will no longer incorrectly size the "rough gem" and "cut gem" vectors, which avoids a crash when viewing stockpile settings. This potentially affects anything that uses blueprints to create a stockpile, including `gui/quantum`
136+
137+
## Misc Improvements
138+
139+
## Documentation
140+
141+
## API
142+
143+
## Lua
144+
145+
## Removed
146+
147+
# 53.16-r1
148+
149+
## New Tools
150+
151+
## New Features
152+
153+
## Fixes
154+
- ``TextArea`` widget corrected to use ``COLOR_BLACK`` instead of ``COLOR_RESET`` as default background color
155+
156+
## Misc Improvements
157+
- a safety check was added to ``Screen::doSetTile_char`` for out of bound pen color values
158+
159+
## Documentation
160+
161+
## API
162+
163+
## Lua
164+
165+
## Removed
166+
167+
# 53.15-r3
168+
169+
## New Tools
170+
171+
## New Features
172+
173+
## Fixes
174+
- `buildingplan`: restore planner UI elements: hollow constructions, only engraved slabs, only empty cages, weapon count
175+
176+
## Misc Improvements
177+
- `EventManager`: add safety check to potentially avoid a DFHack crash when DF's ``reports`` table is out of order
178+
179+
## Documentation
180+
181+
## API
182+
- ``DFSDL``: added ``obtain_library_handle`` and ``obtain_image_library_handle`` so that a plugin can obtain DFHack's already-open handle to these libs instead of having to do it itself.
183+
- ``Screen``: new functions ``paintMapPortTile`` and ``readMapPortTile`` to write and read world and region map tiles.
184+
- ``Materials``: ``MaterialInfo`` constants ``NUM_BUILTIN``, ``GROUP_SIZE``, ``CREATURE_BASE``, ``FIGURE_BASE``, ``PLANT_BASE``, and ``END_BASE`` removed. New plugins should use appropriate members of the ``df::builtin_mats`` enum.
185+
186+
## Lua
187+
- Added ``Screen::paintMapPortTile`` as ``dfhack.screen.paintMapPortTile``
188+
- Added ``Screen::readMapPortTile`` as ``dfhack.screen.readMapPortTile``
189+
- Deprecated ``gui.materials.CREATURE_BASE`` and ``gui.materials.PLANT_BASE`` - scripts should instead use ``df.builtin_mats.CREATURE_1`` and ``df.builtin_mats.PLANT_1``, respectively.
190+
191+
## Removed
192+
193+
# 53.15-r2
194+
195+
## New Tools
196+
197+
## New Features
198+
- `stocks`: add button/hotkey for expanding all categories on stocks interface
199+
- `buildingplan`: add a ``Pull`` button next to linked levers on a building's "Show linked buildings" tab so you can queue a high-priority pull-lever job (or cancel a queued one) without navigating to the lever
200+
201+
## Fixes
202+
- `autoclothing`: correct defect in validating material specification on command line
63203
- `autolabor`: Fix running 1 tick less frequently than intended.
64204
- `buildingplan`: fixed non-clickable pressure plates's triggers (issue #5736)
65205
- `getplants`: added protective code to avoid misoperation when a plant has an invalid material (which should never happen, but...)
66206

67207
## Misc Improvements
68208
- `buildingplan`: added a slider on the weapontrap overlay
69209
- `buildingplan`: added a small tooltip text about renaming favorites in the UI
210+
- `buildingplan`: buildingplan can now generate work orders
211+
- `orders`: exported orders now include a human-readable ``name`` field
70212

71213
## Documentation
72214

73215
## API
216+
- Core: added ``getConfigPath()`` API for obtaining the path to user-specific configuration files
217+
- ``widgets.RadioButton``: New button widget resembling those used in ``gui/control-panel``
74218

75219
## Lua
220+
- Added ``dfhack.getConfigPath()`` API, proxying ``Core::getConfigPath``
76221

77222
## Removed
78223

@@ -91,10 +236,8 @@ Template for new versions:
91236
## Documentation
92237

93238
## API
94-
- Core: added ``getConfigPath()`` API for obtaining the path to user-specific configuration files
95239

96240
## Lua
97-
- Added ``dfhack.getConfigPath()`` API, proxying ``Core::getConfigPath``
98241

99242
## Removed
100243

@@ -108,7 +251,6 @@ Template for new versions:
108251

109252
## Misc Improvements
110253
- Core: attempts to delete a pool-allocated DF object will now throw an exception instead of corrupting the heap
111-
- `buildingplan`: buildingplan can now generate work orders
112254

113255
## Documentation
114256

@@ -265,7 +407,6 @@ Template for new versions:
265407

266408
## New Features
267409
- `orders`: added search overlay to find and navigate to matching manager orders with arrow indicators
268-
- `orders`: exported orders now include a human-readable ``name`` field
269410
- `sort`: added ``Uniformed`` filter to squad assignment screen to filter dwarves with mining, woodcutting, or hunting labors
270411
- `sort`: Add death cause button to dead/missing tab in the creatures screen
271412

0 commit comments

Comments
 (0)