Commit Graph

2216 Commits (1fd1169a48a6941a43b35f70b61a04bb861382db)

Author SHA1 Message Date
lethosor 55d5706a21 Update structures and fix various issues with plugins producing items
reaction_product::produce() takes a new unidentified vector<void*>*.
Passing a reference to an empty vector appears to work.
2015-12-18 18:40:11 -05:00
lethosor 347a112aa1 Add support for 11-argument function wrappers
Needed by item::addImprovementFromJob() as of 0.42:
dfhack/df-structures@f6361e2
2015-12-18 17:45:23 -05:00
Ben Lubar 9bccf457c5 Check for ui_sidebar_menus being null before using it. 2015-12-17 10:54:19 -06:00
Ben Lubar 80ec5ab043 vim-style +-args. for example, "./dfhack +echo foo" would be equivalent to running ./dfhack and then typing "echo foo" into the console. uses shell argument splitting, so "./dfhack +somecommand 'foo bar' baz" does the right thing. See DFHack#755. 2015-12-13 14:03:25 -06:00
lethosor 78d6b92127 Change strangemood permitted skill checks to job checks
permitted_skills was removed in 0.42 (dfhack/df-structures@6e2e8731)
2015-12-12 11:17:00 -05:00
lethosor 1329acc516 Update xml 2015-12-11 20:34:48 -05:00
lethosor 83603fcf45 Add prerelease build flag and warning script 2015-12-11 20:27:46 -05:00
lethosor 571df39878 Update submodules 2015-12-11 16:35:42 -05:00
lethosor 7e9d6fba86 Update xml 2015-12-09 20:03:14 -05:00
lethosor 448e367d4d Update xml 2015-12-08 17:32:13 -05:00
lethosor a3d6d16757 Update xml 2015-12-07 17:14:46 -05:00
lethosor 02d2405d1f Update xml 2015-12-07 16:34:47 -05:00
lethosor 49ad153d4b Update xml 2015-12-06 17:12:46 -05:00
lethosor 3b2ace95f8 Make SDL_UpperBlit hook check core status first 2015-12-05 20:07:54 -05:00
lethosor b63270162d Update xml 2015-12-04 23:12:49 -05:00
lethosor 7a69b90277 Update xml 2015-12-02 16:27:51 -05:00
lethosor 8b406cc0b3 Make a separate copy of DF's SDL library to link against on OS X
Linking to any library with ".framework" in its path on OS X causes
that directory to be included in the include path (with -F), which
causes all of the DFHack core to be rebuilt unnecessarily when
changing DF folders.
2015-12-01 17:35:39 -05:00
lethosor 2aeac718cc workflow: Account for job postings correctly and fix existing issues
Without removing postings correctly, it was possible to end up with
multiple workers assigned to a job that workflow had suspended
multiple times, which caused crashes if more than one worker was
assigned to the same job by DF.

This adds an additional command, fix-job-postings, that runs
automatically when loading a world and fixes:
- Multiple job postings that point to the same job
- Job postings that point to a job where posting_index == -1
  (i.e. jobs that should have no posting assigned)

Fixes #741
2015-11-25 20:33:13 -05:00
lethosor df4fb70be2 Provide more suggestions for unrecognized commands 2015-11-25 20:22:14 -05:00
lethosor 610170b0b0 Add hooks for getDwarfmodeViewDims and getDepthAt (new) 2015-11-15 11:54:34 -05:00
lethosor 1ff9277e12 Remove plugin export functionality (unused) 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 875ecf7827 Update Core::top_viewscreen before calling state change handlers
This was previously done right before SC_VIEWSCREEN_CHANGED events
were handled, meaning that code handling earlier events that used
top_viewscreen (rather than getCurViewscreen()) could refer to an
invalid viewscreen, i.e. in the tick after it was deleted.

