Commit Graph

221 Commits (36479dbcda636ba983cc05ae4d2cef1c7fb2812f)

Author SHA1 Message Date
lethosor c2267013b4 plug: List enabled state 2015-10-03 13:42:20 -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 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 af90d14cb2 Use shenanigans to make a certain table const. 2015-09-21 17:24:51 -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 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 a5f15b279c plug: Include deleted plugins in full list 2015-08-14 19:32:41 -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 f46d3d137f Allow multiple contexts to be specified when adding keybindings 2015-08-06 20:41:54 -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 27295a9b6f Log DFHack and save-specific information on world (un)load events 2015-07-23 23:24:00 -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 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 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 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 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 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 331be2b589 Make "keybinding list" accept a context
See #588
2015-03-30 19:03:16 -04: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 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 10cfef0553 Fix whitespace issues 2015-02-14 22:53:06 -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 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
lethosor bebceffa5f Add Filesystem::listdir() 2015-01-28 19:15:58 -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
lethosor fd1ba80e1f Change MOD_* to DFH_MOD_*
MOD_* constants are defined in Winuser.h on Windows
2015-01-17 09:05:45 -05:00
lethosor 077d149d64 Expose key modifier state to C++/Lua 2015-01-11 12:51:02 -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 a003ce7394 Print fatal errors to stdout on Linux/OS X 2014-11-17 15:12:33 -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
lethosor e41a33ddea Allow console to be disabled by setting an environment variable 2014-10-06 17:10:33 -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
lethosor 34d4537a11 Support for global onLoadWorld.init/onUnloadWorld.init scripts 2014-09-08 15:52:17 -04: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 4902c577b3 Fix some crashes when running without globals and update structures. 2014-07-24 23:10:37 +04:00
Quietust 9435d8f4d9 Fix crashes caused by missing globals 2014-07-21 19:14:43 -05:00
expwnent 3c06f3bada Allowed per-save script folders. 2014-07-07 08:50:40 -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
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
jj 6ad8d128ba use non-interactive console when calling dfhack.init in TEXT mode 2014-01-27 15:36:25 +01:00
jj 6b6164c099 call dfhack.init even in TEXT mode 2014-01-27 14:51:22 +01:00
expwnent 57fc0f3e89 Merge remote-tracking branch 'angavrilov/master' into 0.34.11-r4
Conflicts:
	NEWS
	library/xml
	plugins/CMakeLists.txt
	plugins/autoSyndrome.cpp
2013-10-19 20:19:29 -04:00