Commit Graph

2496 Commits (73c6209f875c4032c7f0cf6a5c67f607bce393a1)

Author SHA1 Message Date
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
lethosor fc094e2dbc OS X: Check for existence of SDL.framework before building 2015-07-21 16:26:41 -04:00
lethosor 83f89480aa Update xml 2015-07-18 14:10:53 -04:00
lethosor 22ea68e68a Use is_valid_enum_item in FOR_ENUM_ITEMS
This is part of the workaround for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43680

Fixes DFHack/dfhack#654
Fixes JapaMala/armok-vision#21
2015-07-18 12:57:12 -04:00
lethosor 74404c62e7 Fix deadlock when aborting plugin load 2015-07-17 16:00:41 -04:00
lethosor 797e9b4485 OS X: Prevent DF window from receiving input when not focused
This partially fixes DFHack/stonesense#32, in the sense that input
to Stonesense is no longer received by DF, but does not cause
Stonesense to receive input either.
2015-07-17 13:49:17 -04:00
lethosor 2afc1c6d3f Update xml
viewscreen_choose_start_sitest fixes
2015-07-17 13:48:49 -04:00
lethosor 527b17d964 Update submodules 2015-07-04 20:45:37 -04:00
lethosor 95e04ef56a Update xml 2015-06-30 16:10:49 -04:00
lethosor 6cfc855e19 Use getcwd() in Process::getPath() on OS X
The "dfhack" script sets up the proper working directory
2015-06-29 10:11:46 -04:00
lethosor 0f3753095b update xml 2015-06-29 10:10:44 -04:00
lethosor 716ce1c9e2 Update xml 2015-06-26 23:20:59 -04:00
lethosor 935f4dd628 Log plugin load information to stderr 2015-06-26 16:11:41 -04:00
lethosor 5d1ae9f5ed Allow plugins without git description to be loaded 2015-06-25 11:46:04 -04:00
lethosor 524593a3d3 Locate git with find_package 2015-06-25 11:43:54 -04:00
lethosor ee7a2c7db7 Add git commit information to libdfhack-version
git is run every time 'make' is run, but the generated include file
is only updated when necessary. Plugins will be loaded successfully
if their DFHack version matches core's (assuming OpenLibrary()
succeeds), but will produce a warning if their git commit doesn't
match core's.
2015-06-24 19:32:45 -04:00
lethosor 0fa5570349 Recognize newline characters in Linux/OS X console 2015-06-24 00:54:12 -04:00
lethosor f3d91b3606 Update xml 2015-06-22 23:16:28 -04:00
lethosor 5bb5d87ad8 Install default dfhack-config files
Files from the "dfhack-config" source directory are now installed to
"dfhack-config/default" and copied to "dfhack-config" on startup if
they don't already exist. Previously, config files weren't available
at all unless they were manually installed (93c9a41).
2015-06-18 08:59:01 -04:00
lethosor 73de6a3051 Update xml 2015-06-15 12:58:49 -04:00
lethosor 6fb6645ed5 Merge branch 'dwarfmonitor-widgets' into develop 2015-06-15 12:55:26 -04:00
lethosor 862389d217 Allow lua scripts to redirect to other lua scripts
Addresses #634, #638
2015-06-14 11:56:14 -04:00
lethosor 93c9a41a3a Reimplement dwarfmonitor widgets in Lua (and improve customizability)
Widget positions and a few other options (e.g. date formats) can be
specified in dfhack-config/dwarfmonitor.json on a per-instance basis.

Related changes:
* Fixed an issue loading JSON files from Lua
* JSON files in dfhack-config (only dwarfmonitor.json currently) are
  no longer copied into the DF directory when building DFHack. This
  keeps developers' personal settings intact, but will require
  copying over changes made to DFHack's copies manually.
* Fixed incorrect config path in dwarfmonitor help
2015-06-13 21:15:43 -04:00
lethosor d663784707 Detect null unit pointer in Items::createItem() 2015-06-09 14:02:42 -04:00
lethosor bb93f2e40f Fix circular lua script dependencies 2015-06-05 19:08:11 -04:00
lethosor 36fde3d7e3 Allow Lua screens to allow OPTIONS to work 2015-06-05 18:45:52 -04:00
lethosor 96f3bdafb4 Implement an internal command to interrupt running Lua scripts
This inserts a debug hook that runs every 256 instructions by
default, which has a minimal impact on performance.
2015-05-24 19:06:01 -04:00
lethosor e27493fa02 Treat plugins without a "plugin_dev" symbol as ordinary plugins 2015-05-24 11:42:22 -04:00
lethosor 6278c94775 Update xml 2015-05-16 14:27:17 -04:00
lethosor db08df7e50 Update xml 2015-05-09 19:41:19 -04:00
lethosor b6ec48c99a Add a macro that allows exported functions to use different names 2015-05-09 09:42:15 -04:00
lethosor a8f5e683f7 Merge remote-tracking branches 'RossM/autolabor-changes', 'RossM/workflow-changes' and 'lethosor/plugin-exports' into develop 2015-05-09 09:39:55 -04:00
lethosor a47a5f8b0a Add an alternative to script_environment() that requires scripts to
recognize use as a module

Also document the use of enable/disable with lua scripts
2015-05-09 09:21:00 -04:00
lethosor 42a6cfaee6 Improve Lua enable/disable error handling 2015-05-08 18:03:19 -04:00
lethosor eaf282c18e Allow lua scripts to be enabled and disabled with built-in commands 2015-05-08 18:03:19 -04:00
lethosor db423c1aa6 Allow Lua scripts to specify whether they can be used as a module or
enabled/disabled
2015-05-08 18:03:18 -04:00
lethosor e73a2f8778 Move script internals to a single table 2015-05-08 18:03:18 -04:00
Ross Morgan-Linial 51d61d91cb Change tabs to spaces. 2015-05-07 20:50:19 -07:00
Ross Morgan-Linial 7aac9a8fb8 Improve workflow handling of plant reactions
Makes workflow understand "seeds of any plant", "thread of any plant",
"drink of any plant", "powder of any plant", and "liquid of any plant"
when counting items.