Fixes #747
2015-11-14 21:48:51 -05:00
lethosor 2882422a3e Don't require short script help to start with a space
Ref #742
2015-11-09 22:58:46 -05:00
lethosor 3fb2628921 Add a Lua implementation of next_enum_item() 2015-11-07 15:22:30 -05:00
lethosor 051244c8d6 Fix GCC compile error 2015-11-06 20:05:14 -05:00
lethosor d1cd5df314 Merge remote-tracking branch 'DoctorVanGogh/automats-floorfix' into develop 2015-11-06 19:54:06 -05:00
DoctorVanGogh e9be1aa657 Fix for construction over existing construction & on top of walls
Fix to allow constructions on top of (natural) down stairs
2015-11-06 19:00:43 +01:00
lethosor 867b733a04 Fix a few GCC warnings on Linux (GCC 4.6) 2015-11-05 21:48:13 -05:00
lethosor 8412a496dd Remove extra check for "type" command 2015-11-05 19:09:14 -05:00
lethosor 23b02ebcf2 Update xml 2015-11-05 16:17:52 -05:00
lethosor e2a1658124 Update xml 2015-11-04 21:42:04 -05:00
Lethosor 14707e7d81 Merge pull request #719 from DoctorVanGogh/r3compat
Allow loading (external) plugins compiled against r3
2015-10-31 19:12:07 -04:00
DoctorVanGogh c6220c9703 Remove tabs/trailing whitespaces 2015-10-31 23:43:57 +01:00
Lethosor 6e5d9c23e5 Merge pull request #715 from DoctorVanGogh/webfix
Add 'undisturbed' flag to job item checks
2015-10-31 11:28:25 -04:00
lethosor 7da3c65079 Fix display of arrows in lua filtered list widgets
Fixes #718
2015-10-30 19:16:29 -04:00
lethosor 83991d2a22 plug: Don't color loaded plugins 2015-10-30 18:45:55 -04:00
lethosor ac71fa8070 Add isValidLabor() to Units module
Closes #711 and could avoid potential issues when editing units from
other civs with manipulator.
2015-10-30 18:41:09 -04:00
lethosor 1250bb5204 type: Provide more useful information (script paths, plugin names) 2015-10-27 17:34:32 -04:00
DoctorVanGogh 4e0f426bba Fix code formatting 2015-10-26 02:37:44 +01:00
DoctorVanGogh ba53f3c035 Add 'undisturbed' flag to job item checks 2015-10-26 02:19:41 +01:00
DoctorVanGogh fb4d16f477 Enable loading of r3 plugins 2015-10-25 00:04:49 +02:00
lethosor 8de710f1c1 Add Renderer module - safer way to install custom renderers 2015-10-21 17:18:39 -04:00
lethosor c44ac8ec6e Improve handling of fatal errors and errors in dfhack.lua
* Several fatal errors that occurred during core initialization didn't
  stop initialization or set 'errorstate' properly, which caused
  update hooks and other code to crash later. This has been fixed and
  should address crashes like the one mentioned in #470.
* Errors when loading dfhack.lua now cause Lua::Open() to fail, which
  triggers a fatal error in Core::Init()
