Commit Graph

293 Commits (3962251edd44c6014c678afb6de32e531a02d6e9)

Author SHA1 Message Date
Ben Lubar ee6b281ae3
allow check-structures-sanity to check the size of the value explicitly specified in a lua expression rather than just its descendants.
print an error if getting the type identity fails.
2020-02-19 11:40:31 -06:00
Ben Lubar 0f857f1b20
fix msvc warning about 64-bit shift 2020-02-15 18:20:34 -06:00
Ben Lubar d0de7865d3
fix compile for gcc 4.8 2020-02-15 18:20:32 -06:00
Ben Lubar 631b8e772c
update structures; fix -lowmem being enabled due to being uninitialized on the stack. 2020-02-15 16:10:54 -06:00
Ben Lubar e4ff184280
check-structures-sanity: add -lowmem argument to use depth-first search instead of readth-first search
add progress indicator if called from the console
2020-02-15 12:54:04 -06:00
Ben Lubar 122169a559
update scripts and structures
fix a crash if check-structures-sanity was called with a lua expression that evaluated to nil
2020-02-15 12:04:00 -06:00
Ben Lubar 8e5f391d3a
attempt to fix lua calls in check-structures-sanity 2020-02-15 02:42:44 -06:00
Ben Lubar 9caf6e97e6
add -enums, -sizes, and specific starting point flags to check-structures-sanity 2020-02-14 19:47:26 -06:00
Ben Lubar 4e69b50bb3
fix use-after-free in memview 2020-02-14 17:38:31 -06:00
Ben Lubar fec6f01520
Allow uninitialized raw pointers. 2020-02-13 19:55:49 -06:00
Ben Lubar 9c34e9e584
properly check fields of the full type heirarchy 2020-02-12 18:01:49 -06:00
Ben Lubar 24918e5513
check fields of actual virtual type, not just the declared one 2020-02-12 17:57:55 -06:00
Ben Lubar 40bd55c558
don't check bad pointers 2020-02-11 17:33:33 -06:00
Ben Lubar 195b933c61
ignore contents of elements of "bad" pointer vectors 2020-02-11 17:17:11 -06:00
Ben Lubar 62af2952b7
Fix check-structures-sanity mishandling vectors of pointers.
Also fix detecting structures that span multiple memory segments as being outside of memory.
2020-02-11 14:11:09 -06:00
Ben Lubar 8122b95144
fix signed integer being compared to an unsigned integer 2020-02-10 11:57:27 -06:00
Ben Lubar 05a49cbacb
fix a possible SIGABRT when misdetecting a vtable as being valid
add enum names enum-based indexes
2020-02-09 15:12:25 -06:00
Ben Lubar e9dba1d6ca
fix crash when checking unknown vector types. also remove the warning when unknown vector types were not pointer-aligned 2020-02-09 14:25:48 -06:00
Ben Lubar 6b828115a7
rewrite check-structures-sanity to use breadth-first search and not overflow the stack 2020-02-09 14:16:19 -06:00
lethosor f54c361718 Add an implementation of mifki's sizecheck library (tested on Linux) 2020-02-08 21:18:29 -05:00
Ben Lubar 359cc2275a
include the windows header rather than winnt 2020-02-05 21:47:25 -06:00
Ben Lubar d494eb619d
fix Windows 64-bit compile for check-structures-sanity
fix some sprintf size_t-related warnings
2020-02-05 20:29:16 -06:00
Ben Lubar 860131cf96
fix Windows 32-bit compile for check-structures-sanity 2020-02-05 20:21:32 -06:00
Ben Lubar d9abe02b2e
add support for DfArray in check-structures-sanity 2020-02-05 19:06:14 -06:00
Ben Lubar d7d0923044
add string checking support to check-structures-sanity
try to avoid crashes on bad vtables
2020-02-05 18:52:35 -06:00
Ben Lubar 3d037db789
add a tool for sanity-checking structures on a running Dwarf Fortress instance. 2020-02-05 16:36:59 -06:00
lethosor 815821eb93 Merge branch 'develop' into cmake-cleanup
Conflicts:
	depends/lua/CMakeLists.txt
	plugins/CMakeLists.txt
	plugins/devel/CMakeLists.txt
