|
|
|
@ -16,7 +16,6 @@ using namespace std;
|
|
|
|
|
#include <string>
|
|
|
|
|
#include "modules/Items.h"
|
|
|
|
|
#include "modules/Units.h"
|
|
|
|
|
#include "modules/Materials.h"
|
|
|
|
|
#include "modules/Translation.h"
|
|
|
|
|
#include "DataDefs.h"
|
|
|
|
|
#include "df/world.h"
|
|
|
|
@ -96,9 +95,11 @@ DFhackCExport command_result df_cleanowned (Core * c, vector <string> & paramete
|
|
|
|
|
|
|
|
|
|
CoreSuspender suspend(c);
|
|
|
|
|
|
|
|
|
|
DFHack::Materials *Materials = c->getMaterials();
|
|
|
|
|
|
|
|
|
|
bool ok = Materials->ReadAllMaterials();
|
|
|
|
|
if (!Translation::IsValid())
|
|
|
|
|
{
|
|
|
|
|
c->con.printerr("Translation data unavailable!\n");
|
|
|
|
|
return CR_FAILURE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
c->con.print("Found total %d items.\n", world->items.all.size());
|
|
|
|
|
|
|
|
|
@ -181,7 +182,6 @@ DFhackCExport command_result df_cleanowned (Core * c, vector <string> & paramete
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
df::unit *owner = Items::getItemOwner(item);
|
|
|
|
|
std::string info;
|
|
|
|
|
|
|
|
|
|
if (owner)
|
|
|
|
|
c->con.print(", owner %s", Translation::TranslateName(&owner->name,false).c_str());
|
|
|
|
|