mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
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:
parent
38eb999ff9
commit
0168ad9cbe
1 changed files with 2 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue