Commit Graph

13499 Commits (1d855014c26d1247cfdafafea94db791a01639e4)
 

Author SHA1 Message Date
lethosor 3b4d6de454
Merge remote-tracking branch 'myk002/quickfort_building_types' into develop 2020-10-27 23:14:38 -04:00
Myk Taylor 5debc43def add port of Python Quickfort's TheQuickFortress
- some bugs fixed, especially in the query blueprints
- repackaged into a single file for easier distribution
- all blueprints given labels for addressing
- meta blueprints added for blueprints that could be applied as a group
2020-10-26 21:18:22 -07:00
Myk Taylor c1af3e2817 document what happens if no types are allowed 2020-10-26 21:13:11 -07:00
lethosor 3ab9157a2d
Merge remote-tracking branch 'myk002/buildingplan_refactor5_allbuildings_squashed2' into develop 2020-10-26 21:37:41 -04:00
lethosor b723636fe2
Merge remote-tracking branch 'myk002/buildingplan_refactor4_algorithm_squashed2' into develop 2020-10-26 21:24:05 -04:00
Myk Taylor 1a69a9b483 add more important checks for matching items
stolen (with love) from advfort.lua
2020-10-26 16:54:50 -07:00
Myk Taylor 371f68f0a3 update changelog 2020-10-26 16:22:15 -07:00
Myk Taylor 292d40a6ba change hotkeys for adjusting min and max quality
to avoid 'q' and 'w' conflicts with the standard DF UI hotkeys for
roller speed.

min quality: 'qw' -> 'QW'
max quality: 'QW' - 'AS'
2020-10-26 16:11:34 -07:00
lethosor 031f2a2feb
Reduce build matrix entries 2020-10-26 01:23:24 -04:00
Myk Taylor 0e2d29cd8d increase readability of lists in dreamfort help 2020-10-25 14:25:02 -07:00
Myk Taylor ebba769a0c blueprint library playtesting fixes
- balance wings of The Saracen Crypts
- add stairs to Whirlpool Housing
- move burial script notes to message()s
2020-10-25 09:37:45 -07:00
Myk Taylor 72b6ac781b on second thought, let UI-related settings reset
no need to have quickfort_mode stay on forever
2020-10-25 02:45:03 -07:00
Myk Taylor 486bf2719b persist global buildingplan settings
this ensures that a player's preferences are saved across map reloads.
this is particularly important for the building material filters, since
item fulfillment tasks are regenerated on map load, and any changes in
settings when buildingplan is reset will change the item vectors that will
be searched for planned buildings. if the settings were allowed to reset,
then a player who thought all walls would be made out of blocks would be
surprised to find boulders and logs being used after the map is reloaded.
2020-10-25 02:37:22 -07:00
Myk Taylor 51f49b1c2c add bedroom and tomb blueprints to the library 2020-10-24 21:17:53 -07:00
Myk Taylor a0c86b8a9b rewrite quickfort user guide into
spend more space highlighting how users can use the blueprint plugin to
avoid learning how to write blueprints themselves
2020-10-24 21:14:09 -07:00
lethosor 58917b03d1
Switch away from CheckDFObject in unprotected calls
See https://github.com/DFHack/dfhack/pull/1674#issuecomment-716028460
2020-10-24 14:27:33 -04:00
Myk Taylor 3e0b0f8078 update changelog 2020-10-24 09:21:18 -07:00
Myk Taylor a2f943e7e5 don't shift UI down for track constructions
automat doesn't have UI there to avoid
2020-10-24 09:19:15 -07:00
Myk Taylor b4498a262c update more dreamfort help, add automation.json 2020-10-23 21:12:04 -07:00
Myk Taylor 83e8755e6d fix typos in quantum alias 2020-10-23 20:26:37 -07:00
Myk Taylor a3bec346a7 clarify text a bit and move stair guide 2020-10-23 20:25:56 -07:00
lethosor 488c5509fc
Merge remote-tracking branch 'myk002/buildingplan_refactor3_lua_squashed2' into develop 2020-10-23 23:07:40 -04:00
Myk Taylor e614d16e0e use Lua::CheckDFObject instead of static cast 2020-10-23 15:30:40 -07:00
Myk 55a52554ee
use CheckDFObject instead of static cast
Co-authored-by: Alan <lethosor@users.noreply.github.com>
2020-10-23 13:55:14 -07:00
lethosor c73a8a05d0
Merge remote-tracking branch 'myk002/buildingplan_refactor2_squashed2' into develop 2020-10-23 13:57:17 -04:00
lethosor 4301252ddf
Merge remote-tracking branch 'myk002/buildingplan_refactor2_squashed' into develop 2020-10-23 13:51:54 -04:00
Myk Taylor 233ce26ab5 update changelog 2020-10-23 09:45:41 -07:00
Myk Taylor bc4dd7b1a3 add walkthroughs for each dreamfort level 2020-10-23 09:41:56 -07:00
Myk Taylor 186f28a94b filters for altars, display cases, and bookcases 2020-10-23 09:11:07 -07:00
Myk Taylor 0f517f38f8 don't conflict with automaterial plugin
shift buildingplan text down so we don't overwrite each other
2020-10-22 22:01:45 -07:00
Myk Taylor 7e78d8802e migrate qf's buildings_use_blocks to buildingplan
- remove buildings_use_blocks setting from quickfort config file
- add a new Buildingplan Global Settings dialog to house global settings
- move Quickfort Mode (for legacy Python Quickfort) into that dialog
- add four settings to control how generic building materials are matched:
  - blocks
  - boulders
  - logs
  - bars
