* test jsoncpp upgrade
* use new json library target name
* don't remap the output dirs
* undo warnings at the source
* set new defaults for jsoncpp
* fix typo in new options
* fix signed comparison mismatch warning
* address random(?) compile failures
saying our std::atomic is not initialized in Debug.cpp
* Adds cxxrandom unit test and fixes interface problems
* Tightens braces
* Adds detection code for Shuffle's seqID/engID
* Adds usage examples for cxxrandom
* Gives cxxrandom objects id ranges, sort of
* Updates changelog
* Updates changelog.txt
* Increases id space for cxxrandom
* Fixes bool distribution error message and improves check
* Adds comment explaining the seeded RNG tests for cxxrandom
* Fixes type problem for 32bit builds
* Reduces loop count a few magnitudes
* Fixes a mistake in test.cxxrandom_seed
* Adds a plugins sub-directory
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Auto-adds plugins/external sub-directories
* Moves plugins/external globbing as to generate plugins/external/cmake
* Removes plugins/external/.gitignore since the directory is generated
* Fixes cmake error
* Moves gitignore for plugins/external to ensure existence for fresh clone
* Adds missing EOF newline
* Adds requested changes
When active, the displayed names of partially-consumed items (e.g.
hospital cloth) will display a percentage indicator at the end.
Also re-sort a few Tweaks so they're in alphabetical order again.
This is more convenient for some devs than the old CMakeLists.custom.txt
solution because it allows the plugins themselves (files or folders) to be
ignored, rather than needing to remember to leave them unstaged.
* route 'Loading script...' messages through the debug logging framework
* they are now controllable via debugfilter. to turn off, add this to your dfhack.init file: debugfilter set Warning core script
* clarify debug logging docs
* prevent DEBUG messages from being compiled out of the binary
* recolor INFO messages so they blend into existing console output
* add configuration interface for log message header elements so they are individually configurable. all default to off
* code cleanup on autofarm.cpp
* more code cleanup on aufofarm.cpp
* yet more cleanup of autofarm.cpp
mostly whitespace, some `*` and `&` adjustments
* downgrade autofarm to c++11
apparently the gcc we use doesn't support c++14 generic lambdas
* death to whitespace
apparently visual studio's default whitespace murderer doesn't touch `#define`s. who knew?
* Update autofarm.cpp
const is good
even when the item label is truncated for length
this change also fixes items that were being incorrecty grouped due to
having differences only in the truncated part of their labels
so no one else is tempted to use it as a library. starting buildingplan
from two separate plugins just runs two completely separate engines with
separate state, one of which is completely inaccessible from the UI.
fixes special case where a channel tile is specified over a regular dig
tile. this allows dig-now to produce a flat floor in that case, which is
likely what is intended.
found this bug with blueprint-generated blueprints. if both a channel
and the resulting ramp are explicitly marked in the blueprint (like the
blueprint plugin does), the channel is processed first, pre-creating the
ramp in the tile designated for a ramp. Then, when the ramp designation
is processed, the ramp is already there, which is an invalid tile to
make a ramp on, so the designation is skipped (and therefore not
cleared). this change clears the designation for both the ramp tile and
the channel tile when either is processed. this opens another edge case
where the designation under a channel is a regular 'd' mine, which will
now get ignored and leave a ramp insead of a flat floor. but I'll
address that in the next commit.
--splitby=none is the new default, allowing all blueprint phases to be
written to a single file. old behavior of one phase per file is
supported via --splitby=phase.
&& has a higher precendence than ||, so this could have resulted in a crash in
some cases. It also produced unintentional behavior where e.g. `tailor 1 foo`
would enable the plugin, unlike `tailor enable foo`.
From #1920
Update autofarm to count PLANT_GROWTHS as well as PLANTS for threshold purposes. This addresses #1902.
Also addresses some pointer hygiene issues in autofarm.
we normally take care of any ramp tops above the channeled tile when we dig the ramp below the channeled
tile, but that logic might not run if we channel down into empty space
(or undiggable tiles)
also fix missing dug_tile indices when channels are dug
also fix second boulder/gem being generated with a potentially incorrect
probability when digging channels and ramps
refactor is a straight copy-paste. this code could really stand some
cleanup (unused vars, unnecessary use of the MapCache layer, forced
allocation of all blocks even if they are not being unhidden, etc.), but
that can come in a later PR.
- def.h: changed vectors for inorganics to contain uint8_t instead of bool which improves the performance when using std::fill and std::memset to batch-set the whole array
- survey.cpp: using std::memset instead of direct assignment to reset the inorganic vectors, also using the actual size of each vector for the call
- changelog.txt: add note concerning the changes
- make depth and name parameters optional
- allow depth to be negative to indicate top-down instead of the
previous hard-coded bottom-up
- add --cursor for specifying start position (game cursor is not needed
if this param is specified)
remove the unneeded cache layer. the cache is for writing. we're just
reading. all the cache is doing is adding latency as it makes its copies
of map data structures.
generating a 190x190x100 dig blueprint:
before change: 1.7s
after change: 1.0s
the performance gains aren't as important here as the reduced complexity
of the algorithm, though. for reasonably-sized blueprints, the time
savings are unnoticeable.
To reproduce:
1. Enter the `d`esignation menu
2. Press `-+` to change priorities
3. Create a designation
4. Press `Alt-p` to hide priorities
5. Exit and re-enter the designation menu (`Esc`, `d`)
Previously, priorities would be visible again after step 5. With this change, they are not visible until you press `Alt-p` again.
Fixes#1068. Note that this is a relatively unobtrusive fix: selecting a priority with `+-` will still result in priorities being shown again. This is native DF behavior that I am reluctant to override because users of designation priorities likely want to see them.
- Use at() to crash immediately on out-of-range errors instead of introducing
memory corruption (see #1824)
- Replace custom implementation of df::unit::find()
- Use range-based for with get_vector() where appropriate
Planning a 4x2 construction with DF's `umkh` keys (i.e. not automaterial's box-select) would previously produce a 5x3 construction instead, for example.
Fixes#1803
Running a command that created a new screen would previously result in a screen
order that looked like this, due to how `Screen::Hide` works:
- DF screen
- `command-prompt` screen (dismissed)
- New screen
The `command-prompt` screen remained on the stack until the new screen was
dismissed, so it would intercept viewscreen vmethod calls intended for the
DF screen.
This change adds a new behavior to `Screen::Hide` that results in this screen
order after running a command:
- DF screen
- New screen
- `command-prompt` screen (dismissed) - DF removes this screen immediately