refactor: put all info about different unit types into UnitTypes map

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2026-03-15 10:29:24 +02:00
parent 8ea9d3a191
commit 6a331f7a57
8 changed files with 392 additions and 331 deletions

View File

@ -512,7 +512,7 @@ var validParameters = map[string](map[string]bool){}
func init() {
for name, unitType := range sointu.UnitTypes {
validParameters[name] = map[string]bool{}
for _, param := range unitType {
for _, param := range unitType.Params {
validParameters[name][param.Name] = true
}
}