* Failure to initialize the console no longer results in a call to
  fatal() (since it didn't actually stop initialization previously)
2015-10-17 21:18:04 -04:00
lethosor 5387c03ea0 DFHackVersion: Expose whether the built commit is tagged 2015-10-17 15:35:40 -04:00
lethosor d3dbc6225a Implement getViewscreenByType() in lua 2015-10-17 15:11:04 -04:00
lethosor 96df70fe0b Use TCSADRAIN when disabling raw mode as well 2015-10-14 15:58:27 -04:00
lethosor 632a809d6f Update xml 2015-10-11 11:39:16 -04:00
lethosor c2267013b4 plug: List enabled state 2015-10-03 13:42:20 -04:00
lethosor 3f5c002634 Pass virtual_identity by reference 2015-10-03 09:27:24 -04:00
lethosor d343dfd8a0 Add a function to find viewscreens (or parents) of a given type
This makes it possible for some plugins to detect the game state more
reliably - for example, prospector would previously fail when
embarking if the viewscreen_choose_start_sitest instance had any
children.
2015-10-02 21:50:55 -04:00
expwnent e95aea90e0 Fix CMake warning over INTERFACE_LINK_LIBRARIES / policy CMP0022. 2015-09-27 04:30:46 -04:00
lethosor b16e59b91c Check for existence of save folder before attempting to log events
cur_savegame.save_dir can be populated when the save directory does
not yet exist after world generation (since the game can be aborted
at that stage without saving).
2015-09-26 14:26:44 -04:00
lethosor fa60ccdd52 Don't find scripts from the last loaded world's raw/scripts folder 2015-09-26 14:26:13 -04:00
lethosor b679a0c482 Update xml 2015-09-26 13:45:51 -04:00
lethosor 2bcf74d74c Merge branch 'develop' of https://github.com/dfhack/dfhack into develop 2015-09-26 10:46:45 -04:00
lethosor ec17685041 CMake: Add compiler checks and GCC version checks 2015-09-26 10:46:29 -04:00
expwnent dfe9ec90f2 Update XML. 2015-09-25 19:43:14 -04:00
expwnent a188b9d567 Merge branch 'third-party-scripts' into develop 2015-09-25 17:48:25 -04:00
expwnent 5bcff42800 Add third party scripts. 2015-09-23 23:46:26 -04:00
lethosor 788860efb6 Log more information about version information on startup
May help address #653
2015-09-22 20:01:05 -04:00
lethosor 91a1836439 Fix a few issues with init file variations
* GCC does not allow std::string instances or enums without a base
  type to be passed as varargs
* Fixed path concatenation issue causing dfhack.init to not be loaded
2015-09-21 18:57:58 -04:00
expwnent 2c9b268184 Merge pull request #689 from expwnent/develop
Generalize dfhack.init so it looks for more files in more places, for onload, onunload, etc.
2015-09-21 17:33:52 -04:00
expwnent af90d14cb2 Use shenanigans to make a certain table const. 2015-09-21 17:24:51 -04:00
lethosor 051a1f9661 Update xml 2015-09-19 18:00:59 -04:00
lethosor a56a427d12 Make Filesystem::is* functions handle nonexistent paths properly
If stat() failed, these functions could read from an uninitialized
stat struct and return "true" for paths that didn't exist.
2015-09-19 17:34:58 -04:00
expwnent 5bf3093139 Now it looks for dfhack*.init instead of just dfhack.init, onLoad*.init instead of just onLoad.init, etc. 2015-09-15 07:27:42 -04:00
lethosor d696832efa Merge branch '3rd-party-scripts' into develop 2015-09-14 16:52:13 -04:00
lethosor 9eb86c7e38 Support additional script search paths
These can currently be added/removed from C++ or through the Lua API.
2015-09-06 16:23:02 -04:00
lethosor 66c7a461fd Don't attempt to copy non-files into dfhack-config 2015-09-03 15:02:51 -04:00
lethosor 9eac4585b1 keybinding: support 0-9, F10-F12 2015-09-02 15:56:53 -04:00
lethosor 949e4d42cf Remove MacPool.* 2015-08-29 19:42:32 -04:00
lethosor 906fba9b54 Update xml 2015-08-26 16:41:04 -04:00
lethosor 81ef17df32 Update xml 2015-08-25 10:23:59 -04:00
lethosor 29a0aee44c Implement strnlen on OS X <= 10.6
Fixes #182
2015-08-24 17:51:42 -04:00
lethosor 19f966aefc Improve some plugin-related error handling 2015-08-16 17:28:31 -04:00
lethosor 5717c2cdd4 Don't set plugin state to PS_BROKEN due to load failures 2015-08-16 17:02:53 -04:00
lethosor a5f15b279c plug: Include deleted plugins in full list 2015-08-14 19:32:41 -04:00
lethosor 735498c3f9 Fix merge conflict 2015-08-14 16:23: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 1bf3a6a37a Update xml 2015-08-14 10:46:05 -04:00
lethosor 2aba2da56d Avoid DataStaticsFields dependency on PluginManager.h 2015-08-11 22:59:19 -04:00
lethosor 9c84c78129 Make lua listdir functions return useful error messages 2015-08-10 12:44:27 -04:00
lethosor d09cdc83ba Update xml 2015-08-10 11:25:15 -04:00
lethosor dc747d59df Link dfhack-md5 on Windows 2015-08-09 13:20:28 -04:00
lethosor 418d2831ef Add a framework for including 3rd-party script repos
Repos need to include a CMakeLists.txt file with calls to the
DFHACK_SCRIPTS macro, which functions similarly to DFHACK_PLUGIN.

The `open-legends` script from lethosor/dfhack-scripts is included
as an example.
2015-08-06 21:50:01 -04:00
lethosor f46d3d137f Allow multiple contexts to be specified when adding keybindings 2015-08-06 20:41:54 -04:00
lethosor afce8d810b Update xml 2015-08-06 17:32:42 -04:00
lethosor de49befdbb Improve version information
* Add reimplementations of old DFHACK_VERSION-style macros
* Expose full git commit ID
* Expose all DFHack::Version functions to Lua
2015-08-06 17:30:51 -04:00
lethosor a67326ad00 git-describe: always use long format 2015-08-06 17:01:11 -04:00
lethosor d02e67267a Replace jsonxx with jsoncpp 2015-07-29 15:50:33 -04:00
lethosor cc5045d6df Fix Alt-E/U/N bindings on OS X 2015-07-29 10:32:19 -04:00
lethosor f387eb2960 Fix an issue where Ctrl-*-A and Ctrl-*-Z keybindings were not properly detected 2015-07-29 09:35:09 -04:00
lethosor 786086e5c5 Make non-CR_OK return values for SC_BEGIN_UNLOAD events abort unload
Returning CR_FAILURE, for example, is more consistent with
plugin_shutdown().
2015-07-28 18:36:20 -04:00
lethosor e51779b08c Update xml 2015-07-27 21:40:04 -04:00
lethosor 7eb4c33cb1 Cache result of getPath() on darwin 2015-07-27 20:32:33 -04:00
lethosor 03aa2399a0 Add environment variables to skip global and vtable initialization 2015-07-23 23:25:01 -04:00
lethosor 27295a9b6f Log DFHack and save-specific information on world (un)load events 2015-07-23 23:24:00 -04:00
lethosor c34e9bb657 Update xml 2015-07-22 17:27:57 -04:00