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