Commit Graph

98 Commits (bb93f2e40f1c8fd38131b4c630b2677bc3a174fb)

Author SHA1 Message Date
lethosor 10cfef0553 Fix whitespace issues 2015-02-14 22:53:06 -05:00
Quietust e711605413 Some minor corrections 2014-07-21 13:26:34 -05:00
Quietust 97de21357c First pass for 0.40 compatibility; still lots left to do, but this will at least build 2014-07-21 13:18:29 -05:00
expwnent 2fb8faf3e6 Added Items::createItem function. 2014-07-03 10:39:20 -04:00
Quietust e483e7439f Fix problems with NONE for item types and subtypes 2014-05-22 08:18:01 -05: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
Alexander Gavrilov 7aecffe0cd Update structures and fix broken things. 2014-04-04 22:34:39 +04:00
Quietust 3f2e583746 Naming consistency 2012-11-16 15:35:34 -06:00
Quietust a99d47ee7a Remove UTF-8 BOMs added by notepad 2012-11-12 08:38:29 -06:00
Quietust 766aca4911 Rename general_ref vectors for consistency 2012-11-12 08:27:58 -06:00
Alexander Gavrilov 3ff5d38a5c Add a few utility functions to the main library. 2012-10-30 12:40:26 +04:00
Alexander Gavrilov fbba4caab2 Suppress checking the cookable material flag if the item is a container. 2012-10-20 21:16:00 +04:00
Alexander Gavrilov 0c9f1e0af4 Check the item type against job_item_vector_id when matching to jobs.
This will prevent setting an invalid item type via the job command.
2012-10-20 21:01:22 +04:00
Alexander Gavrilov 795961bfc4 Fix the treatment of non_economic in Materials/Items modules.
non_economic == !(is boulder && is inorganic && is economic)
2012-10-20 20:31:45 +04:00
Alexander Gavrilov 2b1d856214 Add a few utility functions to the lua api. 2012-10-20 17:06:33 +04:00
Petr Mrázek 8812238bf6 Update license, add contributors file, bump release number 2012-09-30 04:03:37 +02:00
Alexander Gavrilov 24772f4dbc Add an api function for destroying items. 2012-09-14 18:49:02 +04:00
Alexander Gavrilov 7c71aeab5f Add function for making item projectiles. 2012-09-12 18:17:42 +04:00
Alexander Gavrilov b992b04f0b Remove stuff that shouldn't be in the core, and expose to lua what's left.
Specifically, any "if (verbose) { Core::printerr("blah") }" kind
of stuff definitely doesn't belong in the common API functions.
Also, ref->getUnit() is very expensive.

On the other hand, checks for crash-inducing conflicts with the
ui should be in the core api, and not in client plugins.
2012-05-20 21:57:45 +04:00
Kelly Martin abbe0ceb8d Fix order-of-operations oopsie in DFHack::Items::moveToInventory 2012-05-19 14:13:32 -05:00
Petr Mrázek bc7dbe1175 Merge derp fixed. 2012-05-19 20:03:08 +02:00
Petr Mrázek 51f06c78fc Merge https://github.com/playfordh/dfhack
Conflicts:
	library/include/modules/Items.h
	library/modules/Items.cpp
2012-05-19 19:09:13 +02:00
Warmist 48185568e9 Added df::Items::moveToBuilding. Moved item from ground to building, usefull for museum forts (placing items on tables) 2012-05-18 16:05:29 +03:00
Alexander Gavrilov 2c0024adc9 Make Items::getPosition exactly match the DF original in behavior. 2012-05-17 19:56:55 +04:00
harlanplayford 27ca317871 Added new method - Items::moveToInventory(...)
Signed-off-by: playfordh <harlanplayford@gmail.com>
2012-05-15 06:01:59 -04:00
Alexander Gavrilov 5afe2ca002 Update dfhack for specific_ref. 2012-05-03 11:47:04 +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 37cfb1fdcd Add unit position and container api. 2012-04-13 16:10:19 +04:00
Alexander Gavrilov 2d8611a480 Add core api for moving items between ground and containers. 2012-04-12 18:37:27 +04:00
Alexander Gavrilov 583ccdcc0c Support pre-initializing vtable pointers from symbols.xml 2012-04-12 10:54:53 +04:00
Alexander Gavrilov 5d5502ae34 Update the item owner modification api and export it to lua. 2012-04-11 20:10:31 +04:00
Petr Mrázek 8a847dbaba Tweaks and cleanups
Removed t_virtual.
Made lua use C++ compiler
Removed many silly exception types from Error.h and renamed the rest.
Removed Brush classes from tiletypes plugin.
2012-03-24 12:13:51 +01:00
Alexander Gavrilov f84b1539a8 Change to the traits representation of enum and bitfield properties. 2012-03-15 20:46:08 +04:00
Alexander Gavrilov 8cc82d5876 Make plugins accept explicit output stream references.
This is an incompatible change to the plugin ABI.

The Console is not thread-safe unless used indirectly
via color_ostream_proxy, so everything should use their
per-thread stream.
2012-03-10 15:55:42 +04:00
Petr Mrázek 7fe8762852 Get rid of Simple namespace, Gui module is now a namespace. 2012-03-03 14:38:24 +01:00
Quietust 9afcea3deb In all loops that iterate across a vector, use a size_t as the index 2012-01-31 10:55:38 -06:00
Quietust a82f4c9138 Cleanup code to get rid of MSVC warning C4482 2012-01-31 10:17:27 -06:00
Quietust ccad6efeb8 Remove UTF-8 BOMs 2012-01-27 09:47:14 -06:00
Quietust cc7c7795a1 Kill the Units module, and add another pair of methods to the Items module to simplify some things 2012-01-24 11:32:34 -06:00
Quietust 6adadb396e df::tool_uses is now implicitly int16_t, so no more enum_field<> here 2012-01-23 19:40:02 -06:00
Quietust 8052305c2e Cleanup the Units module 2012-01-21 13:03:39 -06: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
Quietust 35ad84c58a angavrilov changed general_ref_type to be all uppercase 2012-01-18 08:26:08 -06:00
Quietust fd653a0227 Kill the Items module 2012-01-16 22:12:58 -06:00
Quietust 7c5835d318 t_itemref -> df::general_ref 2012-01-16 20:40:29 -06:00
Quietust 64b55acf37 df_item -> df::item, t_itemflags -> df::item_flags 2012-01-16 20:16:16 -06:00
Alexander Gavrilov bcb51d8ff7 Use the announcement API to report starting and stopping workflow jobs. 2012-01-15 15:39:20 +04:00