15.01.2011 22:11
19.01.2011 13:56
/** unconfirms all units which have the value tagValue for the tag tagName for a faction f, confirms all other units. */
void highlightTag(Faction f, String tagName, String tagValue) {
for (Unit u : f.units()) {
if (tagValue.equals(u.getTag(tagName))) {
u.setOrdersConfirmed(false);
} else {
u.setOrdersConfirmed(true);
}
}
}
/** call this from a faction's script */
highlightTag((Faction) container, "ejcTaggableComparator", "kapitäne");