summaryrefslogtreecommitdiff
path: root/plugins/cleanowned.cpp
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-04-11 20:10:31 +0400
committerAlexander Gavrilov2012-04-11 20:10:31 +0400
commit5d5502ae341030c58478dae2d04ba31ab2bfb93e (patch)
treedfe72d43f9daf649dd91497e4b2d2a80d7002140 /plugins/cleanowned.cpp
parent0c2b78b96b0aca46988f9d1e3c94f70cdfbc8e02 (diff)
downloaddfhack-5d5502ae341030c58478dae2d04ba31ab2bfb93e.tar.gz
dfhack-5d5502ae341030c58478dae2d04ba31ab2bfb93e.tar.bz2
dfhack-5d5502ae341030c58478dae2d04ba31ab2bfb93e.tar.xz
Update the item owner modification api and export it to lua.
Diffstat (limited to 'plugins/cleanowned.cpp')
-rw-r--r--plugins/cleanowned.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/cleanowned.cpp b/plugins/cleanowned.cpp
index 280f2e1c..c1521b8d 100644
--- a/plugins/cleanowned.cpp
+++ b/plugins/cleanowned.cpp
@@ -98,8 +98,7 @@ command_result df_cleanowned (color_ostream &out, vector <string> & parameters)
if (!item->flags.bits.owned)
{
- int32_t owner = Items::getItemOwnerID(item);
- if (owner >= 0)
+ if (Items::getOwner(item))
{
out.print("Fixing a misflagged item: \t");
confiscate = true;
@@ -168,14 +167,14 @@ command_result df_cleanowned (color_ostream &out, vector <string> & parameters)
item->getWear()
);
- df::unit *owner = Items::getItemOwner(item);
+ df::unit *owner = Items::getOwner(item);
if (owner)
out.print(", owner %s", Translation::TranslateName(&owner->name,false).c_str());
if (!dry_run)
{
- if (!Items::removeItemOwner(item))
+ if (!Items::setOwner(item,NULL))
out.print("(unsuccessfully) ");
if (dump)
item->flags.bits.dump = 1;