Commit Graph

2879 Commits (ac0e4a15e8ed403c8f41dba695df196960a26820)
 

Author SHA1 Message Date
Warmist 13d7beda4b Dfusion crash fix 2012-03-28 16:58:52 +08:00
Alexander Gavrilov b76bdad50f Implement recursive transfer of values from lua to c++ structures.
E.g. df.global.cursor = { x = 1, y = 2, z = 3 }. The lua data
must be represented by raw lua tables.

For structs, the entries in the table are assigned to matching fields.

For containers, if a 'resize' field is missing or nil, the table is
treated like 1-based lua array, and the container is resized to match
its # length. Otherwise, the field must be either an explicit number,
true or false. If it is true, the size is selected by the highest index
in the table. After that, entries are copied using 0-based indices.

For pointers, the table must match the target object. If the pointer
is null, the object is auto-allocated; this can be controlled using
the 'new' field, the value of which will be passed to df.new().
2012-03-28 16:58:51 +08:00
Alexander Gavrilov ee94894516 Disable pointer auto-vivification unless new is specified.
Since it is essentially allocating non-gc managed objects,
it can lead to memory leaks and shouldn't happen invisibly.
Also support using the 'assign' key to request assign()
from another object before processing the current map.
2012-03-28 11:28:42 +04:00
Alexander Gavrilov d6e6fc483f Fix F keys in keybindings: they obviously don't have unicode symbols. 2012-03-28 11:25:55 +04:00
unknown 1566ae034f Fix crash in autolabor that happens when all dorfs decide to tipple at the same time 2012-03-27 21:39:06 -05:00
Quietust abebb7fd2d Merge https://github.com/warmist/dfhack 2012-03-27 15:56:03 -05:00
Warmist 5e90af7400 Merge branch 'master' of git://github.com/peterix/dfhack 2012-03-27 22:48:07 +03:00
Warmist 2afff2b2c8 Dfusion crash fix 2012-03-27 22:47:23 +03:00
Quietust be2a7af362 Merge branch 'master' of https://github.com/angavrilov/dfhack 2012-03-27 14:14:04 -05:00
Quietust 6656852fff win32 SetConsoleTextAttribute doesn't know what COLOR_RESET (-1) is 2012-03-27 13:22:45 -05:00
Alexander Gavrilov bc74c5984e Implement recursive transfer of values from lua to c++ structures.
E.g. df.global.cursor = { x = 1, y = 2, z = 3 }. The lua data
must be represented by raw lua tables.

For structs, the entries in the table are assigned to matching fields.

For containers, if a 'resize' field is missing or nil, the table is
treated like 1-based lua array, and the container is resized to match
its # length. Otherwise, the field must be either an explicit number,
true or false. If it is true, the size is selected by the highest index
in the table. After that, entries are copied using 0-based indices.