Changes workflow's handling of the built-in plant reactions to
understand that they always produce plant products, and that they also
produce seeds.

This means that you can set a target for, for example, "powder of any
plant", and workflow will use a milling job to produce that.
2015-05-07 20:49:29 -07:00
lethosor a4a2b2f1de Use TCSADRAIN instead of TCSAFLUSH when initializing raw mode 2015-04-19 11:58:35 -04:00
lethosor 3ca00f85d0 Merge remote-tracking branch 'lethosor/json' into develop 2015-04-08 20:18:13 -04:00
lethosor 62cfd0b8ca Reset DYLD_INSERT_LIBRARIES on startup on OS X
This prevents subprocesses (e.g. those launched with Lua's os.execute)
from attempting to load libdfhack.dylib and aborting due to an
architecture mismatch.
2015-04-06 17:05:36 -04:00
lethosor 4b124bc022 Avoid including DFHackVersion.h in PluginManager.h
Changes to DFHackVersion.h previously required recompiling nearly all
of the DFHack core.
2015-04-03 14:02:14 -04:00
lethosor 7758311f88 Make gametype functions use default arguments when called from Lua 2015-04-02 16:55:27 -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 8b5b8ed864 Log command name collisions 2015-04-01 17:32:11 -04:00
Lethosor e71c55865d Merge pull request #591 from lethosor/penarray
Expose a faster screen drawing/caching API to Lua
2015-03-31 16:11:28 -04:00
lethosor 331be2b589 Make "keybinding list" accept a context
See #588
2015-03-30 19:03:16 -04:00
lethosor bbb41078e7 Expose PenArray dimensions and tiles to Lua 2015-03-28 18:35:07 -04:00
lethosor e2b6ae9beb Allocate Lua PenArray objects using an existing buffer 2015-03-28 11:27:47 -04:00
lethosor 99f4ea4d2b Implement a PenArray class for caching parts of rendered screens 2015-03-27 22:56:30 -04:00
lethosor ac2f537bf4 Merge branch 'async-zoom' into develop 2015-03-26 19:41:02 -04:00
Lethosor ee16c6d1ab Fix "delete" in console on OS X/Linux 2015-03-25 23:31:23 -04:00
lethosor 7f98a632ce Update xml 2015-03-25 17:58:00 -04:00
lethosor 01c6d05775 Add custom enabler::zoom_display() method (screen.zoom in Lua) 2015-03-25 17:55:56 -04:00
lethosor 42e4f584b9 Add SDL_SemWait and SDL_SemPost hooks 2015-03-25 16:08:25 -04:00
lethosor 38fa416ad1 Lua: Indent array values 2015-03-22 14:04:03 -04:00
lethosor 96e5c5d2fd Fix whitespace 2015-03-20 19:55:32 -04:00
lethosor b976053be0 Add Lua JSON library 2015-03-20 19:51:24 -04:00
lethosor f3508f82c1 Add jsonxx to depends/ 2015-03-20 15:45:38 -04:00
lethosor 625be319c9 Re-enable memory range logging on OS X if an environment variable is set 2015-03-19 19:37:10 -04:00
Lethosor 3639920a50 Merge pull request #575 from lethosor/game-type
Add gametype checks to World module
2015-03-13 22:25:37 -04:00
lethosor 016f67e83f Expose strerror to Lua 2015-03-10 16:32:43 -04:00
lethosor afca7419dc Add gametype checks to World.cpp 2015-03-09 20:08:21 -04:00
lethosor ea1c9fa0df Allow plugin exports to be defined in plugins (and looked up when needed) 2015-03-07 17:25:35 -05:00
lethosor 1570af3f4d Allow plugins to export additional functions through a class 2015-03-07 15:56:43 -05:00
lethosor 1591e67bf2 Replace backslashes with forward slashes in command names 2015-03-06 16:53:57 -05:00
lethosor 0c09feae5b Prevent backslashes from being used in command names 2015-02-27 18:46:29 -05:00
lethosor 45acf61b17 Update xml 2015-02-26 16:12:12 -05:00
lethosor 88ff51c755 Add PushEvent hook on OS X
See #553
2015-02-21 21:28:35 -05:00
lethosor bd809d7bbc Replace most interposed functions with dlsym wrappers on OS X 2015-02-21 21:28:35 -05:00
lethosor db9bcc27e4 Make plugin load errors more descriptive 2015-02-21 21:28:35 -05:00
lethosor 0f77a1a578 Move DFHack version to a separate (static) library
This allows the DFHack version to be changed without recompiling
everything
2015-02-19 12:08:23 -05:00
lethosor c80fbbc397 Remove AS prefixes from add-spatter.cpp
The actual cause of this crash was fixed in #558

See #205
2015-02-19 12:05:32 -05:00
lethosor c399377f08 Ensure that command usage information always ends with a newline 2015-02-16 20:17:47 -05:00
lethosor b7f15ef2d6 Update xml, stonesense for 0.40 ui_advmode_menu changes
Closes #552
2015-02-16 19:10:15 -05:00
lethosor 10cfef0553 Fix whitespace issues 2015-02-14 22:53:06 -05:00
lethosor a8a8fc43ef Add df2console() wrapper
Closes #522
2015-02-13 17:56:29 -05:00
lethosor 56dfc66309 Implement map load/unload scripts and allow additional scripts to be registered 2015-02-11 15:03:47 -05:00
lethosor 37f391ea6d Don't store runScript() in script environments 2015-02-10 17:22:16 -05:00
lethosor 337598e0d6 Restore lua environment persistence and update modified timestamp correctly
See #544
2015-02-10 16:36:21 -05:00
lethosor e3b67b2985 Use short plugin name in error messages when possible 2015-02-09 22:06:33 -05:00
lethosor 15d3b7831f hide/show: Provide feedback on unsupported platforms 2015-02-08 09:30:40 -05:00
lethosor a1691b6777 Merge remote-tracking branch 'warmist/console-hide' into develop
Conflicts:
	library/Console-darwin.cpp
2015-02-08 09:20:05 -05:00
expwnent e5e0d93ef1 Added modtools/reaction-product-trigger. 2015-02-02 02:39:05 -05:00
expwnent 712892fb71 Only reload and recompile Lua scripts if they have moved or been updated. 2015-02-02 02:24:43 -05:00
expwnent bf5e491647 Allow Lua scripts to be used as modules. 2015-01-31 22:43:54 -05:00
expwnent 92bd6349a7 Fix listdir_recursive on Windows. 2015-01-31 22:28:17 -05:00
expwnent e9b4fc513a Merge remote-tracking branch 'cdombroski/zone-plugin-cleanup' into temp
Conflicts:
	NEWS
	plugins/zone.cpp
2015-01-31 21:01:41 -05:00
expwnent aa5d7c11bc Merge remote-tracking branches 'lethosor/patch-12' and 'lethosor/fs-expansion' into develop
Conflicts:
	NEWS
2015-01-31 20:25:01 -05:00
lethosor 066adfdf95 Implement a function to list directories recursively 2015-01-30 17:29:17 -05:00
lethosor 3ab558c72d Check for init.lua existence properly
Fixes #501
2015-01-30 16:37:23 -05:00
Chris Dombroski f608235b1e Fix some Lua things 2015-01-29 19:56:50 -05:00
Chris Dombroski f2eec3198c Rename findPenPitAtCoord 2015-01-29 15:02:54 -05:00
Chris Dombroski 868a9944fd Update LuaApi for new Units/Buildings functions. 2015-01-29 14:59:06 -05:00
Chris Dombroski 86495270a6 Remove duplicate isMilkable definition. 2015-01-29 14:40:09 -05:00
Chris Dombroski 48b6cf1beb Export functions to Buildings.h 2015-01-29 13:57:50 -05:00
Chris Dombroski 1514233aaa Add missing null checks to Units.cpp 2015-01-29 13:57:50 -05:00
lethosor daf739fcec Remove FIFO support 2015-01-28 21:39:17 -05:00
Chris Dombroski c179f5b913 Extract some stuff from zone.cpp to plugins/Units.{h,cpp} 2015-01-28 21:28:32 -05:00
lethosor f98e2964e6 Fix a few Windows compilation errors 2015-01-28 20:05:24 -05:00
lethosor bebceffa5f Add Filesystem::listdir() 2015-01-28 19:15:58 -05:00
lethosor e8c0482fdc Add atime()/ctime()/mtime() 2015-01-28 18:18:06 -05:00
lethosor 2e3261565c Clean up Filesystem.h 2015-01-28 17:15:09 -05:00
expwnent 1445b0a919 Allowed Lua scripts to share variables with run_script and corrected dfhack.findScript so that it can find save-specific scripts. 2015-01-26 21:45:31 -05:00
expwnent 4c5b6a5282 For multiline comments, delete the backslash instead of changing it to a space. 2015-01-26 19:24:31 -05:00
expwnent 1993c5fb1b Added support for multiline commands inside dfhack.init and the script command. 2015-01-26 17:18:30 -05:00
expwnent 4e447fc19a Update XML. 2015-01-25 14:08:42 -05:00
expwnent dda780eb8e Update xml. 2015-01-23 21:53:35 -05:00
lethosor a9f2c5bc90 Change MOD_* to DFH_MOD_*
MOD_* constants are defined in Winuser.h on Windows
2015-01-17 08:56:49 -05:00
lethosor 592d42c665 Update xml (0.40.24 OS X offsets) 2015-01-17 08:54:31 -05:00
lethosor 4d194da530 Merge remote-tracking branch 'origin/develop' into 0.40.24-dev 2015-01-17 08:53:49 -05:00
expwnent 14aa68a27f Merge remote-tracking branches 'lethosor/remove-embark', 'lethosor/search-menus', 'lethosor/osx-package-name', 'lethosor/expose-modstate' and 'lethosor/patch-11' into develop 2015-01-15 22:24:05 -05:00
expwnent 8f4b766107 EventManager: Fix a crash bug with EQUIPMENT_CHANGE event. 2015-01-15 18:13:19 -05:00
lethosor 43d7f59e0b Bump version to 0.40.24-r0 and update xml 2015-01-14 15:09:23 -05:00
lethosor 077d149d64 Expose key modifier state to C++/Lua 2015-01-11 12:51:02 -05:00
expwnent 7e11ad821f Update xml. 2015-01-05 19:33:39 -05:00
lethosor d932c76242 Fix MapCache compiling error on Windows 2015-01-05 17:28:42 -05:00
lethosor 5de5d4420a Update xml 2015-01-05 17:01:03 -05:00
lethosor 182f317fcc Merge remote-tracking branch 'lethosor/plugload-posix' 2015-01-05 16:50:43 -05:00
lethosor 0cfe6a11a3 Merge remote-tracking branch 'eswald/alt-stuck'
Conflicts:
	NEWS
2015-01-05 16:50:16 -05:00
lethosor 0c768796e2 Merge remote-tracking branch 'danaris/fortplan'
Conflicts:
	plugins/buildingplan.cpp
2015-01-05 16:47:35 -05:00
lethosor 06029c92c2 Merge remote-tracking branches 'lethosor/export-dt-ini-0.40.21' and 'lethosor/patch-9' 2015-01-05 16:40:44 -05:00
lethosor 57f6a94133 Merge remote-tracking branch 'lethosor/osx-libstdc++'
Also update NEWS
2015-01-05 16:39:42 -05:00
lethosor 6e36b224d1 Merge remote-tracking branch 'ramblurr/stockpiles'
Also update stockpiles plugin to use REQUIRE_GLOBAL()

Conflicts:
	plugins/stockpiles.cpp
2015-01-05 16:16:29 -05:00
lethosor ca0860c3bd Merge remote-tracking branch 'lethosor/plugin-globals' 2015-01-05 16:05:40 -05:00
lethosor 983f096a60 Merge remote-tracking branch 'quipyowert/define-maxlayers' into 0.40.23-r1 2015-01-05 16:04:37 -05:00
lethosor 9f2bdc2bdc Disable excessive logging in Process-darwin.cpp 2015-01-05 15:58:02 -05:00
lethosor e7ee29b1e3 Clean up whitespace in Hooks-darwin.cpp 2015-01-05 15:57:34 -05:00
lethosor e0a8cc8537 Merge PlugLoad-linux.cpp and PlugLoad-darwin.cpp 2014-12-29 10:33:54 -05:00
Eric Wald a1c9f85a64 Repairing the stuck Alt key
SDL has been reporting the modifier key state incorrectly after alt-tabbing between the DF and DFHack windows.
Fixes issue #448, though more testing is warranted.
2014-12-28 21:43:48 -07:00
Lethosor 3c0ac70615 Remove output from filetype()
Not sure how this made it in, but it's causing problems with PRINT_MODE:TEXT (not to mention filling up stdout.log)
2014-12-27 15:05:43 -05:00
Timothy Collett 5547722414 Initial work on fortplan plugin, including separating out code that needs to be shared with buildingplan 2014-12-23 16:56:15 -05:00
lethosor 02f2d88f35 Add option to install newer libstdc++ on OS X
Also include a bzipped copy of libstdc++.6.dylib
Fixes #437
Fixes #436
Fixes #460
Fixes #462
2014-12-23 10:31:00 -05:00
expwnent 8e6fcac92e persist-table bug. 2014-12-07 07:56:33 -05:00
lethosor 5de3e6110a Merge remote-tracking branch 'origin/develop' into plugin-globals 2014-12-06 17:32:44 -05:00
Casey Link 7072252902 fix build error on windows
with certain #include permutations the lack of this define would
break the build on windows as windows.h pollutes the namespace with min
and max macros that conflict with std::min and std::max.
2014-12-05 12:35:24 +01:00
expwnent bd7cb578eb Update xml. 2014-12-04 23:31:05 -05:00
lethosor f1a863eb79 Use short plugin name 2014-12-03 23:27:52 -05:00
lethosor cac2245438 Update some plugins to use REQUIRE_GLOBAL 2014-12-03 23:26:54 -05:00
lethosor e206c242c6 Add a plugin_globals vector to aid in safety checks for plugins that require globals
This allows "using df::global::foo" to be replaced by "REQUIRE_GLOBAL(foo)",
and DFHack will refuse to load the plugin if df::global::foo is NULL
2014-12-02 21:32:04 -05:00
Alexander Gavrilov 760acf017b Update version to v0.40.19 2014-12-02 13:51:44 +03:00
quipyowert f4e8fa2f30 Define a static variable to fix debug mode crash.
Fixes #404
2014-12-01 17:19:20 -08:00
expwnent 83d3785735 Update xml. 2014-11-30 14:03:00 -05:00
expwnent 868bc4c7fb Update xml. 2014-11-30 11:32:46 -05:00
lethosor 445640f80c Allow commands invoked through command-prompt to access selected items/units/buildings
Fixes #273
2014-11-25 20:25:31 -05:00
expwnent 855d27745d Update xml. 2014-11-19 23:57:02 -05:00
lethosor a003ce7394 Print fatal errors to stdout on Linux/OS X 2014-11-17 15:12:33 -05:00
expwnent 97b44d5898 persist-table tweaks, delete debug print messages 2014-11-16 20:41:11 -05:00
expwnent 7560fbdb6b library/lua/persist-table.lua: now it uses metatables to make persistent memory storage even easier. 2014-11-16 17:06:59 -05:00
expwnent 798bec3ced Merge branch 'delvintemp' into develop 2014-11-15 16:28:52 -05:00
expwnent 2edc3594b8 Make it compile. 2014-11-15 16:03:36 -05:00
expwnent 3021fa47db Merge remote-tracking branches 'jjyg/develop', 'putnam/patch-4' and 'eswald/blank-histories' into develop
Conflicts:
	NEWS
2014-11-15 15:07:20 -05:00
expwnent 59ef4e0cc2 It is now possible to remove syndromes by SYN_CLASS. 2014-11-14 23:33:49 -05:00
expwnent 5e3bf9a494 Make it compile for OSX. 2014-11-14 22:21:03 -05:00
expwnent 4464d7318d EventManager: make REPORT events only trigger for new reports, not ones that already exist in the save. 2014-11-14 22:07:48 -05:00
Eric Wald c85d4994cf Preventing blank history files 2014-11-14 17:35:06 -07:00
expwnent d120e5aa84 Merge pull request #386 from ace13/develop
Missing includes.
2014-11-14 18:59:53 -05:00
expwnent 428fe6a400 interaction-trigger tweaks 2014-11-14 18:50:19 -05:00
expwnent e2f4d3e4cb Fix persist-table so that all data is persistently stored properly. 2014-11-14 18:49:40 -05:00
expwnent 828852c36f Made persist-table correctly clear its stuff after exiting a game. 2014-11-10 01:09:50 -05:00
expwnent 593424cd6d new Lua library for persistent maps of arbitrary degree. 2014-11-10 01:03:20 -05:00
expwnent 779ac3fd50 Updated interaction-trigger to work better. 2014-11-09 18:36:21 -05:00
Alexander "Ace" Olofsson 804aa8d398 Add missing <algorithm> include for std::min & std::max 2014-11-09 11:19:40 +01:00
expwnent 0f5efb47ae Update to 0.40.15. 2014-11-09 01:30:43 -05:00
expwnent fa401f8637 EventManager tweak. 2014-11-07 14:16:10 -05:00
expwnent dcdb6aae1b EventManager: properly deal with frame_counter getting reset. 2014-11-06 23:44:13 -05:00
expwnent 29d6bba669 Fix trackstop ambiguity complaints, update df-structures. 2014-11-02 11:55:01 -05:00
expwnent 4e0ad256a5 Update XML. 2014-11-02 04:06:51 -05:00
expwnent 87443035a9 Merge remote-tracking branch 'quietust/develop' into develop
Conflicts:
	plugins/manipulator.cpp
2014-11-02 04:05:51 -05:00
expwnent 4e38ec95b3 Merge pull request #354 from eswald/duplicate-onload
Removing duplicate world and map loading events.
2014-11-02 03:32:36 -05:00
expwnent 4b7c4f8c4b Merge pull request #356 from lethosor/disable-console
Allow console to be disabled by setting an environment variable
2014-11-02 03:31:35 -05:00
Quietust 8769af8935 Merge branch 'develop' of https://github.com/expwnent/dfhack into develop 2014-10-31 13:34:20 -05:00
Alexander Gavrilov 04ec2c9932 Update version to v0.40.14 and hack things so they compile.
Also make the find-offsets script less likely to crash if the
unit structure is misaligned and add more integrity checks.
2014-10-26 16:40:39 +03:00
Alexander Gavrilov beebd624e7 Last xml update for v0.40.13 2014-10-26 13:20:45 +03:00
lethosor e41a33ddea Allow console to be disabled by setting an environment variable 2014-10-06 17:10:33 -04:00
expwnent 0471294b1e Fix syndrome-util. 2014-10-04 21:54:07 -04:00
Eric Wald 6c9b94bcef Removing duplicate world and map loading events.
Saving a game in progress now goes through an extra viewscreen before reaching the condition that had been used to indicate whether the world was still valid, causing the core to emit bogus WORLD_LOADED, MAP_LOADED, MAP_UNLOADED, and WORLD_UNLOADED events.  Adding that viewscreen to the list of loading/saving screens prevents those duplicate events from firing.

Granted, if the game_cleaner viewscreen ever gets hit in play, this fix will cause more bogus events...
2014-09-30 23:02:35 -06:00
Alexander Gavrilov 6046d68639 Support std::fstream in data structures and add file_compressorst to xml.
One tricky thing is that fstream does not have operator=, so the new
file_compressorst requires a manually implemented one that skips it.
2014-09-24 22:47:04 +04:00
Alexander Gavrilov e6901a87d3 Update to 0.40.13 structures and fix compilation. 2014-09-19 00:05:15 +04:00
Timothy Collett 3678c5f649 New SDL hooks to support Stonesense updates 2014-09-16 21:16:52 -04:00
expwnent 0fbc7e22ee Merge remote-tracking branch 'lethosor/patch-4' 2014-09-16 17:21:39 -04:00
expwnent d425c2edf9 Merge remote-tracking branch 'lethosor/lua-printall-ipairs' 2014-09-16 17:08:45 -04:00
expwnent 5a1d88307f Merge remote-tracking branch 'eswald/stockpile-iterator' 2014-09-16 17:05:02 -04:00
expwnent 3e882f35b3 Merge remote-tracking branch 'lethosor/global-onload' 2014-09-16 16:53:31 -04:00
expwnent 8508dd6f04 Update xml. 2014-09-16 16:51:48 -04:00
lethosor 328b95c1ec Merge remote-tracking branch 'origin/develop' into global-onload 2014-09-14 11:56:07 -04:00
Lethosor d21cd54648 Add '@' documentation to dfhack.lua 2014-09-14 11:50:03 -04:00
Lethosor 9d3af4dcb6 Close file opened in load_patch() on success
Fixes #327
2014-09-10 15:09:57 -04:00
lethosor fadca0aef2 Add a variant of printall() that uses ipairs 2014-09-08 20:30:22 -04:00
lethosor 34d4537a11 Support for global onLoadWorld.init/onUnloadWorld.init scripts 2014-09-08 15:52:17 -04:00
expwnent c746d2a182 Update xml. 2014-09-08 15:46:25 -04:00
expwnent 248e4d837b Update xml. 2014-09-08 13:32:34 -04:00
expwnent f5039b37b8 Merge remote-tracking branch 'lethosor/osx-plug-dylib'
Conflicts:
	NEWS
2014-09-08 13:14:28 -04:00
Eric Wald 74e709ec19 Adding getStockpileContents to the Lua API. 2014-09-07 14:52:08 -06:00
Eric Wald 8631da7e4e Convenience method to collect a vector from StockpileIterator. 2014-09-07 14:10:27 -06:00
Eric Wald 567397df85 Stockpile iterator.
Efficient way to operate on all items stored on a stockpile.
Doesn't currently check whether the items match the stockpile settings,
but does ignore empty containers assigned to the stockpile.
2014-09-07 13:52:07 -06:00
Quietust cf06dc3503 Update to 0.40.11, fix a few devel plugins to build again 2014-09-04 08:26:45 -05:00
lethosor 9aee476c6e Make plugins use ".plug.dylib" extension on OS X 2014-08-30 09:21:19 -04:00
Quietust 1de9405ef3 Update some stuff to 0.40.10 2014-08-28 14:07:03 -05:00
Quietust 45b9e1b56a Update XML 2014-08-27 09:57:58 -05:00
Quietust deee486b81 Update Maps::SortBlockEvents to include spoors and item spatters 2014-08-20 10:51:58 -05:00
Quietust ae80ca9ec9 Merge branch 'develop' of github.com:DFHack/dfhack into develop 2014-08-20 10:32:59 -05:00
Quietust 5e434721ff Remove stray BOM 2014-08-19 13:47:05 -05:00
Quietust 4da333fca1 Fix Buildings module to work with ui.tax_collection.rooms change 2014-08-18 16:33:12 -05:00
expwnent 59e6607d8c Merge remote-tracking branch 'warmist/dev_building_hacks' into develop 2014-08-16 10:26:24 -04:00
Warmist f04b93210a Bug fixing.
Fixes for "tab" in hacked buildings.
2014-08-16 16:58:09 +03:00
Warmist 6868cab1fe Exposed dfhack.jobs.linkIntoWorld. Simplified eventful and gui.dwarfmode for sidebar use/creation. 2014-08-16 16:58:01 +03:00
JapaMala 493dd47383 Updated df-structures and isoworld 2014-08-15 19:28:03 +05:30
JapaMala 5add8c433d Merge branch 'develop' of github.com:DFHack/dfhack into remote_reader
Conflicts:
	plugins/remotefortressreader.cpp
2014-08-15 19:15:00 +05:30
Quietust ebda2d8472 Fix ageItem to work correctly, and update XML 2014-08-15 08:13:15 -05:00
expwnent 38cc604861 Fixed bug with Lua printing buffering too long sometimes in Windows. 2014-08-15 05:54:54 -04:00
Quietust 8a9e3d1a72 Plugin cleanup - always do "using df::global::[foo]". Also, get rid of old 0.34.11 binpatches 2014-08-11 15:07:52 -05:00
Alexander Gavrilov b0e1b51d2a Change version to v0.40.08 2014-08-11 23:49:24 +04:00
Alexander Gavrilov 2471c4a68e Add a new API for converting between interface_key and string characters.
It's necessary now that the simple linear arrangement is broken.
2014-08-11 14:23:19 +04:00
Alexander Gavrilov 002bd5240b Bump version to v0.40.07 and update find-offsets to new pressure plate UI. 2014-08-11 14:14:42 +04:00
lethosor 0983728e14 Implement Ctrl-T, ignore unrecognized control characters 2014-08-09 21:54:47 -04:00
lethosor 71236afa42 Implement readline-style Ctrl-U and Ctrl-Y 2014-08-09 21:54:47 -04:00
lethosor e71fc0455c Fix console warnings on Linux 2014-08-09 21:54:46 -04:00
lethosor fc24d24ccc Merge Console-linux and Console-darwin into Console-posix 2014-08-09 21:54:46 -04:00
JapaMala 36435ca8cf Merge branch 'develop' of https://github.com/quietust/dfhack into remote_reader
Conflicts:
	library/modules/Items.cpp
	library/modules/MapCache.cpp
	library/modules/Maps.cpp
	library/modules/Materials.cpp
	library/modules/Translation.cpp
	plugins/CMakeLists.txt
2014-08-08 20:54:44 +05:30
JapaMala 756485c4db Added support for getting a list of plant growths with fake material names. 2014-08-08 20:35:57 +05:30
Quietust 17b19bfcdc Update structures 2014-08-06 08:28:02 -05:00
JapaMala b7c871eed7 gave t_matglossPair a few operator overloads so it can be used in std::map 2014-08-02 17:12:19 +05:30
JapaMala 08da62392e Fixed a mistake where MapCache was using the wrong range for root depth. 2014-08-02 17:09:59 +05:30
Quietust 2928f15629 Update fastdwarf to work properly in 0.40 2014-08-01 08:45:23 -05:00
Quietust 612bcc65c8 Fix build, update XML 2014-07-29 16:43:29 -05:00
Quietust 1450298484 assumed_identity -> identity 2014-07-29 16:30:22 -05:00
Quietust d6162cd189 death_info -> incident 2014-07-29 16:26:14 -05:00
Alexander Gavrilov 0182e0c980 Fix SC_WORLD_LOADED/UNLOADED now that loading and saving takes many frames.
During the loading or saving screen, consider the map and world as not
loaded, because they are likely only partially valid. This fixes errors
from the log-region script.
2014-07-28 08:57:55 +04:00
Alexander Gavrilov 1c409975de Update the version to v0.40.05 2014-07-28 08:15:03 +04:00
Alexander Gavrilov 4902c577b3 Fix some crashes when running without globals and update structures. 2014-07-24 23:10:37 +04:00
JapaMala bc5e0f6ad6 Made DFHack buildable. Also added plant proto definitions 2014-07-23 19:57:47 +05:30
Quietust 9435d8f4d9 Fix crashes caused by missing globals 2014-07-21 19:14:43 -05:00
Quietust 38cdb37433 Update plant_tree_info field names 2014-07-21 14:46:51 -05:00
Quietust e711605413 Some minor corrections 2014-07-21 13:26:34 -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
JapaMala b598cbb0dd Merge branch 'develop' of github.com:DFHack/dfhack into develop 2014-07-20 16:43:00 +05:30
JapaMala a14caa53d0 Fixed mapcache reading plants in for 0.40.01 onwards. 2014-07-20 16:41:20 +05:30
expwnent a8f810cc3b Lots of tweaks. 2014-07-09 06:21:52 -04:00
expwnent 0a16bc2e12 Merge remote-tracking branch 'origin/perSaveScripts' into scriptOrganization
Conflicts:
	plugins/CMakeLists.txt
2014-07-07 09:01:07 -04:00
expwnent 3c06f3bada Allowed per-save script folders. 2014-07-07 08:50:40 -04:00
expwnent 5404b69476 Tweak repeat.lua. 2014-07-03 20:32:15 -04:00
expwnent e28a42b848 Fixed a problem with syndromeUtil, renamed to syndrome-util, and made add-syndrome use proper conventions. 2014-07-03 15:18:00 -04:00
expwnent 649dcd1413 EventManager tweak: make it report the correct invasion id. 2014-07-03 14:37:13 -04:00
expwnent 376bcc6020 create-item script 2014-07-03 12:40:07 -04:00
expwnent 2fb8faf3e6 Added Items::createItem function. 2014-07-03 10:39:20 -04:00
expwnent d8c3a05f42 Made EQUIPMENT_CHANGE event trigger for new units. 2014-07-03 08:10:12 -04:00
expwnent 9d2c7a1abc Tweak to repeatUtil. 2014-07-03 08:09:47 -04:00
expwnent d048335a80 Tweaked item-trigger. 2014-07-03 06:01:58 -04:00
expwnent 81c87d0921 EventManager: INTERACTION event for unit interactions. 2014-07-03 04:55:12 -04:00
JapaMala e04ab11659 Merge branch 'develop' of github.com:DFHack/dfhack into develop
Conflicts:
	library/xml
	plugins/stonesense
2014-07-02 23:18:55 +05:30
JapaMala 516121d4f8 Fixed the getprofession behavior in adventure mode. Now it checks for the current adventurer's race instead of the fortress race. 2014-07-02 23:07:24 +05:30
expwnent 8f43b97284 EventManager tweaks. 2014-07-01 09:02:20 -04:00
expwnent 4ac32cfd74 EventManager: made UNIT_ATTACK trigger for severed body parts. 2014-07-01 08:58:48 -04:00
expwnent d765de4546 Merge remote-tracking branch 'lethosor/lua-runcommand2' into scriptOrganization 2014-07-01 02:05:14 -04:00
expwnent 1c0ae94539 processArgs now detects duplicate args. 2014-07-01 00:57:24 -04:00
expwnent 2ed7960f96 Tweaked utils.lua::processArgs to allow specification of a table of acceptable argument names. 2014-07-01 00:55:52 -04:00
expwnent c3c025c034 Added Lua subroutine for standardized argument processing. 2014-06-30 02:19:50 -04:00
expwnent 961d033ade EventManager: unload event for convenience. 2014-06-29 10:03:55 -04:00
Alexander Gavrilov 8a3050a1c0 Notify the user when dfhack.init is missing, and fall back to example. 2014-06-28 17:08:14 +04:00
Alexander Gavrilov 3744fc3575 Update structures 2014-06-28 16:59:09 +04:00
expwnent a62b15ccd2 Revert "Allowed dfhack.timeout tick events to be queued before a world is loaded."
This reverts commit ecd75e9b3e.
2014-06-28 03:06:19 -04:00
expwnent f12aa3665b Removed the temporary lua events because EventManager does them better. 2014-06-28 02:46:08 -04:00
expwnent ceae634954 Squashed EventManager commented out thing I don't need anymore. 2014-06-28 02:41:00 -04:00
expwnent 8e7e87ac73 Added UNIT_ATTACK event to EventManager and exposed it to Lua. 2014-06-28 02:31:34 -04:00
expwnent c635632ae7 EventManager.cpp: fix indentation. 2014-06-27 22:09:01 -04:00
expwnent 2443568998 Merge branch 'develop' into scriptOrganization 2014-06-27 22:03:09 -04:00
lethosor 830b39e13b Non-silent version of Lua's run_command 2014-06-27 21:58:36 -04:00
Quietust fc7ac9b47f Update XML and sync plugin 2014-06-27 13:01:46 -05:00
expwnent ecd75e9b3e Allowed dfhack.timeout tick events to be queued before a world is loaded. 2014-06-27 06:49:29 -04:00
expwnent 0db0244d08 Added add-syndrome script to modtools and fixed syndromeUtil so it actually works. This should make it so that event hooks only have to be able to run scripts instead of run scripts and add syndromes. 2014-06-27 05:47:52 -04:00
expwnent 187ce3c58b Fixed the organization of my new lua modules. They now go in library/lua instead of where plugin lua modules go. Updated scripts accordingly. 2014-06-27 02:43:05 -04:00
Alexander Gavrilov 17ed08cfe5 Fix the OSX image base address so that binary patches work correctly. 2014-06-26 18:28:50 +04:00
Alexander Gavrilov 6f162a4e72 Verify that mkmodule is called with the correct module name. 2014-06-26 18:11:05 +04:00
Alexander Gavrilov 9cb913b121 Update structures 2014-06-26 17:24:11 +04:00
expwnent 7313c18a2a EventManager/eventful: added ON_REPORT event and exposed it to Lua. 2014-06-23 09:15:46 -04:00
JapaMala 3f717af0b7 Merge branch 'develop' of https://github.com/DFHack/dfhack into develop
Conflicts:
	library/xml
2014-06-21 16:43:44 +05:30
expwnent 036aae060b Merge lethosor stuff. For some reason, git's auto merge message didn't happen because of git-stash shenanigans. Oh well. 2014-06-19 22:58:17 -04:00
Lethosor ec64a787c6 Use _getcwd on Windows 2014-06-19 22:34:40 -04:00
Lethosor 73fdb8b125 Fix Windows compile-time error 2014-06-19 21:24:16 -04:00
lethosor ef69522d93 Merge branch 'develop' into filesystem-module-pr 2014-06-18 15:45:42 -04:00
Alexander Gavrilov 2db73a407d Merge branch 'manipulator_show_squad' from git://github.com/pierredavidbelanger/dfhack.git into develop 2014-06-17 10:39:26 +04:00
Alexander Gavrilov 32d8efad54 Merge branch 'lua-runcommand' of git://github.com/lethosor/dfhack into develop 2014-06-17 10:27:50 +04:00
lethosor fb922fab37 Handle invalid arguments to runCommand 2014-06-16 11:40:26 -04:00
lethosor d538e13450 Allow runCommand arguments to be passed as a table internally 2014-06-16 11:16:35 -04:00
Alexander Gavrilov b029690550 Update structures 2014-06-16 13:48:58 +04:00
lethosor 6fa478de22 Filesystem module
Implements a handful of filesystem-related functions (e.g. chdir, mkdir)
in C++ and Lua.
2014-06-15 22:38:17 -04:00
JapaMala db2d59ac77 Started work on a generic visualizer socket client plugin. Currently only sends over inorganic and creature materials, nothing else. 2014-06-15 10:10:12 +05:30
Pierre-David Bélanger e0808c8c96 Use squad::find instead of indexing the vector 2014-06-10 22:38:32 -04:00
lethosor 2a01259192 Fix runCommand crash, return output and result 2014-06-10 21:38:21 -04:00
lethosor 143b1e3469 Lua runCommand improvements
* Return error codes (e.g. CR_FAILURE) when a command fails instead of output
* Make dfhack.runCommand() take a list of arguments as well
2014-06-10 13:41:01 -04:00
lethosor e4876ed752 Merge branch 'develop' into lua-runcommand 2014-06-10 13:12:07 -04:00
Alexander Gavrilov 08b4279c4d Document better how to access fields of the interposed class. 2014-06-10 13:10:10 +04:00
Alexander Gavrilov 0be30b807c Merge branch 'console-move-word' of git://github.com/lethosor/dfhack into develop 2014-06-10 12:53:43 +04:00
Alexander Gavrilov 0e3fb79f0e Update structures 2014-06-10 12:52:17 +04:00
Pierre-David Bélanger bdcc00f6f7 Util method (in the Units class) to get a unit squad name (the translated name, or alias if set) 2014-06-09 21:51:52 -04:00
lethosor 91a93a00d2 Add dfhack.run_command (Lua)
Simplified version of runCommand
2014-06-07 20:31:20 -04:00
lethosor 2242d42c9c Implement runCommand in Lua API 2014-06-07 20:15:49 -04:00
Quietust 7de0b2dd39 Merge pull request #255 from quietust/develop
Fix problems with NONE for item types and subtypes
2014-06-03 08:44:19 -05:00
Alexander Gavrilov 0a0358a8c1 Update structures 2014-06-03 12:59:55 +04:00
Warmist dedd7e4185 Adds new console methods and commands to hide/show console. Only on windows (for now?) 2014-05-26 18:42:04 +03:00
lethosor bdca1ee709 Linux: Extended back/forward word sequences 2014-05-26 10:03:28 -04:00
lethosor b14ef95dec Merge branch 'console-move-word' into console-move-word-linux 2014-05-26 10:01:04 -04:00
lethosor d320fe71d1 Implement extended arrow key sequences 2014-05-25 23:39:34 -04:00
lethosor 58b9c02ce5 Migrate esc-b/f sequences to Linux 2014-05-25 22:10:40 -04:00
lethosor 1fcaac9d2e OS X Console: Implement back/forward one word escape sequences 2014-05-25 21:52:16 -04:00
Quietust e483e7439f Fix problems with NONE for item types and subtypes 2014-05-22 08:18:01 -05:00
Alexander Gavrilov fe93aba612 Update structures 2014-05-11 13:36:36 +04:00
Alexander Gavrilov 415cdad489 Make using new for allocating DF objects with vtables a compile-time error.
When done from plugins, it doesn't correctly initialize the vtable
because of some weird things MSVC does, so the only safe way is to
use df::allocate<df::foo>(). For consistency, it is also enforced
for code in the main library. It reveals the issue in the digging
invaders plugin, first found by warmist.

This change is linked to a modification in df-structures codegen.
2014-04-30 21:28:02 +04:00
Alexander Gavrilov 98325757e2 Fix signed-unsigned mismatch warnings in the new item value code.
Unsigned comparison allows catching negatives in the same check too.
Also, it didn't check the values in getValue.
2014-04-30 20:44:22 +04:00
Quietust 0f4684f29d Add Items::getItemBaseValue and Items::getValue, available from Lua 2014-04-25 11:04:21 -05:00
Quietust 57fbb1004b Assorted cleanup 2014-04-23 08:23:34 -05:00
Quietust c3d45c3a1e Add Job::getName(job *), also available from Lua 2014-04-23 08:03:10 -05:00
Alexander Gavrilov 1d1ede279f Update structures 2014-04-21 09:52:07 +04:00
Alexander Gavrilov 6bef167f83 Add a couple of useful scripts and fix two missing NULL checks.
- A script to unstick jobs trying to build walls from the same tile.
- A devel script for viewing the path a unit is currently following.
2014-04-21 09:24:05 +04:00
Alexander Gavrilov c27c38e4c0 Remove tired or hungry siege operators from duty when at peace.
The threshold is set at the level when they start to blink - normally
they would continue on with the job until they get a thirsty/hungry
thought, but immediately run off to eat if they lose the job (thus
refusing to load the engine after firing it). The code checks for
active sieges and whether there is a free replacement unit.
2014-04-15 21:52:39 +04:00
Alexander Gavrilov fc9826389b Account for meandering movement when predicting unit path in siege engine.
The movement is random, but there is an average slowdown coefficient.
2014-04-15 19:50:23 +04:00
Alexander Gavrilov 55cea36c76 Use the new API to produce combat reports for aimed siege engine attacks.
This requires exposing the actual operator unit to lua code.
2014-04-15 19:50:23 +04:00
Alexander Gavrilov 7844907204 Add new API functions for creating announcements and combat reports.
Allow specifying the announcement flags directly, and adding unit
combat reports. Also, make announcement functions write the message
to the game log.
2014-04-15 19:50:23 +04:00