2020-01-18 22:28:43 -05:00
lethosor dc8b8b501b Move autofarm to supported plugins
PR #1468
2020-01-18 17:17:28 -05:00
lethosor 3e47ba543b Merge remote-tracking branch 'ab9rf/autofarm-cpp' into develop
Ref #1468
2020-01-18 17:11:43 -05:00
Ben Lubar 23b56c4492
Fix "kittens" development plugin not building on Linux due to missing thread library 2019-12-06 12:28:18 -06:00
Kelly Kinkade dfafafdf9b autofarm.cpp: whitespace, complexity
Clean up autofarm.cpp
2019-11-21 18:58:06 -06:00
Kelly Kinkade 5d92026bbe autofarm: make crop assignment more stable 2019-11-18 09:02:39 -06:00
Kelly Kinkade 7c8c6546c7 autofarm: suspend while processing 2019-11-18 09:02:39 -06:00
Kelly Kinkade 4abd410b1b Convert autofarm from ruby to C++
Reimplement the Ruby autofarm script as a C++ plugin
2019-11-18 09:02:39 -06:00
lethosor 150edcfff8 Move tailor to supported plugins 2019-11-02 21:12:41 -04:00
lethosor c2e5ae844c tailor: add docs
Ref #1398
2019-11-02 21:07:10 -04:00
lethosor ba8b828e69 Merge remote-tracking branch 'ab9rf/tailor' into develop 2019-11-02 21:02:23 -04:00
lethosor 582169e0a5 eventExample: make unitAttack a bit safer 2019-10-05 21:05:26 -04:00
lethosor 76da2c2aaf Clean up CMakeLists.txt style 2019-07-16 22:19:11 -04:00
lethosor f668914db8 kittens: fix compiling on Windows thanks to @ragundo 2019-06-01 17:30:26 -04:00
lethosor a2f8742128 Merge remote-tracking branch 'suokko/runtime_debug_prints' into develop
Also fix and reorganize changelog
2018-12-27 16:28:25 -05:00
Kelly Kinkade 98903d9d71 [tailor] tidy 2018-08-26 09:30:08 -05:00
Kelly Kinkade d3b335105c Add "tailor" plugin, to provide clothing management 2018-08-25 12:02:28 -05:00
Kelly Kinkade c840321edf move nestboxes out of devel 2018-08-16 10:23:15 -05:00
Kelly Kinkade a404ab3096 nestboxes: clean up & update description 2018-08-16 10:21:44 -05:00
Pauli 490a855776 Add a test for signal_shared_tag implementation
The test cases check that the signal_shared_tag implementation can be
used and destructed safely from multiple threads.
2018-07-04 15:18:20 +03:00
Pauli 645ec0d591 Improve kittens thread safety and shutdown with core
The bools could use acquire&release memory order or even relaxed but I
didn't think code was worth auditing for such low level optimizations.
Sequantial consistent is fast enough but much harder to use incorrectly.

The timeLast is protected by CoreSuspender lock. plugin_update is only
called when CoreSuspender lock is held.

The last_menu is protected by trackmenu_flg loads and stores.
2018-06-30 21:53:12 +03:00
Pauli 0727403ac1 Fix devel plugins linking in linux 2018-06-30 21:12:42 +03:00
lethosor 7036cc376b Fix warnings in devel plugins introduced by #1302 2018-06-20 12:03:14 -04:00
lethosor 03968db344 Fix GCC warnings in 'tweak kitchen-prefs-all' and dev plugins 2018-06-01 10:02:38 -04:00
lethosor db95796d4c Many build fixes 2018-03-10 16:53:45 -05:00
lethosor bdba95f90c memview: check for tags from sizecheck 2018-02-03 18:10:16 -05:00
lethosor 95aa5bbb47 zoom: fix MSVC warning 2017-08-07 15:06:00 -04:00
lethosor 43c4a88068 Move some checks in paintTile/readTile after hooks are called 2017-06-02 00:40:14 -04:00
lethosor 5c83c16a99 Fix memview x64 address display 2016-10-24 10:06:41 -04:00
lethosor 6ce470ad57 Add basic lua expression support to memview
Currently just supports basic field accesses (world.x, screen.y.z).
No support for world.x - 4, etc.