- ajust the buildingplan algorithm to register duplicate tasks for
  building material item filters, one for each type. since we track how
  many items we've matched for a filter, the first matched item will
  "win" and the extras will get detected as invalid and popped off the
  queue.
- ensure boulders, logs, and bars are scanned last, and in that order
- more global settings planned for the future! see
  http://www.bay12forums.com/smf/index.php?topic=176889.msg8202679#msg8202679
2020-10-22 21:37:49 -07:00
lethosor fa70c829ad
Merge remote-tracking branch 'lethosor/github-actions-plugins' into develop 2020-10-21 20:23:41 -04:00
lethosor a0ff7c393b
Give artifacts a unique name 2020-10-21 20:14:16 -04:00
lethosor 9357c9f888
Only upload test artifacts if tests ran 2020-10-21 20:13:50 -04:00
lethosor 00f012d334
GitHub Actions: add alternative plugin builds 2020-10-21 17:58:17 -04:00
lethosor 26505acb70
Add some cross-references and clean up 2020-10-20 01:18:25 -04:00
lethosor 2bd0e938ad
Move pathable to Lua API docs 2020-10-20 01:11:01 -04:00
lethosor 84973d1fb8
Sort plugins in Lua API.rst 2020-10-20 01:06:47 -04:00
lethosor 3a200fcd92
Expand `probe` documentation 2020-10-20 01:01:02 -04:00
Myk Taylor 05d2e5b65c update case study: order-dependent aliases
since the example I had used no longer exists now that we have
parameterized aliases. I had to find another example in the industry
blueprints. I made it a proper "tip" and added more explanation as well.
2020-10-18 13:49:11 -07:00
Myk Taylor 914c24d873 use new quickfort features in dreamfort
parameterized aliases and configurable zones
2020-10-17 22:22:32 -07:00
Myk Taylor ea5a5414c9 document (and use) parameterized aliases 2020-10-17 22:21:50 -07:00
Myk Taylor 6c3bac2d6c document extended zone configuration syntax 2020-10-17 22:20:39 -07:00
Myk Taylor 09fbaba726 buildingplan: support all building types
Allow buildingplan to handle all building types, update the docs, and add in little extra fixes to ensure all the new types work correctly.
2020-10-16 14:23:35 -07:00
Myk Taylor 100b374af7 generalize buildingplan for all building types
but restrict to only the currently supported set so we can still assume only one filter is required for each building.

changes:
- update buildingplan plugin version to 2.0
- new serialization format for planned buildings
- old persistent data is automatically migrated to new format on load
- algorithm now respects job_item filters; items must match job_item filter and buildingplan ItemFilter
- more invalid items are now filtered out, like items encased in ice. are there any others we should be checking (see BadFlags struct)
- items are sorted before job is unsuspended so final item ordering is correct regardless of what order the items were matched and attached
- item counts in filters are kept up to date so if buildingplan is disabled before all filters are matched and the building is completed by DF itself, the item counts will come out correct (though the item ordering and building "roughness" may be incorrect)
- fixes two memory leaks in building finalization code
- allows artifacts to be matched (ItemFilter defaults now top out at Masterful -- Artifact is selectable but must be manually specified)
- add gui to switch between items for buildings that require multiple item types
2020-10-16 14:08:52 -07:00
Myk Taylor 1368fb4003 buildingplan: construct buildings from lua
Replace C++ building construction code with lua constructBuilding so we can get the proper job_item filters set. these filters will be used when we replace the core buildingplan algorithm in the next PR.
2020-10-16 14:03:05 -07:00
Myk Taylor 82013c0c5e prep buildingplan for core algorithm changes
Lots of refactoring and reorganizing, with only cosmetic player-visible changes.

- show quickfort mode hotlkey label regardless of whether the current building type has buildingplan enabled. before, it was only shown after the user enabled buildingplan for the current building. this eliminates the extra step when enabling quickfort mode, which force-enables all building types.
- changed signature of lua-exported isPlannableBuilding to take subtype
  and custom type in addition to building type. this is only used by
  quickfort, and it already sends all three params in preparation for
  this change
- added lua-exported scheduleCycle(), which is like doCycle(), but only
  takes effect on the next non-paused frame. this lets quickfort
  run only one buildingplan cycle regardless of how many #build
  blueprints were run
- declared a few dfhack library methods and params const so buildingplan
  could call them from const methods
- converted buildingplan internal debug logging fn to have a printf api
- reshaped buildingplan-planner API and refactored implementation in
  preparation for upcoming core algorithm changes for supporing all
  building types (no externally-visible functionality changes)
  - changed df::building_type params to type, subtype, custom tuple keys
  - introduced capability to return multiple filters per building type
    (though the current buildings all only have one filter per)
- split monolith hook functions in buildingplan.cpp into one per scope.
  this significantly cleans up the code and preps the hooks to handle
  iterating through multiple item filters.
- got rid of send_key function and replaced with better reporting of
  whether keys have been handled
2020-10-16 13:52:23 -07:00
lethosor 895fa59c79
Merge branch 'buildingplan_refactor' into develop 2020-10-16 00:05:01 -04:00
lethosor ce7772a1c2
Add Filesystem::restorecwd()
This allows restoring the working directory to its original value, which may not actually be the DF root. See #1671, dfhack/scripts#152
2020-10-14 21:22:53 -04:00
Myk Taylor e4b6fb0ff4 Merge branch 'buildingplan_refactor' into buildingplan_refactor2_squashed 2020-10-12 22:39:55 -07:00