Mine
public lua v1 · immutable for wd in pairs(WeaponDefs) do Spring.Echo ("WEAP:"..WeaponDefs[wd].name) if WeaponDefs[wd].name~="Rock_Drill" then local badtargets = WeaponDefs[wd].badtargetcategory if (badtargets==nil) then WeaponDefs[wd].badtargetcategory = "MINERALS" else WeaponDefs[wd].badtargetcategory = badtargets .. " MINERALS" end else WeaponDefs[wd].range = 666 Spring.Echo ("after change:" ..WeaponDefs[wd].badtargetcategory) end end