예제 #1
0
void set_task_str(twindow& window, const unit& u)
{
	tbutton* task = find_widget<tbutton>(&window, "task", false, true);

	if (u.task() == unit::TASK_NONE) {
		task->set_label(_("Guard"));
	} else if (u.task() == unit::TASK_GUARD) {
		task->set_label(_("Abolish guard"));
	} else {
		task->set_label(_("Abolish"));
	}
	task->set_active(u.human());
}
bool human_team_can_ai(const unit& u)
{
	return !u.human() || tent::tower_mode() || u.provoked_turns() || u.task() == unit::TASK_GUARD;
}