For pointers, the table must match the target object. If the pointer
is null, the object is auto-allocated; this can be controlled using
the 'new' field, the value of which will be passed to df.new().
2012-03-27 21:47:52 +04:00
Mike Stewart b57ab1493c Look for df-structures instead of protobuf in the submodule check. 2012-03-27 08:42:49 -07:00
Quietust 2ac562d4d7 Add missing array terminator - without this, Release builds crash on startup 2012-03-27 10:23:11 -05:00
Robert Heinrich 13effd5ac5 minor fix in readme.rst 2012-03-27 12:06:46 +02:00
Robert Heinrich ca6b8aac42 Merge remote-tracking branch 'upstream/master' 2012-03-27 11:29:40 +02:00
Robert Heinrich e41e9c24f1 minor updates in readme.rst; moved changelayer plugin to main plugin folder 2012-03-27 11:28:10 +02:00
Mike Stewart 92bae9d652 Removed dead check... 2012-03-26 16:39:16 -07:00
Mike Stewart 4ed6953bb6 Added a test for submodules that prints out a helpful error message. 2012-03-26 16:37:37 -07:00
Petr Mrázek d2d16271f0 Track stonesense 2012-03-27 01:30:46 +02:00
Alexander Gavrilov 22d775f95c Fix sscanf parsing the memory map on linux, so that dfusion loads. 2012-03-26 21:05:24 +04:00
Warmist 3761426ef5 Extern "C" mess fixed, bitlib mess fixed, bitlib added to autoload. 2012-03-26 18:48:24 +03:00
Warmist 18c94f8000 Merge branch 'master' of git://github.com/peterix/dfhack 2012-03-26 18:14:14 +03:00
Warmist 61f0bc66af small changes to tools(lua) 2012-03-26 18:12:32 +03:00
Petr Mrázek b4d458b47f Track stonesense 2012-03-26 16:16:19 +02:00
Petr Mrázek 4e78947b10 Track structures 2012-03-26 16:13:41 +02:00
Petr Mrázek 047ccdf43a Merge https://github.com/angavrilov/dfhack 2012-03-26 16:13:36 +02:00
Robert Heinrich 213acd054a minor: fixed typo 2012-03-26 14:59:18 +02:00
Robert Heinrich eb5a364924 minor: replace tabs with spaces 2012-03-26 12:36:03 +02:00
Robert Heinrich 517fc310bf documented changelayer plugin 2012-03-26 12:27:32 +02:00
Alexander Gavrilov 157f23be5c Fix warnings. 2012-03-26 12:42:05 +04:00
Robert Heinrich d50f42e4f3 Merge remote-tracking branch 'angavrilov/master' 2012-03-26 10:36:21 +02:00
Alexander Gavrilov 00a5bfcf3e Work around a msvc issue with spurious specialization ambiguity errors. 2012-03-26 10:46:51 +04:00
Robert Heinrich af344e57bd Merge remote-tracking branch 'upstream/master' 2012-03-26 04:17:06 +02:00
Robert Heinrich e63ba6f87d added changelayer plugin 2012-03-26 04:15:42 +02:00
Petr Mrázek 1a19e17695 Track structures, stonesense 2012-03-26 03:39:14 +02:00
Petr Mrázek 85c3fbedcc Merge https://github.com/warmist/dfhack 2012-03-26 03:38:16 +02:00
Petr Mrázek a120df8e5c Merge https://github.com/rh73/dfhack 2012-03-26 03:37:49 +02:00
Petr Mrázek dd8c4a4892 Merge https://github.com/wjrogers/dfhack 2012-03-26 03:37:21 +02:00
Alexander Gavrilov d0090e9551 Fix lua wrapper: create one function identity instance per method.
Otherwise all methods of the same prototype are lumped into one.
2012-03-25 21:12:20 +04:00
Alexander Gavrilov 1d81cb56ba Make enum attributes accessible through the lua wrapper.
TODO: make them completely read-only.
2012-03-25 19:12:59 +04:00
Will Rogers 43b6bb083d Fix generate-*.bat for DF paths containing spaces. 2012-03-25 10:56:20 -04:00
Alexander Gavrilov 0412aaebe4 Add a delete() method to the objects in the lua wrapper. 2012-03-25 15:48:18 +04:00
Alexander Gavrilov 7209e4d3f2 Attach static methods to the type objects in the lua wrapper. 2012-03-25 15:20:58 +04:00
Robert Heinrich 96064da6ba remove cursedump, use api instead 2012-03-25 12:11:00 +02:00
Alexander Gavrilov 8d345be6e7 Expose virtual methods in the lua wrapper. 2012-03-25 14:06:05 +04:00
Robert Heinrich b790909950 Merge remote-tracking branch 'upstream/master' 2012-03-25 11:57:13 +02:00
Warmist 63634de8d5 Fixed empregnate, and some other tools... 2012-03-25 11:48:53 +03:00
Alexander Gavrilov 5d471a2a74 Since lua is now compiled as c++, don't declare api functions extern "C". 2012-03-25 11:11:45 +04:00
Petr Mrázek def7e51564 Merge https://github.com/warmist/dfhack 2012-03-25 03:27:26 +02:00
Warmist e36ed9ac07 Fixed more plugins (embark/friendship/simple_embark) 2012-03-25 01:31:58 +02:00