Page 1 of 1

create surface with specific pollution settings

Posted: Fri Jan 19, 2024 11:20 am
by Natha
When I create a new surface using pollution settings, they are not applied. I want to have a diffusion by 0, but whatever I change in these values the spreading is the same.

Code: Select all

local surface_map_settings = {
  pollution={
      	enabled = true,
      	diffusion_ratio = 0,
      	min_to_diffuse = 15,
     	ageing = 0.1,
     	expected_max_per_chunk = 7000,
	min_to_show_per_chunk = 700,
	min_pollution_to_damage_trees = 30,
	pollution_with_max_forest_damage = 75,
	pollution_per_tree_damage = 25,
	pollution_restored_per_tree_damage = 5,
	max_pollution_to_restore_trees = 0
	},
  --[[steering=
    {
      default=
      {
        -- not including the radius of the unit
        radius = 1.2,
        separation_force = 0.005,
        separation_factor = 1.2,
        force_unit_fuzzy_goto_behavior = false
      },
      moving=
      {
        radius = 3,
        separation_force = 0.01,
        separation_factor = 3,
        -- used only for special "to look good" purposes (like in trailer)
        force_unit_fuzzy_goto_behavior = false
      }
    },]]
	default_enable_all_autoplace_controls = false,
	--cliff_settings = {cliff_elevation_0 = 1024},
}
game.create_surface(name, surface_map_settings)
Is there a workaround?

Re: create surface with specific pollution settings

Posted: Fri Jan 19, 2024 2:17 pm
by Rseding91
Map settings are for the entire map. There is no current way to set pollution values per-surface.