(svn r24317) -Feature: Add dropdowns to AI configurations, if all values have labels.

This commit is contained in:
frosch
2012-06-01 15:19:59 +00:00
parent f7c9620271
commit be0b94400d
4 changed files with 87 additions and 4 deletions

View File

@@ -263,6 +263,15 @@ SQInteger ScriptInfo::AddLabels(HSQUIRRELVM vm)
}
sq_pop(vm, 1);
/* Check labels for completeness */
config->complete_labels = true;
for (int value = config->min_value; value <= config->max_value; value++) {
if (!config->labels->Contains(value)) {
config->complete_labels = false;
break;
}
}
return 0;
}