Closes #976
2016-08-24 16:26:34 -04:00
lethosor f4b0c2fcfc color-dfhack-text: Fix potential overflow issue 2016-08-22 23:18:58 -04:00
lethosor e965f5318f Replace many includes with forward declarations in modules/Maps.h 2016-08-13 21:44:01 -04:00
lethosor a1c25570df Move labormanager to plugins/, per request 2016-08-11 23:49:15 -04:00
lethosor 99813038e9 Update labormanager for unit.relations removal and fix warnings 2016-08-11 23:42:58 -04:00
lethosor bceeea39ba Merge remote-tracking branch 'ab9rf/develop' (labormanager) into develop 2016-08-11 23:37:22 -04:00
Kelly Kinkade a55ce5f1d9 labormanager: whitespace 2016-08-11 16:58:35 -05:00
Kelly Kinkade 5ab930ba4d labormanager: small tweaks
Handle cloth crafts correctly; handle pit jobs correctly; handle
bookcase construction correctly; deal with new break behavior better;
change assignment of clean labor; tweak hauling assignments slightly to
avoid overallocation; assign pull lever to everyone and clean to all
nonbusy dwarfs
2016-08-11 16:56:34 -05:00
lethosor 215afa34f3 Update for 64-bit unit changes
Includes xml, stonesense, scripts

Ref DFHack/df-structures@25cb373
2016-08-10 23:50:00 -04:00
lethosor afde73a673 memview: Fix pointer size on x64 2016-07-28 11:45:35 -04:00
lethosor eeb7f05483 vectors: Fix pointer parsing and display 2016-07-28 11:44:54 -04:00
lethosor 71e4f4ec62 Fix pointer-size-related compile errors in dev plugins 2016-07-28 11:40:17 -04:00
Kelly Kinkade 74f6f3d416 labormanager: add labors for bookcase (de)construct 2016-07-11 22:39:41 -05:00
Kelly Kinkade 874a97ed9f labormanager: fix several job-to-labor mappings 2016-07-11 22:39:41 -05:00
Kelly Kinkade 808afca9f0 labormanager: add StoreItemInLocation labor, reduce tool churn
Note: this commit requires updated df-structures (77968973b28d0e828f880d119a700abb079f3521 or later)
2016-07-11 22:39:41 -05:00
Kelly Kinkade 0509c455dd labormanager: significant restructuring to use job posting list
Updated here to get potential jobs off the job posting lists, which is
apparently where certain map-designated live after being designated but
before they move to the actual job list. Also changes to how tools are
handled, and lever pulling is assigned by default to all idle dwarfs.
2016-07-11 22:39:41 -05:00
Kelly Kinkade 3a0ba332d9 labormanager: rework for better behavior with 43.03
The main thing here is that the process loop exits if the DF process_job
or process_dig flags are set since if these are set the job list is
going to change soon anyway. The plugin also sets these flags when it
changes any labors, which has the side effect of effectively disabling
the process loop while DF is paused, which prevents flapping  while
editing job preferences in-game, and also allows changing job
preferences in game (although such changes may not last when the clock
starts up again).
2016-07-11 22:39:41 -05:00
Kelly Kinkade dbc46c510f labormanager: fix stupid 2016-07-11 22:39:41 -05:00
Kelly Kinkade 705134975d labormanager: whitespace
MSVC is evil.
2016-07-11 22:39:41 -05:00
Kelly Kinkade f095e139aa labormanager: more tweaks to bring up to date
This update fixes some labors and attempts to address changes in the way
DF maintains the job list.
2016-07-11 22:39:41 -05:00
Kelly Kinkade 07e1c81969 labormanager improvements
Add some debugging facilities. Change some hauling, construction, and
deconstruction labors to reflect changes in DF since 34.11.
2016-07-11 22:39:41 -05:00
Kelly Kinkade 824275b23b Rename autolabor2 to labormanager and bring up to date with current 2016-07-11 22:39:41 -05:00
PeridexisErrant ae81454786 Minor fixes, space no longer required
Thanks to 2882422
2016-04-15 16:28:41 +10:00
PeridexisErrant 273c22f606 Shorten "ls" help for plugins
I think that's all of them.
2016-04-15 16:28:41 +10:00
lethosor f5d10ecf61 vectors: attempt to identify instances of virtual classes
Also:
- don't restrict to heap ranges (e.g. allow globals)
- stylistic cleanup
2016-04-03 20:47:21 -04:00
sv-esk 20572fb667 add new jobs to autolabor 2016-02-23 19:01:14 +02:00
lethosor 2a2ab00ca9 Add "map" parameter to a lot of drawing functions
Ref #746
2015-12-22 11:42:51 -05:00
Eric Wald e4de341168 Preparing for MakeInstrument elimination.
Instruments are now made individually, so this type of job no longer happens.  Therefore, it will probably be removed from the job_type enum.
2015-12-17 21:45:43 -07:00
lethosor 610170b0b0 Add hooks for getDwarfmodeViewDims and getDepthAt (new) 2015-11-15 11:54:34 -05:00
lethosor fcfffd1cb6 Track state of gui hooks
Also fix a bug in drawborder() and expand color-dfhack-text to test
multiple hooks
2015-11-15 11:54:34 -05:00
lethosor fff9072b07 Add initial support for hooking into Gui-related functions 2015-11-15 11:54:34 -05:00
lethosor 8de710f1c1 Add Renderer module - safer way to install custom renderers 2015-10-21 17:18:39 -04:00
lethosor 4fc6cb6f17 Several PluginManager improvements
* load/unload/reload are no longer restricted to plugins that exist
  on startup
