|
|
|
@ -47,8 +47,6 @@ const char *usage = (
|
|
|
|
|
" Enable the plugin.\n"
|
|
|
|
|
" tailor disable\n"
|
|
|
|
|
" Disable the plugin.\n"
|
|
|
|
|
" tailor use LEATHER,CLOTH,YARN,SILK\n"
|
|
|
|
|
" Use these materials, in this order, when requesting additional clothing\n"
|
|
|
|
|
" tailor status\n"
|
|
|
|
|
" Display plugin status\n"
|
|
|
|
|
"\n"
|
|
|
|
@ -134,7 +132,6 @@ void do_scan(color_ostream& out)
|
|
|
|
|
|
|
|
|
|
if (mat.material)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (mat.material->flags.is_set(df::material_flags::SILK))
|
|
|
|
|
silk += ss;
|
|
|
|
|
else if (mat.material->flags.is_set(df::material_flags::THREAD_PLANT))
|
|
|
|
@ -269,7 +266,6 @@ void do_scan(color_ostream& out)
|
|
|
|
|
orders[make_tuple(itemTypeMap[ty], sub, size)] += count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// scan orders
|
|
|
|
|
|
|
|
|
|
for (auto o : world->manager_orders)
|
|
|
|
@ -352,7 +348,6 @@ void do_scan(color_ostream& out)
|
|
|
|
|
{
|
|
|
|
|
out.print("Cannot make %s, skipped\n", name_p);
|
|
|
|
|
continue; // this civilization does not know how to make this item, so sorry
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch (ty) {
|
|
|
|
@ -408,9 +403,7 @@ void do_scan(color_ostream& out)
|
|
|
|
|
world->raws.creatures.all[order->hist_figure_id]->name[1]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#define DELTA_TICKS 600
|
|
|
|
@ -449,12 +442,6 @@ DFhackCExport command_result plugin_onupdate(color_ostream &out)
|
|
|
|
|
return CR_OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool tailor_set_materials(string parameter)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static command_result tailor_cmd(color_ostream &out, vector <string> & parameters) {
|
|
|
|
|
bool desired = enabled;
|
|
|
|
|
if (parameters.size() == 1)
|
|
|
|
@ -482,13 +469,8 @@ static command_result tailor_cmd(color_ostream &out, vector <string> & parameter
|
|
|
|
|
return CR_WRONG_USAGE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (parameters.size() == 2 && parameters[1] == "use")
|
|
|
|
|
{
|
|
|
|
|
return (
|
|
|
|
|
tailor_set_materials(parameters[2]) ?
|
|
|
|
|
CR_OK : CR_WRONG_USAGE
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return CR_WRONG_USAGE;
|
|
|
|
|
|
|
|
|
|
out.print("Tailor is %s %s.\n", (desired == enabled)? "currently": "now", desired? "enabled": "disabled");
|
|
|
|
|
enabled = desired;
|
|
|
|
|