From d3b31a5894c7ef2046992df5e2c7849888779023 Mon Sep 17 00:00:00 2001 From: Valansch Date: Fri, 19 Jan 2018 22:33:54 +0100 Subject: [PATCH] moved map_gen.lua to map_gen/shared/generate.lua. Also fixed typo --- map_gen/combined/borg_planet.lua | 2 +- map_gen/combined/borg_planet_v2.lua | 2 +- map_gen/combined/dagobah_swamp.lua | 2 +- map_gen/combined/island_resort.lua | 2 +- map_gen/combined/red_planet_v2.lua | 2 +- map_gen/ores/fluffy_rainbows.lua | 2 +- map_gen/ores/harmonic_gen.lua | 2 +- map_gen/ores/neko_crazy_ores.lua | 2 +- map_gen/ores/resource_clustertruck.lua | 2 +- map_gen/presets/GoT.lua | 6 +++--- map_gen/presets/UK.lua | 4 ++-- map_gen/presets/antfarm.lua | 6 +++--- map_gen/presets/biome_test.lua | 4 ++-- map_gen/presets/cage.lua | 6 +++--- map_gen/presets/connected_dots.lua | 4 ++-- map_gen/presets/creation_of_adam.lua | 6 +++--- map_gen/presets/goat.lua | 6 +++--- map_gen/presets/lines_and_balls.lua | 6 +++--- map_gen/presets/manhattan.lua | 6 +++--- map_gen/presets/maori.lua | 6 +++--- map_gen/presets/mobius_strip.lua | 4 ++-- map_gen/presets/mona_lisa.lua | 6 +++--- map_gen/presets/north_america.lua | 4 ++-- map_gen/presets/template.lua | 6 +++--- map_gen/presets/turkey.lua | 4 ++-- map_gen/shape/maze.lua | 2 +- map_gen/shape/rectangular_spiral.lua | 4 ++-- .../{combined/grilledham_map_gen => shared}/builders.lua | 0 .../grilledham_map_gen/map_gen.lua => shared/generate.lua} | 2 +- .../generate_not_threaded.lua} | 2 +- map_gen/terrain/neko_bridged_rivers.lua | 2 +- map_gen/terrain/neko_river_overlay.lua | 2 +- 32 files changed, 58 insertions(+), 58 deletions(-) rename map_gen/{combined/grilledham_map_gen => shared}/builders.lua (100%) rename map_gen/{combined/grilledham_map_gen/map_gen.lua => shared/generate.lua} (99%) rename map_gen/{combined/grilledham_map_gen/map_gen_not_threaded.lua => shared/generate_not_threaded.lua} (99%) diff --git a/map_gen/combined/borg_planet.lua b/map_gen/combined/borg_planet.lua index 595c021d..03f554e2 100644 --- a/map_gen/combined/borg_planet.lua +++ b/map_gen/combined/borg_planet.lua @@ -1,7 +1,7 @@ --Author: MewMew -- !! ATTENTION !! -- Use water only in starting area as map setting!!! -require "map_genshared.perlin_noise" +require "map_gen.shared.perlin_noise" wreck_item_pool = {} wreck_item_pool = {{name="iron-gear-wheel", count=32},{name="iron-plate", count=64},{name="rocket-control-unit", count=1},{name="rocket-fuel", count=7} ,{name="coal", count=8},{name="rocket-launcher", count=1},{name="rocket", count=32},{name="copper-cable", count=128},{name="land-mine", count=64},{name="railgun", count=1},{name="railgun-dart", count=128},{name="fast-inserter", count=8},{name="stack-filter-inserter", count=2},{name="belt-immunity-equipment", count=1},{name="fusion-reactor-equipment", count=1},{name="electric-engine-unit", count=8},{name="exoskeleton-equipment", count=1},{name="rocket-fuel", count=10},{name="used-up-uranium-fuel-cell", count=3},{name="uranium-fuel-cell", count=2},{name="power-armor", count=1},{name="modular-armor", count=1},{name="water-barrel", count=4},{name="sulfuric-acid-barrel", count=6},{name="crude-oil-barrel", count=8},{name="energy-shield-equipment", count=1},{name="explosive-rocket", count=32}} diff --git a/map_gen/combined/borg_planet_v2.lua b/map_gen/combined/borg_planet_v2.lua index 8e819509..e9d88fe2 100644 --- a/map_gen/combined/borg_planet_v2.lua +++ b/map_gen/combined/borg_planet_v2.lua @@ -1,7 +1,7 @@ --Author: MewMew -- !! ATTENTION !! -- Use water only in starting area as map setting!!! -require "map_genshared.perlin_noise" +require "map_gen.shared.perlin_noise" local Thread = require "utils.Thread" wreck_item_pool = {} diff --git a/map_gen/combined/dagobah_swamp.lua b/map_gen/combined/dagobah_swamp.lua index b7a3d6f5..b6d27107 100644 --- a/map_gen/combined/dagobah_swamp.lua +++ b/map_gen/combined/dagobah_swamp.lua @@ -2,7 +2,7 @@ -- Threaded by Tris -- !! ATTENTION !! -- Use water only in starting area as map setting!!! -require "map_genshared.perlin_noise" +require "map_gen.shared.perlin_noise" local Thread = require "utils.Thread" wreck_item_pool = {} wreck_item_pool = {{name="iron-gear-wheel", count=32},{name="iron-plate", count=64},{name="rocket-control-unit", count=1} ,{name="coal", count=4},{name="rocket-launcher", count=1},{name="rocket", count=32},{name="copper-cable", count=128},{name="land-mine", count=64},{name="railgun", count=1},{name="railgun-dart", count=128},{name="fast-inserter", count=8},{name="stack-filter-inserter", count=2},{name="belt-immunity-equipment", count=1},{name="fusion-reactor-equipment", count=1},{name="electric-engine-unit", count=8},{name="exoskeleton-equipment", count=1},{name="rocket-fuel", count=10},{name="used-up-uranium-fuel-cell", count=3},{name="uranium-fuel-cell", count=2}} diff --git a/map_gen/combined/island_resort.lua b/map_gen/combined/island_resort.lua index 44aadd3d..c088bd8e 100644 --- a/map_gen/combined/island_resort.lua +++ b/map_gen/combined/island_resort.lua @@ -1,5 +1,5 @@ --Author: MewMew -require "map_genshared.perlin_noise" +require "map_gen.shared.perlin_noise" local Thread = require "utils.Thread" local radius = 129 diff --git a/map_gen/combined/red_planet_v2.lua b/map_gen/combined/red_planet_v2.lua index 96487242..762cd512 100644 --- a/map_gen/combined/red_planet_v2.lua +++ b/map_gen/combined/red_planet_v2.lua @@ -3,7 +3,7 @@ -- !! ATTENTION !! -- Use water only in starting area as map setting!!! -require "map_genshared.perlin_noise" +require "map_gen.shared.perlin_noise" local Thread = require "utils.Thread" wreck_item_pool = {} diff --git a/map_gen/ores/fluffy_rainbows.lua b/map_gen/ores/fluffy_rainbows.lua index 3824e5c8..625a8323 100644 --- a/map_gen/ores/fluffy_rainbows.lua +++ b/map_gen/ores/fluffy_rainbows.lua @@ -1,6 +1,6 @@ --Author: MewMew -require "map_genshared.perlin_noise" +require "map_gen.shared.perlin_noise" function run_combined_module(event) if not global.perlin_noise_seed then global.perlin_noise_seed = math.random(1000,1000000) end diff --git a/map_gen/ores/harmonic_gen.lua b/map_gen/ores/harmonic_gen.lua index 061ffdcf..c961afc2 100644 --- a/map_gen/ores/harmonic_gen.lua +++ b/map_gen/ores/harmonic_gen.lua @@ -1,4 +1,4 @@ -require "map_genshared.perlin_noise" +require "map_gen.shared.perlin_noise" -- list of {x, y, ore_type, size, richness, rng_seed} local ctrs = { diff --git a/map_gen/ores/neko_crazy_ores.lua b/map_gen/ores/neko_crazy_ores.lua index 90998ca3..c9cd8f8c 100644 --- a/map_gen/ores/neko_crazy_ores.lua +++ b/map_gen/ores/neko_crazy_ores.lua @@ -1,4 +1,4 @@ -require "map_genshared.perlin_noise" +require "map_gen.shared.perlin_noise" local random_ores = {"iron-ore","coal","copper-ore","stone","uranium-ore"} local random_dense = {1.15,0.8,1,0.9, 0.5} --ore density reference diff --git a/map_gen/ores/resource_clustertruck.lua b/map_gen/ores/resource_clustertruck.lua index 1c76f8fa..f1308d17 100644 --- a/map_gen/ores/resource_clustertruck.lua +++ b/map_gen/ores/resource_clustertruck.lua @@ -1,6 +1,6 @@ --Author: MewMew -require "map_genshared.perlin_noise" +require "map_gen.shared.perlin_noise" function run_combined_module(event) if not global.resource_cluster_truck then global.resource_cluster_truck = 1 end diff --git a/map_gen/presets/GoT.lua b/map_gen/presets/GoT.lua index 1baa569e..c58ab80d 100644 --- a/map_gen/presets/GoT.lua +++ b/map_gen/presets/GoT.lua @@ -1,7 +1,7 @@ -require "map_gencombined.grilledham_map_gen.map_gen" -require "map_gencombined.grilledham_map_gen.builders" +require "map_gen.shared.generate" +require "map_gen.combined.grilledham_map_gen.builders" map_gen_decoratives = true -local pic = require "map_gendata.GoT" +local pic = require "map_gen.data.GoT" local pic = decompress(pic) local shape = picture_builder(pic) diff --git a/map_gen/presets/UK.lua b/map_gen/presets/UK.lua index 2fc11e16..cdb1cfb6 100644 --- a/map_gen/presets/UK.lua +++ b/map_gen/presets/UK.lua @@ -1,6 +1,6 @@ -require "map_gencombined.grilledham_map_gen.builders" +require "map_gen.combined.grilledham_map_gen.builders" -local pic = require "map_gendata.UK" +local pic = require "map_gen.data.UK" local pic = decompress(pic) local map = picture_builder(pic) diff --git a/map_gen/presets/antfarm.lua b/map_gen/presets/antfarm.lua index c9dde80a..59b8f29d 100644 --- a/map_gen/presets/antfarm.lua +++ b/map_gen/presets/antfarm.lua @@ -1,7 +1,7 @@ -require "map_gencombined.grilledham_map_gen.map_gen" -require "map_gencombined.grilledham_map_gen.builders" +require "map_gen.shared.generate" +require "map_gen.combined.grilledham_map_gen.builders" -local pic = require "map_gendata.antfarm" +local pic = require "map_gen.data.antfarm" local scale_factor = 12 local shape = picture_builder(pic.data, pic.width, pic.height) diff --git a/map_gen/presets/biome_test.lua b/map_gen/presets/biome_test.lua index 90f6dfb3..3935fdeb 100644 --- a/map_gen/presets/biome_test.lua +++ b/map_gen/presets/biome_test.lua @@ -1,8 +1,8 @@ -require "map_gencombined.grilledham_map_gen.map_gen" +require "map_gen.shared.generate" map_gen_decoratives = true -local pic = require "map_gendata.biome_test" +local pic = require "map_gen.data.biome_test" local shape = picture_builder(pic) diff --git a/map_gen/presets/cage.lua b/map_gen/presets/cage.lua index 710e9916..08780791 100644 --- a/map_gen/presets/cage.lua +++ b/map_gen/presets/cage.lua @@ -1,7 +1,7 @@ -require "map_gencombined.grilledham_map_gen.map_gen" -require "map_gencombined.grilledham_map_gen.builders" +require "map_gen.shared.generate" +require "map_gen.combined.grilledham_map_gen.builders" -local pic = require "map_gendata.cage" +local pic = require "map_gen.data.cage" local shape = picture_builder(pic.data, pic.width, pic.height) shape = translate(shape, 10, -96) diff --git a/map_gen/presets/connected_dots.lua b/map_gen/presets/connected_dots.lua index c8960953..be45647a 100644 --- a/map_gen/presets/connected_dots.lua +++ b/map_gen/presets/connected_dots.lua @@ -1,5 +1,5 @@ -require "map_gencombined.grilledham_map_gen.map_gen" -require "map_gencombined.grilledham_map_gen.builders" +require "map_gen.shared.generate" +require "map_gen.combined.grilledham_map_gen.builders" local function no_resources(x, y, world_x, world_y, tile, entity) local surface = MAP_GEN_SURFACE diff --git a/map_gen/presets/creation_of_adam.lua b/map_gen/presets/creation_of_adam.lua index 6654cd91..a26902c1 100644 --- a/map_gen/presets/creation_of_adam.lua +++ b/map_gen/presets/creation_of_adam.lua @@ -1,7 +1,7 @@ -require "map_gencombined.grilledham_map_gen.map_gen" -require "map_gencombined.grilledham_map_gen.builders" +require "map_gen.shared.generate" +require "map_gen.combined.grilledham_map_gen.builders" -local pic = require "map_gendata.creation_of_adam2" +local pic = require "map_gen.data.creation_of_adam2" local scale_factor = 3 local shape = picture_builder(pic.data, pic.width, pic.height) diff --git a/map_gen/presets/goat.lua b/map_gen/presets/goat.lua index 23a67d85..ab743519 100644 --- a/map_gen/presets/goat.lua +++ b/map_gen/presets/goat.lua @@ -1,7 +1,7 @@ -require "map_gencombined.grilledham_map_gen.map_gen" -require "map_gencombined.grilledham_map_gen.builders" +require "map_gen.shared.generate" +require "map_gen.combined.grilledham_map_gen.builders" -local pic = require "map_gendata.goat" +local pic = require "map_gen.data.goat" local shape = picture_builder(pic.data, pic.width, pic.height) shape = translate(shape, 10, -96) diff --git a/map_gen/presets/lines_and_balls.lua b/map_gen/presets/lines_and_balls.lua index 5dca77c0..073f4c2d 100644 --- a/map_gen/presets/lines_and_balls.lua +++ b/map_gen/presets/lines_and_balls.lua @@ -2,9 +2,9 @@ map_gen_decoratives = false -- Generate our own decoratives map_gen_rows_per_tick = 4 -- Inclusive integer between 1 and 32. Used for map_gen_threaded, higher numbers will generate map quicker but cause more lag. -- Recommend to use map_gen, but map_gen_not_threaded may be useful for testing / debugging. -require "map_gencombined.grilledham_map_gen.map_gen_not_threaded" ---require "map_gencombined.grilledham_map_gen.map_gen" -require "map_gencombined.grilledham_map_gen.builders" +require "map_gen.shared.generate_not_threaded" +--require "map_gen.shared.generate" +require "map_gen.combined.grilledham_map_gen.builders" local big_circle = circle_builder(150) local small_circle = circle_builder(140) diff --git a/map_gen/presets/manhattan.lua b/map_gen/presets/manhattan.lua index 0377f1d3..71454e4d 100644 --- a/map_gen/presets/manhattan.lua +++ b/map_gen/presets/manhattan.lua @@ -1,7 +1,7 @@ -require "map_gencombined.grilledham_map_gen.map_gen" -require "map_gencombined.grilledham_map_gen.builders" +require "map_gen.shared.generate" +require "map_gen.combined.grilledham_map_gen.builders" -local pic = require "map_gendata.manhattan" +local pic = require "map_gen.data.manhattan" local shape = picture_builder(pic.data, pic.width, pic.height) shape = translate(shape, 10, -96) diff --git a/map_gen/presets/maori.lua b/map_gen/presets/maori.lua index 750b7219..3d434c18 100644 --- a/map_gen/presets/maori.lua +++ b/map_gen/presets/maori.lua @@ -1,7 +1,7 @@ -require "map_gencombined.grilledham_map_gen.map_gen" -require "map_gencombined.grilledham_map_gen.builders" +require "map_gen.shared.generate" +require "map_gen.combined.grilledham_map_gen.builders" -local pic = require "map_gendata.maori" +local pic = require "map_gen.data.maori" local shape = picture_builder(pic.data, pic.width, pic.height) shape = translate(shape, 10, -96) diff --git a/map_gen/presets/mobius_strip.lua b/map_gen/presets/mobius_strip.lua index baf058be..b57f17f6 100644 --- a/map_gen/presets/mobius_strip.lua +++ b/map_gen/presets/mobius_strip.lua @@ -1,5 +1,5 @@ -require "map_gencombined.grilledham_map_gen.map_gen" -require "map_gencombined.grilledham_map_gen.builders" +require "map_gen.shared.generate" +require "map_gen.combined.grilledham_map_gen.builders" local inner_circle = invert(circle_builder(48)) local outer_circle = circle_builder(64) diff --git a/map_gen/presets/mona_lisa.lua b/map_gen/presets/mona_lisa.lua index 2e57dcdf..b324bbca 100644 --- a/map_gen/presets/mona_lisa.lua +++ b/map_gen/presets/mona_lisa.lua @@ -1,7 +1,7 @@ -require "map_gencombined.grilledham_map_gen.map_gen" -require "map_gencombined.grilledham_map_gen.builders" +require "map_gen.shared.generate" +require "map_gen.combined.grilledham_map_gen.builders" -local pic = require "map_gendata.color_mona_lisa" +local pic = require "map_gen.data.color_mona_lisa" local shape = picture_builder(pic.data, pic.width, pic.height) shape = translate(shape, 10, -96) diff --git a/map_gen/presets/north_america.lua b/map_gen/presets/north_america.lua index 404d63fe..05a2220c 100644 --- a/map_gen/presets/north_america.lua +++ b/map_gen/presets/north_america.lua @@ -1,6 +1,6 @@ -require "map_gencombined.grilledham_map_gen.map_gen" +require "map_gen.shared.generate" map_gen_decoratives = true -local pic = require "map_gendata.north_america" +local pic = require "map_gen.data.north_america" local pic = decompress(pic) local map = picture_builder(pic) diff --git a/map_gen/presets/template.lua b/map_gen/presets/template.lua index 3a8c5ae1..f13fe920 100644 --- a/map_gen/presets/template.lua +++ b/map_gen/presets/template.lua @@ -2,10 +2,10 @@ map_gen_decoratives = false -- Generate our own decoratives map_gen_rows_per_tick = 4 -- Inclusive integer between 1 and 32. Used for map_gen_threaded, higher numbers will generate map quicker but cause more lag. -- Recommend to use map_gen, but map_gen_not_threaded may be useful for testing / debugging. ---require "map_gencombined.grilledham_map_gen.map_gen_not_threaded" -require "map_gencombined.grilledham_map_gen.map_gen" +--require "map_gen.shared.generate_not_threaded" +require "map_gen.shared.generate" -local pic = require "map_gendata.template" +local pic = require "map_gen.data.template" local pic = decompress(pic) local map = picture_builder(pic) diff --git a/map_gen/presets/turkey.lua b/map_gen/presets/turkey.lua index abc7f562..497de401 100644 --- a/map_gen/presets/turkey.lua +++ b/map_gen/presets/turkey.lua @@ -1,7 +1,7 @@ -require "map_gencombined.grilledham_map_gen.map_gen" +require "map_gen.shared.generate" map_gen_decoratives = true -local pic = require "map_gendata.turkey" +local pic = require "map_gen.data.turkey" local pic = decompress(pic) local shape = picture_builder(pic) diff --git a/map_gen/shape/maze.lua b/map_gen/shape/maze.lua index 4630efa2..e085f4ae 100644 --- a/map_gen/shape/maze.lua +++ b/map_gen/shape/maze.lua @@ -1,4 +1,4 @@ -require "map_genshared.chunk_utils" +require "map_gen.shared.chunk_utils" local wall_thickness = 1 local cell_size = 3 --must be an uneven number diff --git a/map_gen/shape/rectangular_spiral.lua b/map_gen/shape/rectangular_spiral.lua index dc4fc9ca..f46ecf93 100644 --- a/map_gen/shape/rectangular_spiral.lua +++ b/map_gen/shape/rectangular_spiral.lua @@ -1,5 +1,5 @@ -require "map_genshared.compass" -require "map_genshared.chunk_utils" +require "map_gen.shared.compass" +require "map_gen.shared.chunk_utils" local compass = Compass.new() local pixels={} diff --git a/map_gen/combined/grilledham_map_gen/builders.lua b/map_gen/shared/builders.lua similarity index 100% rename from map_gen/combined/grilledham_map_gen/builders.lua rename to map_gen/shared/builders.lua diff --git a/map_gen/combined/grilledham_map_gen/map_gen.lua b/map_gen/shared/generate.lua similarity index 99% rename from map_gen/combined/grilledham_map_gen/map_gen.lua rename to map_gen/shared/generate.lua index 844597ea..a02ba2ff 100644 --- a/map_gen/combined/grilledham_map_gen/map_gen.lua +++ b/map_gen/shared/generate.lua @@ -1,4 +1,4 @@ -require("map_gencombined.grilledham_map_gen.builders") +require("map_gen.combined.grilledham_map_gen.builders") require("utils.poisson_rng") local Thread = require "utils.Thread" diff --git a/map_gen/combined/grilledham_map_gen/map_gen_not_threaded.lua b/map_gen/shared/generate_not_threaded.lua similarity index 99% rename from map_gen/combined/grilledham_map_gen/map_gen_not_threaded.lua rename to map_gen/shared/generate_not_threaded.lua index 55978558..b004c77e 100644 --- a/map_gen/combined/grilledham_map_gen/map_gen_not_threaded.lua +++ b/map_gen/shared/generate_not_threaded.lua @@ -1,4 +1,4 @@ -require("map_gencombined.grilledham_map_gen.builders") +require("map_gen.combined.grilledham_map_gen.builders") require("utils.poisson_rng") local function do_row(row, data) diff --git a/map_gen/terrain/neko_bridged_rivers.lua b/map_gen/terrain/neko_bridged_rivers.lua index 1287a406..00af291f 100644 --- a/map_gen/terrain/neko_bridged_rivers.lua +++ b/map_gen/terrain/neko_bridged_rivers.lua @@ -1,5 +1,5 @@ -require "map_genshared.perlin_noise" +require "map_gen.shared.perlin_noise" local tree_to_place = {"dry-tree","dry-hairy-tree","tree-06","tree-06","tree-01","tree-02","tree-03"} diff --git a/map_gen/terrain/neko_river_overlay.lua b/map_gen/terrain/neko_river_overlay.lua index 6bbc5b3e..7b9a5b40 100644 --- a/map_gen/terrain/neko_river_overlay.lua +++ b/map_gen/terrain/neko_river_overlay.lua @@ -1,5 +1,5 @@ -require "map_genshared.perlin_noise" +require "map_gen.shared.perlin_noise" local tree_to_place = {"dry-tree","dry-hairy-tree","tree-06","tree-06","tree-01","tree-02","tree-03"}