pollution-as-surface-property/pollution-as-surface-property/data-updates.lua
Simon Brodtmann ee43ea6454 1.0.0
2025-02-04 12:10:13 +01:00

13 lines
No EOL
393 B
Lua

local pollutants = {
["pollution"] = 1,
["spores"] = 2,
["noise"] = 3,
["radiation"] = 4
}
for _, planet in pairs(data.raw["planet"]) do
if planet.pollutant_type and pollutants[planet.pollutant_type] then
planet.surface_properties = planet.surface_properties or {}
planet.surface_properties["pollutant-type"] = pollutants[planet.pollutant_type]
end
end