UserAction evaluators: Sort constant value above other evaluators

console-destruction
Sven Eberhardt 2016-08-27 17:15:20 -04:00
parent dfefa7df6f
commit 065d8536da
1 changed files with 5 additions and 0 deletions

View File

@ -469,6 +469,11 @@ public func AddEvaluator(string eval_type, string group, name, string help, stri
action_def.ValueKey = delegate_storage_key ?? "Value";
}
}
// Constant has higher priority
if (callback_data[1] == UserAction.EvalConstant)
{
action_def.Priority = 50;
}
Evaluator[eval_type].Options[n = GetLength(Evaluator[eval_type].Options)] = action_def;
action_def.OptionIndex = n;
// Remember lookup table through identifier (ignore duplicates)