AMP
AMP copied to clipboard
Enum values re-ordered in Generic
Bug Report
System Information
- Ubuntu 20.04.3 LTS
- AMP Nightly v20220305.1
- Nightly
I confirm:
- [x] that I have searched for an existing bug report for this issue.
- [x] that I am using the latest available version of AMP.
- [x] that my operating system is up-to-date.
Symptoms
EnumValues are included in a Generic config.json as follows:
{
"DisplayName":"Server Public Status",
"Category":"Server Settings",
"Description":"Sets the public status of the server and whether it is included in the master server list",
"Keywords":"public,list,private",
"FieldName":"sv_public",
"InputType":"enum",
"IsFlagArgument":false,
"ParamFieldName":"sv_public",
"IncludeInCommandLine":false,
"DefaultValue":"1",
"EnumValues":{
"1":"Public and included in server list",
"0":"Public but not included in server list",
"-1":"Not public"
}
}
However, they are displayed in a different order:
It seems AMP is re-ordering perhaps based on numerical order (although it does not appear to do that for -1).
The UI should appear instead exactly in the order that it is listed in the config.json.
Reproduction
Create a manifest setting like the above, and see how it appears in the UI.
Low priority - I'm not entirely sure why it's not in the same order though given that no sorting is applied. I suspect this is down to how Dictionary<> is implemented.