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
10cfef0553
Fix whitespace issues
2015-02-14 22:53:06 -05: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
Quietust
e2b9b703a0
Get rid of tabs
2012-11-16 15:33:36 -06:00
Alexander Gavrilov
92a3277777
Add a MemoryPatcher class as an optimization of scattered patchMemory.
...
This class can cache the set of memory regions during its lifetime,
and make them writable only once. This avoids e.g. re-reading
/proc/*/maps once for every modified vtable in interpose code.
2012-10-27 21:58:40 +04:00
Petr Mrázek
8812238bf6
Update license, add contributors file, bump release number
2012-09-30 04:03:37 +02:00
Alexander Gavrilov
164c61b638
Forbid stuff from bins in siege-engine, if forbid ammo standing order set.
2012-09-27 10:43:42 +04:00
Timothy Collett
ccefd02ee3
Merge branch 'master' of git://github.com/angavrilov/dfhack
2012-09-10 11:56:23 -04:00
Timothy Collett
96abc903ab
Merge branch 'master' of http://github.com/peterix/dfhack
2012-09-10 11:54:56 -04:00
Timothy Collett
274d6038ad
Merge further changes (???)
2012-09-10 09:19:21 -04:00
Alexander Gavrilov
7f1e4b46bc
Implement inheritance-aware vmethod interposing.
...
I.e. overwriting the vmethod in all vtables that use it, not only one.
2012-08-26 14:43:14 +04:00
Alexander Gavrilov
c6694e386f
Add rather inefficient type_identity wrapping for std::set.
...
Accessing an element is O(N), as if it was walking a list.
2012-08-18 14:34:20 +04:00
Alexander Gavrilov
236ffd578b
Add experimental support for interposing vmethods of known classes.
...
The hairiest bit is the abuse of compiler-specific pointer-to-member
internals in order to provide more or less transparent API.
2012-08-17 22:40:53 +04:00
Alexander Gavrilov
7774f5f2c1
Add a mechanism converting ui focus to a string representation.
...
The idea is to make ui handling more modular, dispensing with
huge functions that switch or if/else on lots of variables.
For now, used to split up functions in the sort plugin.
2012-05-19 19:50:36 +04:00
Alexander Gavrilov
2303a25bde
Implement unconstructed building instance creation and linking into world.
...
For more flexibility, the base api is split into 3 phases:
alloc, setSize, and construct. No support for non-actual
buildings like stockpiles and activity zones at the moment.
2012-04-29 21:07:39 +04:00
Alexander Gavrilov
0a6982f404
Enable warnings correctly on linux and fix a lot of them.
2012-04-20 13:30:37 +04:00
Alexander Gavrilov
d95cc3435f
Fix lua wrapper sizeof for static arrays.
...
Since it actually depends on the element type, it is more tricky.
2012-04-20 13:04:03 +04:00
Alexander Gavrilov
5d5502ae34
Update the item owner modification api and export it to lua.
2012-04-11 20:10:31 +04:00
Alexander Gavrilov
0f41608ed4
Pull console output support and REPL out of dfusion into core lib.
2012-03-31 15:40:54 +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
Alexander Gavrilov
0412aaebe4
Add a delete() method to the objects in the lua wrapper.
2012-03-25 15:48:18 +04:00
Alexander Gavrilov
8d345be6e7
Expose virtual methods in the lua wrapper.
2012-03-25 14:06:05 +04:00
Alexander Gavrilov
0c7fc233bd
Support resize/erase/insert for containers, and allow any index in BitArray.
2012-03-24 16:28:53 +04:00
Alexander Gavrilov
053bfe345c
Implement allocation and copy for c++ objects in the lua wrapper.
2012-03-24 12:43:53 +04:00
Alexander Gavrilov
ead28db451
Remove the return type from lua_read, because it always returns 1.
2012-03-23 09:38:49 +04:00
Alexander Gavrilov
27824642d9
Minor refactoring of container indexing and object allocation.
2012-03-22 10:56:32 +04:00
Alexander Gavrilov
ad10303cec
Implement bitfields and add a _kind metadata field to types and objects.
2012-03-21 20:04:37 +04:00
Alexander Gavrilov
9b78fffe92
Support containers in the lua wrapper.
2012-03-21 13:26:53 +04:00
Alexander Gavrilov
73e138c9fd
Support ordinary struct and class fields.
2012-03-20 21:34:27 +04:00
Alexander Gavrilov
6c661bcaa9
Add support for primitive type fields in lua wrapper.
2012-03-20 13:56:29 +04:00
Alexander Gavrilov
dbbd9acfad
Export the type tree with enum keys to lua.
2012-03-19 20:12:27 +04:00
Alexander Gavrilov
296d3a0af3
Skeleton type metadata for future use in lua bindings.
2012-03-19 16:59:11 +04:00
Alexander Gavrilov
15ccfbb086
Add a ListMaterials remote call for bulk download of basic material info.
2012-03-17 15:36:42 +04:00
Alexander Gavrilov
58eb199036
Add many new template functions for enums & bitfields.
...
An incompatible change: ENUM_KEY_STR returns std::string now.
The old behavior is available via enum_item_key_str function.
2012-03-17 12:52:22 +04:00
Alexander Gavrilov
f84b1539a8
Change to the traits representation of enum and bitfield properties.
2012-03-15 20:46:08 +04:00
Alexander Gavrilov
c42e2ff053
Support crafts and add a couple of options in workflow.
2012-03-14 12:09:02 +04:00
Alexander Gavrilov
c04a140713
Add a new DfArray class to match generated headers.
...
Also, add working assignment and copy constructor to BitArray, and
change the unsafe conversion to int from an operator to a method.
2012-02-12 16:44:35 +04:00
Alexander Gavrilov
f469fab1e6
Use globals defined by the latest codegen.
2012-02-11 16:27:12 +04:00
Alexander Gavrilov
b0cda1526e
Adjust FOR_ENUM_ITEMS to account for ENUM_LAST_ITEM being inclusive now.
2012-01-21 18:50:44 +04:00
Alexander Gavrilov
e2d7359bdd
Add the gps global to Memory.xml.
2012-01-19 17:26:21 +04:00
Alexander Gavrilov
7db467a740
Update code to accomodate the new coord/coord2d/coord_path structs.
...
Also replicate the methods of DFCoord.
2012-01-19 14:30:22 +04:00
Alexander Gavrilov
a31542862a
Add utility functions to retrieve the selected job/unit/item.
...
Units can be selected via 'u', 'j', 'v' and 'k'; full-screen
unit details view not supported.
Items can be selected via 't', 'k', 'v'->inventory.
Also, when viewing a container item full-screen, the selected
contained item or unit is returned; never the container itself.
The api is used in rename to allow setting nicknames for
arbitrary units, including animals and enemies.
2012-01-14 19:31:43 +04:00
Alexander Gavrilov
50386f66a3
Update structures and implement modifying the job_item item type.
2012-01-09 16:20:17 +04:00
Alexander Gavrilov
ea790f1346
Move a few functions into the core, and add some more.
2012-01-08 20:02:12 +04:00
Alexander Gavrilov
f5e121a196
Move a bunch of stuff from the jobutils plugin into the core.
2012-01-07 19:21:07 +04:00
Alexander Gavrilov
0e90e6b78e
Support multi-valued enum attributes.
2012-01-06 22:08:09 +04:00
Alexander Gavrilov
284009e873
Add a hotkey command to duplicate jobs in workshops.
2012-01-04 19:39:38 +04:00
Alexander Gavrilov
1d1cd63800
Implement printing job details.
2012-01-03 22:56:05 +04:00
Alexander Gavrilov
f8814909a9
Move the MaterialInfo class to the main library.
2012-01-03 19:25:55 +04:00
Alexander Gavrilov
326c58f793
Add a plugin to tweak inorganic materials in jobs.
...
It also auto-seeks in the build item list if used in that context.
2012-01-02 18:46:24 +04:00