Commit Graph

3095 Commits (7a0f923e999f96bce9713c123cd391e5bba8949f)

Author SHA1 Message Date
lethosor b89fe222c7
Update xml 2020-12-29 23:47:44 -05:00
lethosor eb6957a167
Bump to 0.47.04-r4 and update submodules 2020-12-24 13:32:44 -05:00
myk002 3ba984c22c
only reset extents if they are unusable
this allows callers of Buildings::setSize() to "pre-initialize" the
extents to declare non-rectangular structures. this allows quickfort to
create non-rectangular stockpiles, farm plots, zones, etc. the extents
are still reset as before if the size of the building doesn't match the
caller's expectations.

this commit also fixes a memory leak when setSize() allocates memory for
extents, but the memory is not deallocated if the building is ultimately
invalid for some reason.
2020-12-16 11:10:47 -08:00
lethosor 855ce84eca
Update submodules 2020-12-04 23:55:43 -05:00
lethosor af2255956a
Update submodules 2020-12-03 23:00:21 -05:00
lethosor fb44b26b47
Make utils.addressof() work for raw userdata 2020-11-19 21:32:42 -05:00
lethosor 8cb38ecf5b
Merge remote-tracking branch 'myk002/myk_metalhead_mario' into develop 2020-11-13 14:04:30 -05:00
myk002 76e8c495fe
revert skip_vector=true for now 2020-11-13 10:45:53 -08:00
myk002 fa126af1fd
undo unnecessary edits 2020-11-12 22:49:06 -08:00
myk002 10616a387f
cleaner mask-based implementation 2020-11-12 22:44:38 -08:00
myk002 02a86d761a
identify bars as non_economic items
allows Job::isSuitableMaterial() to match metal bars as a building
material
2020-11-12 19:10:06 -08:00
lethosor 913d860ae4
Use initial working directory as process path on Linux, and expose to Lua 2020-11-12 19:07:51 -05:00
lethosor 23b230495e
Merge branch 'develop' into cwd-handling 2020-11-12 18:44:05 -05:00
lethosor 421844dcb8
Update xml 2020-11-11 16:05:24 -05:00
lethosor eee33822e7
Update submodules 2020-11-09 23:41:53 -05:00
lethosor 3aa902bd25
Update submodules 2020-11-03 19:52:24 -05:00
lethosor 1d0e2dc6bc
Update extents handling to use building_extents_type 2020-11-03 14:56:16 -05:00
lethosor 3b4d6de454
Merge remote-tracking branch 'myk002/quickfort_building_types' into develop 2020-10-27 23:14:38 -04:00
Myk Taylor 186f28a94b filters for altars, display cases, and bookcases 2020-10-23 09:11:07 -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 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 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
lethosor b343d00800
Update to 0.47.04-r3 (authors, changelog, and submodules) 2020-10-10 17:31:30 -04:00
lethosor 9c8098b4f0
Expose to_search_normalized to Lua, add test, and use in ListColumn (most useful for the `stocks` plugin) 2020-10-10 01:40:00 -04:00
lethosor 1b53c0e748
Merge remote-tracking branch 'GitOnUp/normalize_search' into develop 2020-10-09 22:18:39 -04:00
lethosor d1eec9d338
Update xml 2020-10-09 21:44:16 -04:00
lethosor c9609ad590
Make `createitem inspect` consistent for PLANT_GROWTH items 2020-10-09 12:45:49 -04:00
lethosor c2280356cb
Set language of some code blocks to enable syntax highlighting 2020-10-09 01:15:42 -04:00
lethosor 9ba677a38b
Update xml
dfhack/df-structures#410
2020-10-06 22:03:13 -04:00
lethosor 17bc4cd365
Merge remote-tracking branch 'myk002/buildingplan_item_match' into develop 2020-09-29 20:04:02 -04:00
Myk Taylor c73b1f03af buckets can be lye- and milk-free
otherwise the bucket for wells can never be matched
2020-09-29 00:23:44 -07:00
Myk Taylor 3c51bb51ab remove references to non-existent vector ids 2020-09-28 23:14:13 -07:00
Myk Taylor 6cc1428199 Merge remote-tracking branch 'upstream/develop' into buildings_vectors 2020-09-28 23:13:13 -07:00
George Murray 74a3e0eddf Use a string and .reserve for normalizing instead of stringbuf 2020-09-24 15:22:58 -07:00
George Murray f5c3712778 Nicer formatting for the normalized character mapping table 2020-09-24 14:32:58 -07:00
George Murray 38c9c28250 Fix wrong variable usage in to_search_normalized 2020-09-24 10:52:03 -07:00
George Murray a3c565b243 Add to_search_normalized to search for characters with accents 2020-09-24 07:31:10 -07:00
lethosor dfac5bc143
Update gui.Painter docs, add sections to dfhack.screen, add more links, etc 2020-09-23 22:00:39 -04:00
lethosor 65b8071941
Use typedefs from xlsxio in PluginStatics.h
The typedefs in the header foward-declared new structs of the same names in the DFHack namespace, e.g. DFHack::xlsxio_read_struct. Apparently the constructors that used these typedefs are not inlined on Windows, so libdfhack was compiled with a constructor taking a "DFHack::xlsxio_read_sheet_struct", and xlsxreader was looking for a constructor taking just a "xlsxio_read_sheet_struct", which didn't exist.
2020-09-18 15:05:17 -04:00
Myk Taylor f837532b42 use more precise item vectors for bld item filters 2020-09-13 17:12:29 -07:00
lethosor 5aca88ef03
Update submodules 2020-08-29 20:02:33 -04:00
lethosor 3b5a82cc05
Change color of ListBox.select2_hint to grey to indicate enabled
Ref dfhack/scripts#185
2020-08-27 00:08:28 -04:00
lethosor c034276af5
Merge remote-tracking branch 'myk002/quickfort_filter' into develop 2020-08-21 00:34:34 -04:00
lethosor 8779ca0659
Merge remote-tracking branch 'myk002/quickfort_civzones' into develop 2020-08-21 00:34:26 -04:00
Myk Taylor 9a3e9d5b12 listbox filter can match strings after punctuation 2020-08-17 21:15:33 -07:00
Myk Taylor 8a438c2a55 allow row_height to be set from the ListBox class 2020-08-17 21:14:05 -07:00
Myk Taylor e546d3eec3 rename is_civzone to the more general allow_wall 2020-08-15 20:13:48 -07:00
Myk Taylor ae872e812f properly detect valid tiles for civzones 2020-08-15 17:24:12 -07:00
Myk Taylor bda678bcd4 add some explanatory text to the top of the header 2020-08-11 19:47:04 -07:00
Myk Taylor 39ae2d95fc 2nd attempt to solve compilation errors on windows 2020-08-11 17:06:28 -07:00