mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
fix(vm): parameters with default values (no key in the unit parameter map) were not considered to be used in featureset
This commit is contained in:
parent
42c9e045b7
commit
eb61fcb130
@ -131,8 +131,9 @@ func NecessaryFeaturesFor(patch sointu.Patch) NecessaryFeatures {
|
||||
features.instructions = append(features.instructions, unit.Type)
|
||||
features.opcodes[unit.Type] = len(features.instructions) * 2 // note that the first opcode gets value 1, as 0 is always reserved for advance
|
||||
}
|
||||
for k, v := range unit.Parameters {
|
||||
key := paramKey{unit.Type, k}
|
||||
for _, paramType := range sointu.UnitTypes[unit.Type] {
|
||||
v := unit.Parameters[paramType.Name]
|
||||
key := paramKey{unit.Type, paramType.Name}
|
||||
if features.supportsParamValue[key] == nil {
|
||||
features.supportsParamValue[key] = map[int]bool{}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user