forked from mirrors/0ad
Support setting multiply and add to 0 in techs
Previously (only) setting `multiply` and/or `add` to zero in a tech modification caused warnings saying the format wasn't recognised. With this patch, those cases are now handled as one would expect.
This commit is contained in:
@@ -54,9 +54,9 @@ function GetTechModifiedProperty_numeric(modifications, classes, originalValue)
|
||||
continue;
|
||||
if (modification.replace !== undefined)
|
||||
return modification.replace;
|
||||
if (modification.multiply)
|
||||
if (modification.multiply !== undefined)
|
||||
multiply *= modification.multiply;
|
||||
else if (modification.add)
|
||||
else if (modification.add !== undefined)
|
||||
add += modification.add;
|
||||
else
|
||||
warn("GetTechModifiedProperty: numeric modification format not recognized : " + uneval(modification));
|
||||
|
||||
Reference in New Issue
Block a user