* Names passed to DFHACK_PLUGIN must match the plugin's filename
  (remotefortressreader vs RemoteFortressReader, counters vs probe)
* "plug" output lists all plugins and state/command information
* Deleted plugins can be reloaded again if they are replaced
* load/unload/reload don't fail silently with broken plugins
* Built-in commands are recognized internally (e.g. "help help"
  does not display "help is not a recognized command"), although help
  for them is not yet implemented
* New command: "type" (bash-like) - shows where/how a command is
  implemented
* "plug" can accept multiple plugin names
* "ls" displays more information about unloaded/unrecognized plugins
* "load all" changed to "load -all" (or "load --all", "load -a", ...)
2015-08-14 16:11:23 -04:00
lethosor fcd15bfd73 Move vshook plugin to title-version and enable by default 2015-08-09 13:37:26 -04:00
lethosor a577248a38 Make memview output more readable 2015-05-09 19:41:13 -04:00
lethosor 786581689f Move get_dfhack_version() to a separate namespace and add a few other version-related functions 2015-04-02 16:37:58 -04:00
lethosor 9b6d8d2799 Allow dev plugins to be skipped on startup 2015-04-01 17:50:22 -04:00
lethosor 82d72007fc Move zoom-related commands to a separate dev plugin 2015-04-01 17:24:52 -04:00
lethosor 7913517b2c Add "nyan stop" command 2015-04-01 17:02:33 -04:00
Lethosor 88c3a629d5 Fix vshook 2015-03-26 19:27:22 -04:00
lethosor 10cfef0553 Fix whitespace issues 2015-02-14 22:53:06 -05:00
Quietust cf06dc3503 Update to 0.40.11, fix a few devel plugins to build again 2014-09-04 08:26:45 -05:00
Quietust 97de21357c First pass for 0.40 compatibility; still lots left to do, but this will at least build 2014-07-21 13:18:29 -05:00
expwnent c7636ae442 Deleted devel/printArgs because there's a script for that. 2014-06-30 02:56:07 -04:00
expwnent 2894b406ac Sorted devel CMakeList. 2014-06-30 02:54:15 -04:00