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
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
Alexander Gavrilov
b56c3a95a6
Fix some signed/unsigned mismatch warnings and whitespace in Job module.
2014-04-15 19:50:23 +04:00
Quietust
22dab5d807
Update XML, fix several scripts that were broken by field name changes
2014-04-14 12:30:34 -05:00
Alexander Gavrilov
ddd56d8ea6
Update the structures.
2014-04-12 17:21:35 +04:00
Alexander Gavrilov
7aecffe0cd
Update structures and fix broken things.
2014-04-04 22:34:39 +04:00
Alexander Gavrilov
788bc55096
Fix a mistake in the lua resize() method of BitArray.
2014-04-04 22:33:05 +04:00
Alexander Gavrilov
a09e132107
Support using multiple lua init scripts per save.
...
This should make it easier to add and remove init script code by
automated means, or install multiple mods that need such code.
2014-03-31 16:00:55 +04:00
Quietust
e620ae765c
Add missing import/export info for MersenneRNG::unitvector<>
2014-03-25 13:30:21 -05:00
Alexander Gavrilov
ec14b2d1e9
Merge remote-tracking branch 'warmist/dev-modmanager' into develop
2014-03-24 20:07:02 +04:00
Alexander Gavrilov
a01939fce6
Sync structures.
2014-03-24 19:45:27 +04:00
Warmist
b030548156
Added directory listing to lua api (internal category).
...
added mod manager and updated readme/news
2014-03-04 18:01:44 +02:00
Alexander Gavrilov
36b09c950d
Actually export to lua a few functions that are documented as available.
2014-02-28 09:41:04 +04:00
Quietust
72eb366997
Merge changes, also fix Windows build (missing header)
2014-02-27 15:58:15 -06:00
Quietust
dd268d43d9
Merge branch 'master' of https://github.com/jjyg/dfhack
2014-02-27 15:49:18 -06:00
Quietust
5a158b21cf
Update plugins to match fixed field names in cage/civzone
2014-02-27 14:51:45 -06:00
jj
6d0e6cf7d5
remove old unused code from when dfhack was out of process
2014-02-26 12:44:10 +01:00
Alexander Gavrilov
7bdb687e4a
Support calling a lua function via a protobuf request.
...
Previously the only way to call lua code was to call scripts
and parse their output to the stream, which is cumbersome.
2014-02-10 20:09:06 +04:00
Alexander Gavrilov
8800cf6f40
Export functions for converting between UTF-8 and CP437 to lua.
2014-02-10 18:54:52 +04:00
jj
387cc983f9
Merge branch 'osx_shenanigans' of git://github.com/tareqak/dfhack
2014-02-02 23:50:21 +01:00
jj
7df9957941
dfhack-run: prevent duplicate "not a recognized command" error message
2014-01-27 15:36:34 +01: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
Tareq A Khandaker
f0eeba93ce
DFHack compiles under OS X now.
2014-01-25 03:21:56 -05:00
jj
ce33973f0f
Merge branch 'master' of github.com/quietust/dfhack
2013-12-24 14:07:08 +01:00
Alexander Gavrilov
53bd112515
Hide fake historical figures from legends xml export.
2013-11-07 12:27:53 +04:00
Alexander Gavrilov
b2819ea869
Fix wrong argument iteration bounds in dfhack.matinfo.find().
2013-11-07 11:40:26 +04:00
jj
04dce1aa7f
MaterialInfo: fix decoding for COAL subtypes
2013-11-05 00:31:32 +01:00
expwnent
15c2d99a3e
Update xml.
2013-10-25 14:23:55 -04:00
expwnent
329741f235
EventManager: added EQUIPMENT_CHANGE event and exposed it to lua.
2013-10-24 19:32:52 -04:00
expwnent
ce1bb1e95b
Merge remote-tracking branch 'putnam/master' into 0.34.11-r4
2013-10-20 23:27:12 -04:00
expwnent
4dbcee9560
EventManager: be smarter about removing things while iterating.
2013-10-20 23:16:21 -04:00