Page 1 of 1

[Rseding91] [0.16.51] AutoplaceSettings are ignored for standard tiles

Posted: Thu Jul 26, 2018 6:51 pm
by Therax
Summarized from Discord:

Code: Select all

/c game.create_surface("justdirt", {
  default_enable_all_autoplace_controls=false,
  autoplace_settings={
    tile={
      treat_missing_as_default=false,
      settings={
        ["dirt-6"]={ frequency="normal", size="normal", richness="normal" }
      }
    }
  }
})
Produces a surface with no tiles (or anything else) generated at all. I expect a surface with only "dirt-6" tiles.

Reading back the values via "/c log(serpent.block(game.surfaces["justdirt"].map_gen_settings))" shows the values were properly persisted:

Code: Select all

autoplace_settings = {
    tile = {
      settings = {
        ["dirt-6"] = {
          frequency = "normal",
          richness = "normal",
          size = "normal"
        }
      },
      treat_missing_as_default = false
    }
  },
  cliff_settings = {
    cliff_elevation_0 = 10,
    cliff_elevation_interval = 10,
    name = "cliff"
  },
  height = 2000000,
  peaceful_mode = false,
  seed = 2826709816,
  starting_area = "normal",
  starting_points = {
    {
      x = 0,
      y = 0
    }
  },
  terrain_segmentation = "normal",
  water = "normal",
  width = 2000000
}
From Rseding91: "I can see in code what's broken around that logic. If an autoplace has a control ID it never cehcks the other settings. It's an easy fix."

Re: [Rseding91] [0.16.51] AutoplaceSettings are ignored for standard tiles

Posted: Tue Jul 31, 2018 3:42 am
by Rseding91
Fixed for 0.17.