diff options
| author | Warmist | 2012-05-18 16:05:29 +0300 |
|---|---|---|
| committer | Warmist | 2012-05-18 16:05:29 +0300 |
| commit | 48185568e9a9370f843fb28f1ff53335639b92d6 (patch) | |
| tree | 6e24950d9ae46d7cd87301a14a72c6e9877b303a /library/LuaApi.cpp | |
| parent | 52426f9035c54fdfcd38992259c94a65de160ed8 (diff) | |
| download | dfhack-48185568e9a9370f843fb28f1ff53335639b92d6.tar.gz dfhack-48185568e9a9370f843fb28f1ff53335639b92d6.tar.bz2 dfhack-48185568e9a9370f843fb28f1ff53335639b92d6.tar.xz | |
Added df::Items::moveToBuilding. Moved item from ground to building, usefull for museum forts (placing items on tables)
Diffstat (limited to 'library/LuaApi.cpp')
| -rw-r--r-- | library/LuaApi.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index 529bdd07..d4c3b157 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -755,6 +755,12 @@ static bool items_moveToContainer(df::item *item, df::item *container) return Items::moveToContainer(mc, item, container); } +static bool items_moveToBuilding(df::item *item, df::building_actual *building, int use_mode) +{ + MapExtras::MapCache mc; + return Items::moveToBuilding(mc, item, building,use_mode); +} + static const LuaWrapper::FunctionReg dfhack_items_module[] = { WRAPM(Items, getGeneralRef), WRAPM(Items, getSpecificRef), @@ -763,6 +769,7 @@ static const LuaWrapper::FunctionReg dfhack_items_module[] = { WRAPM(Items, getContainer), WRAPN(moveToGround, items_moveToGround), WRAPN(moveToContainer, items_moveToContainer), + WRAPN(moveToBuilding, items_moveToBuilding), { NULL, NULL } }; |
