Maxreader

Untitled

Apr 20th, 2020
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. local noise = require("noise")
  2.  
  3. data:extend{
  4. {
  5. type = "noise-expression",
  6. name = "lab-expr-1",
  7. expression = noise.define_noise_function(
  8. function(x, y, tile, map)
  9. return (((noise.ridge(x, 0, 1) - 0.5) *
  10. (noise.ridge(y, 0, 1) - 0.5)) * 16 + 1)
  11. end)
  12. }, {
  13. type = "noise-expression",
  14. name = "lab-expr-2",
  15. expression = noise.define_noise_function(
  16. function(x, y, tile, map)
  17. return (((noise.ridge(x, 0, 1) - 0.5) *
  18. (noise.ridge(y, 0, 1) - 0.5)) * -16 + 1)
  19. end)
  20. }
  21. }
  22.  
  23. data.raw["tile"]["lab-dark-1"].autoplace =
  24. {
  25. default_enabled = false
  26. }
  27. data.raw["tile"]["lab-dark-2"].autoplace =
  28. {
  29. default_enabled = false
  30. }
  31.  
  32. local mgp = data.raw["map-gen-presets"].default
  33. mgp["lab-preset"] = {
  34. name = "lab-preset",
  35. order = "z",
  36. basic_settings = {
  37. property_expression_names = {
  38. ["tile:lab-dark-1:probability"] = "lab-expr-1",
  39. ["tile:lab-dark-1:probability"] = "lab-expr-2"
  40. },
  41. water = "none",
  42. cliff_settings = {richness = 0},
  43. default_enable_all_autoplace_controls = false,
  44. autoplace_controls = {},
  45. autoplace_settings = {
  46. tile = {
  47. settings = {
  48. ["lab-dark-1"] = {probability = noise.var("lab-expr-1")},
  49. ["lab-dark-2"] = {probability = noise.var("lab-expr-2")}
  50. }
  51. }
  52. }
  53. },
  54. advanced_settings = {pollution = {enabled = false}}
  55. }
Advertisement
Add Comment
Please, Sign In to add comment