From 0168ad9cbe9a7bfa9e2a5652bfc0341f3e6392eb Mon Sep 17 00:00:00 2001 From: Vantha Date: Sat, 14 Feb 2026 11:23:09 +0100 Subject: [PATCH] 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. --- binaries/data/mods/public/globalscripts/Technologies.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/binaries/data/mods/public/globalscripts/Technologies.js b/binaries/data/mods/public/globalscripts/Technologies.js index dd12859e69..6639c9907a 100644 --- a/binaries/data/mods/public/globalscripts/Technologies.js +++ b/binaries/data/mods/public/globalscripts/Technologies.js @@ -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));