Pauli
0bc2b3ab1b
Update toSimpleString to use a the new builder API
2018-06-14 21:20:54 +03:00
Pauli
2b79b4cce7
Use jsoncpp 1.8.4 as a submodule
...
This makes jsoncpp a submodule that can be build directly from git
sources. This changes depends/jsoncpp to depends/jsoncpp-sub to avoid
filename conflict if someone tries to use git bisect.
jsoncpp library name changes to jsoncpp_lib_static.
jsoncpp version is the latest tagged release.
2018-06-14 21:20:46 +03:00
lethosor
10e6016989
Merge branch 'units_dead' into develop
...
Closes #1297
2018-06-13 15:38:35 -04:00
PatrikLundell
f329774059
dead & killed flag separation
...
squashed 4 commits from #1297
2018-06-13 15:37:45 -04:00
Pauli
8484b5dc8a
Add parameter type checks to printf style functions
...
gcc supports type checks for printf parameters which can catch some hard
to reproduce bugs. Possible bugs happen when the parameter value is
intepreted differently to the variable value.
Example warnings follow
../library/LuaWrapper.cpp:1011:86: warning: format ‘%llu’ expects argument
of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t
{aka long unsigned int}’ [-Wformat=]
../plugins/follow.cpp:159:35: warning: format not a string literal and no
format arguments [-Wformat-security]
2018-06-11 19:27:35 +03:00
lethosor
03968db344
Fix GCC warnings in 'tweak kitchen-prefs-all' and dev plugins
2018-06-01 10:02:38 -04:00
lethosor
7a04fefb0b
Remove Vermin module (unused and obsolete)
2018-06-01 00:22:10 -04:00
lethosor
17ba492992
Add some exclusion functions to Kitchen module, expose to Lua, fix build
2018-05-17 19:34:03 -04:00
lethosor
97a79893e7
Change Kitchen.{h,cpp} to title case
2018-05-17 11:08:13 -04:00
lethosor
e9ec08f419
Add Buildings::getRoomDescription(), moved from search plugin, +cleanup
2018-05-12 17:00:21 -04:00
lethosor
c15571caa0
Move isRouteVehicle, isSquadEquipment from workflow to Items module
2018-05-12 14:49:30 -04:00
lethosor
a34b34d3cb
Move a few item functions from autotrade/stocks into DFHack::Items
2018-05-12 12:04:46 -04:00
lethosor
272cdcb2b5
Add function names to NullPointer and InvalidArgument exceptions
2018-05-11 09:49:27 -04:00
lethosor
2a52582c1f
Add Gui::inRenameBuilding
2018-05-09 10:23:05 -04:00
lethosor
a708b0b303
Add some includes in DataDefs.h
2018-04-19 21:11:43 -04:00
lethosor
2bf9632000
Merge remote-tracking branch 'origin/develop' into complex-enum
2018-04-11 10:23:32 -04:00
lethosor
61539bf345
Lua: implement key lookup and ipairs for complex enums
2018-04-09 11:04:37 -04:00
lethosor
ae6b8a16e8
Handle most complex enum metadata on the C++ side
2018-04-09 03:00:58 -04:00
Ben Lubar
9cbba0ae01
Hide warnings about non-virtual destructors from df-structures.
2018-04-05 14:46:28 -05:00
lethosor
eb22d5c38e
Add ABI version symbol to plugins
2018-03-10 16:55:00 -05:00
lethosor
f2ff609e1c
Initial 0.44.06 support, update xml
2018-03-10 16:18:15 -05:00
lethosor
8779168c96
DFHACK_PLUGIN: qualify Plugin
2018-02-16 02:17:58 -05:00
Japa
7b19c9b8f0
Merge remote-tracking branch 'remotes/DFHack/develop' into RemoteServerUnsafe
...
# Conflicts:
# plugins/proto/RemoteFortressReader.proto
# plugins/remotefortressreader/remotefortressreader.cpp
# scripts
2018-02-12 20:19:40 +05:30
Ben Lubar
7426f08504
Fix Error.cpp compile for Windows
2018-02-07 10:40:52 -06:00
lethosor
c1e2633e17
Refactor DFHack exception classes
...
Move implementations out of MiscUtils.cpp to Error.cpp and make what() return a
more useful description
2018-02-05 19:18:35 -05:00
lethosor
1ba5477b63
Add designation priority support to MapCache and dig plugin
...
Fixes #481
2018-01-21 19:27:16 -05:00
lethosor
0332a5c25a
Replace a call to abort() with a VTableMissing exception
...
This makes some scripts crash less when the viewscreen vtable is unavailable,
for example.
2017-12-25 20:13:15 -05:00
Quietust
4edc7a6f43
update DataFuncs to support vmethods with 12-13 parameters ( #1192 )
2017-12-02 21:41:44 -06:00
Japa Mala Illo
a0634f9ee0
Merge remote-tracking branch 'DFHack/develop' into RemoteServerUnsafe
2017-11-25 11:50:56 +05:30
lethosor
2c95ac411e
Update xml and all uses of job_handler
2017-11-25 00:59:59 -05:00
Japa Illo
3c5483df03
Change tabs to spaces to satisfy travis.
2017-10-04 09:48:12 +05:30
Japa
8dffd48f70
Add a flag for functions considered safe for a remote computer to call.
2017-10-02 19:55:16 +05:30
Ben Lubar
17a7885ef2
Fix a bunch of 64-bit Windows warnings
2017-07-21 13:30:05 -05:00
lethosor
10e13c532a
Add "tweak cage-butcher" and some extra Building module functions
...
* Buildings::markedForRemoval()
* Buildings::getCageOccupants()
Closes #906
2017-06-25 15:27:21 -04:00
lethosor
ae809afde7
Add Gui::refreshSidebar()
...
This handles feeding CURSOR_DOWN_Z and CURSOR_UP_Z properly, avoiding issues
when on the lowest z-level.
2017-06-23 00:02:21 -04:00
lethosor
0796fafb2a
Add new built-in "alias" command
...
Closes #701
2017-06-19 00:15:20 -04:00
lethosor
27343e3253
Add unit and tile visibility functions
2017-06-10 21:54:08 -04:00
lethosor
778ffb0971
More Units module cleanup, modernize getUnitsInBox
2017-06-10 21:02:30 -04:00
lethosor
1321a64613
Remove lots of old/unused functions from the Units module
2017-06-10 17:21:34 -04:00
lethosor
ba68683964
Fix ncurses wgetch() on OS X
...
Ref #731
2017-06-08 13:05:31 -04:00
lethosor
43c4a88068
Move some checks in paintTile/readTile after hooks are called
2017-06-02 00:40:14 -04:00
lethosor
05f322ca30
Merge remote-tracking branch 'lethosor/lua-dmdims' into develop
2017-06-01 23:34:35 -04:00
lethosor
939aff3231
readTile(): add hook support and map parameter
2017-05-31 12:12:15 -04:00
lethosor
55931703ac
Designate the correct tile for trees with multi-tile trunks
...
DF always designates the southeast trunk tile, while plant.pos is the center,
which is sometimes inaccessible (see #1014 )
2017-05-05 21:25:25 -04:00
lethosor
d3c496cc2b
Add getSelectedPlant() and related functions
...
Currently only works with the center tile of multi-tile trees
2017-05-05 14:45:46 -04:00
lethosor
1e469453fc
Add Designations module, currently supporting plant/tree designations
...
This makes it easier for tools to properly handle designating and undesignating
trees for chopping and plants for gathering, which changed significantly in
0.40.20.
Ref #531 (?), #656 , #1014 , #1018 , #1030 , #1076
2017-05-04 21:47:12 -04:00
lethosor
71b553b305
Add a few functions to retrieve unit social activities
2017-04-28 17:25:58 -04:00
lethosor
a10d4ae226
Add viewscreen::feed_key method
2017-02-11 16:53:50 -05:00
lethosor
538b07d214
Update xml and fix knowledge_scholar_category_flag::value() custom method
...
Allows bitfields within unions (#1047 , dfhack/df-structures#169 )
2016-12-27 23:24:22 -05:00
David Corbett
acdb369aa8
Avoid non-trivial bitfield constructors
2016-12-09 13:41:14 -05:00
lethosor
8521b830b2
Merge remote-tracking branch 'CannibalVox/job_remove' into develop
2016-12-05 15:24:37 -05:00
Stephen Baynham
595f3857b6
Reverse the param order of these two methods
...
The current way doesn't match other Job module methods
2016-12-01 20:13:49 -08:00
Stephen Baynham
7920f71517
Bad formatting
2016-11-25 00:25:18 -08:00
Stephen Baynham
e490afdf00
Rebuilt slightly to offer bool return val
...
We fail on unknown general ref types now, without modifying the job at
all yet
2016-11-24 22:36:11 -08:00
Stephen Baynham
74f5df99db
Add job remove method
...
Job remove eliminates a job's worker & holder references, if any, puts
the worker on cd, if appropriate, removes the job's postings, eliminates
the job from the global linked list, and then finally deletes it. This
code was tested by incorporating it into autochop and it does make the
plugin work. However, chop jobs don't have holder building references,
and anyway, with DF being 90% edge case by volume, this could use a heck
of a lot more testing.
I saw elsewhere code that prevented worker removal if the job was a
special job, and that made me feel funny so I made the job remove method
not work if the job is a special job.
2016-11-17 19:54:41 -08:00
lethosor
4c21bbd5ae
Add Lua::TableInsert() helper
2016-10-15 14:55:48 -04:00
lethosor
8a138fcc4c
Avoid polluting global namespace in MapCache.h
2016-10-15 14:53:10 -04:00
Japa
08cc9f3188
Cast size_t to int explicitly to avoid compiler warning C4267
2016-10-15 10:31:38 +05:30
Japa
98ab357df0
Use size_t in both path methods, to avoid warning C4267
2016-10-15 10:17:38 +05:30
lethosor
70d3c07cdb
Initial lua getDwarfmodeViewDims rewrite
2016-10-07 23:51:58 -04:00
lethosor
a5338d2f59
Fix rebase_delta type mismatch
...
See #984 . GCC wasn't complaining about this on x64 for some reason.
Also reordered includes.
2016-09-28 20:43:02 -04:00
lethosor
9e4a6d7591
Update default base address on 64-bit Linux
2016-08-18 17:28:18 -04:00
lethosor
e965f5318f
Replace many includes with forward declarations in modules/Maps.h
2016-08-13 21:44:01 -04:00
lethosor
02eef95147
Fix base address for Darwin x64
2016-08-09 20:00:31 -04:00
lethosor
e22b3b1de7
Use non-fixed-width types in integer identity_traits definitions
...
In some situations (e.g. 32-bit Linux), "intptr_t" is defined as "int", which is
equivalent to "int32_t", leading to issues with duplicate definitions. In other
situations with GCC, "intptr_t" is "long", which isn't covered by any intNN_t
types. Also, definitions for "long" already had to be added on Windows, because
no fixed-width types in MSVC are equivalent to "long".
Switching to non-fixed-width types should hopefully cover all of these
situations. If this doesn't cover any integer types that we need, it will
be caught quickly, e.g. by references to integer_traits<T> in LuaWrapper.cpp.
2016-08-08 11:46:20 -04:00
lethosor
79377669a1
Merge remote-tracking branch 'NCommander/dwarfvet' into develop
2016-07-29 16:25:53 -04:00
lethosor
158f18106f
Merge remote-tracking branch 'NCommander/vs2015' into develop
2016-07-29 15:30:32 -04:00
lethosor
55970a71ab
Fix Lua::Push for enums
2016-07-29 11:06:16 -04:00
lethosor
b7856fd9f2
Use enable_if for Lua::Push specializations
2016-07-28 22:04:46 -04:00
lethosor
7b7f7a1b79
Fix support for integer fields in Lua 5.3
2016-07-28 16:36:02 -04:00
lethosor
41a81f9021
Fix some more warnings (GCC 4.8)
2016-07-28 11:00:52 -04:00
lethosor
ddd56d7825
Fix (for win64) and avoid duplicating base address
2016-07-27 20:10:03 -04:00
Vitaly Pronkin
8916aba3bf
win64 fixes (partial)
...
cherry-picked from 2f734ae2317060edb83021f17cffc966c435ad7b
2016-07-27 19:46:49 -04:00
Vitaly Pronkin
fe18f176f7
More 64-bit fixes
...
Cherry-picked from 7eb3ba6
- Lua update already done in e2c6350
, 4dd411e
- Excluded library/modules/Buildings.cpp
2016-07-26 23:47:53 -04:00
Michael Casadevall
ed6fb69012
Fix whitespace spacing
...
Signed-off-by: Michael Casadevall <mcasadevall@ubuntu.com>
2016-07-11 18:54:03 -05:00
lethosor
2455e36510
Initial 64-bit support
2016-07-03 23:32:43 -04:00
Michael Casadevall
d509cf2fb5
It helps when you pop pragmas
...
Signed-off-by: Michael Casadevall <mcasadevall@ubuntu.com>
2016-06-28 09:39:46 -05:00
Michael Casadevall
d49032ef73
Supress a lot of compiler noise in hopes of finding real errors. Right now, a plugin free DFHack can be built with VS2015
2016-06-28 08:34:11 -05:00
Japa
36aafd550b
Increased the message size limit in RemoteClient from 8mb to 64mb.
2016-06-20 13:17:30 +05:30
lethosor
022a1bf9e8
Wrap script descriptions in `ls` output and remove description length cap
2016-06-14 21:24:27 -04:00
Michael Casadevall
e45fbfc61d
Modified dwaftvet plugin to work with latest DFHack
...
Initial commit of the dwarfvet plugin
Signed-off-by: Michael Casadevall <mcasadevall@ubuntu.com>
2016-06-08 04:14:59 -04:00
lethosor
9fc43cff4d
Make const method wrappers possible
...
Reverts ae3052f
Ref #935
2016-05-28 20:11:42 -04:00
lethosor
ae3052f79a
Make knowledge_scholar_category_flag::value() non-const
...
const methods can't be wrapped at the moment, at least without changing things
in DataFuncs.h
2016-05-28 10:28:22 -04:00
Ben Lubar
e76258b040
knowledge category flag
2016-05-26 15:15:42 -05:00
lethosor
52728babd4
Merge branch 'develop' into zone-unassign
2016-04-22 18:41:15 -04:00
lethosor
b97d33ca28
moveToBuilding improvements
...
- Don't set in_building by default when use_mode is 0 (consistent with most vanilla DF items)
- make use_mode optional and default to 0 (including in Lua API)
Resolves #885
2016-04-05 11:43:02 -04:00
lethosor
37c81df21c
Add reverse vtable name lookup
2016-04-03 20:45:44 -04:00
sv-esk
dd9f1bf759
make world friend of machine and building handlers to allow use their
...
protected constructor
2016-03-09 13:03:16 +02:00
lethosor
25507a10f9
Add Units::getKillCount() and expose it to Lua
2016-02-25 15:21:14 -05:00
lethosor
297bbd6f20
Merge remote-tracking branch 'warmist/develop' into develop ( closes #772 )
2016-02-24 17:24:03 -05:00
sv-esk
83c70ccb0f
forbid manipulator editing non-citizens
2016-02-11 13:31:52 +02:00
Warmist
d4988c5faf
Add no handler version of lua event.
2016-02-01 22:22:12 +02:00
James Gilles
0a670bb0db
Implement #804 , move some functions to Units, colorize zone output, a
...
little cleanup
2016-02-01 11:12:06 -05:00
lethosor
2d23a848cc
git-describe: Add git xml information
2016-02-01 10:30:53 -05:00
lethosor
80ecbbd369
get rid of "private" comment in BitArray.h
2016-01-21 16:49:16 -05:00
lethosor
d0c28d3f50
Prevent plugins with active viewscreens from being unloaded
...
This requires plugins to pass plugin_self to Screen::show(), but
avoids the need to implement special checks in plugin_onstatechange
for the SC_BEGIN_UNLOAD event.
2016-01-01 11:15:29 -05:00
lethosor
d087f4f741
Expose process MD5/PE to Lua (useful in export-dt-ini)
2015-12-27 14:59:18 -05:00
lethosor
2a2ab00ca9
Add "map" parameter to a lot of drawing functions
...
Ref #746
2015-12-22 11:42:51 -05:00
lethosor
5a1e5e1464
Expose Units::casteFlagSet()
2015-12-19 11:07:35 -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