Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions plugins/tailor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class Tailor {
// only count dyed
std::string d;
i->getItemDescription(&d, 0);
TRACE(cycle).print("tailor: skipping undyed %s\n", d.c_str());
TRACE(cycle).print("tailor: skipping undyed %s\n", DF2CONSOLE(d).c_str());
continue;
}
MaterialInfo mat(i);
Expand All @@ -242,7 +242,7 @@ class Tailor {
{
std::string d;
i->getItemDescription(&d, 0);
DEBUG(cycle).print("tailor: weird cloth item found: %s (%d)\n", d.c_str(), i->id);
DEBUG(cycle).print("tailor: weird cloth item found: %s (%d)\n", DF2CONSOLE(d).c_str(), i->id);
}
}
}
Expand Down Expand Up @@ -301,14 +301,14 @@ class Tailor {
available[std::make_pair(ty, usize)] -= 1;
DEBUG(cycle).print("tailor: allocating a %s (size %d) to %s\n",
ENUM_KEY_STR(item_type, ty).c_str(), usize,
Translation::TranslateName(&u->name, false).c_str());
DF2CONSOLE(Translation::TranslateName(&u->name, false)).c_str());
wearing.insert(ty);
}
else if (ordered.count(ty) == 0)
{
DEBUG(cycle).print ("tailor: %s (size %d) worn by %s (size %d) needs replacement, but none available\n",
description.c_str(), isize,
Translation::TranslateName(&u->name, false).c_str(), usize);
DF2CONSOLE(description).c_str(), isize,
DF2CONSOLE(Translation::TranslateName(&u->name, false)).c_str(), usize);
needed[std::make_pair(ty, usize)] += 1;
ordered.insert(ty);
}
Expand All @@ -323,8 +323,8 @@ class Tailor {
INFO(cycle).print(
"tailor: %s %s from %s.\n",
(confiscated ? "confiscated" : "could not confiscate"),
description.c_str(),
Translation::TranslateName(&u->name, false).c_str()
DF2CONSOLE(description).c_str(),
DF2CONSOLE(Translation::TranslateName(&u->name, false)).c_str()
);
}

Expand All @@ -341,7 +341,7 @@ class Tailor {
TRACE(cycle).print("tailor: one %s of size %d needed to cover %s\n",
ENUM_KEY_STR(item_type, ty).c_str(),
usize,
Translation::TranslateName(&u->name, false).c_str());
DF2CONSOLE(Translation::TranslateName(&u->name, false)).c_str());
needed[std::make_pair(ty, usize)] += 1;
}
}
Expand Down Expand Up @@ -416,7 +416,7 @@ class Tailor {
{
supply[m] -= o->amount_left;
TRACE(cycle).print("tailor: supply of %s reduced by %d due to being required for an existing order\n",
m.name.c_str(), o->amount_left);
DF2CONSOLE(m.name).c_str(), o->amount_left);
}
}

Expand Down Expand Up @@ -508,11 +508,11 @@ class Tailor {

if (!can_make)
{
INFO(cycle).print("tailor: civilization cannot make %s, skipped\n", name_p.c_str());
INFO(cycle).print("tailor: civilization cannot make %s, skipped\n", DF2CONSOLE(name_p).c_str());
continue;
}

DEBUG(cycle).print("tailor: ordering %d %s\n", count, name_p.c_str());
DEBUG(cycle).print("tailor: ordering %d %s\n", count, DF2CONSOLE(name_p).c_str());

for (auto& m : material_order)
{
Expand All @@ -528,7 +528,7 @@ class Tailor {
{
c = supply[m] - res;
TRACE(cycle).print("tailor: order reduced from %d to %d to protect reserves of %s\n",
count, c, m.name.c_str());
count, c, DF2CONSOLE(m.name).c_str());
}
supply[m] -= c;

Expand All @@ -552,16 +552,16 @@ class Tailor {
order->id,
c,
bitfield_to_string(order->material_category).c_str(),
(c > 1) ? name_p.c_str() : name_s.c_str(),
world->raws.creatures.all[order->hist_figure_id]->name[1].c_str()
DF2CONSOLE((c > 1) ? name_p : name_s).c_str(),
DF2CONSOLE(world->raws.creatures.all[order->hist_figure_id]->name[1]).c_str()
);

count -= c;
ordered += c;
}
else
{
TRACE(cycle).print("tailor: material %s skipped due to lack of reserves, %d available\n", m.name.c_str(), supply[m]);
TRACE(cycle).print("tailor: material %s skipped due to lack of reserves, %d available\n", DF2CONSOLE(m.name).c_str(), supply[m]);
}

}
Expand Down