Пример #1
0
void show_unit_description(CVideo& video, const unit_type &t)
{
	std::string var_id = t.get_cfg()["variation_id"].str();
	if (var_id.empty())
		var_id = t.get_cfg()["variation_name"].str();
	bool hide_help = t.hide_help();
	bool use_variation = false;
	if (!var_id.empty()) {
		const unit_type *parent = unit_types.find(t.id());
		assert(parent);
		if (hide_help) {
			hide_help = parent->hide_help();
		} else {
			use_variation = true;
		}
	}

	if (use_variation)
		help::show_variation_help(video, t.id(), var_id, hide_help);
	else
		help::show_unit_help(video, t.id(), t.show_variations_in_help(), hide_help);
}
Пример #2
0
void show_unit_description(const unit_type &t)
{
	help::show_unit_help(*resources::screen, t.id(), t.hide_help());
}