From e52341219acc7572130896ea2014233a5e65a61b Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Thu, 28 Dec 2017 18:17:29 +0100 Subject: [PATCH 01/12] island resort: implemented run_chart_update. Ported commit 68397ed7f96 --- locale/gen_combined/island_resort.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/locale/gen_combined/island_resort.lua b/locale/gen_combined/island_resort.lua index 1ad01641..dc6ff973 100644 --- a/locale/gen_combined/island_resort.lua +++ b/locale/gen_combined/island_resort.lua @@ -19,8 +19,10 @@ function run_combined_module(event) -- run_island( {area = event.area, surface = event.surface, x = x}) end Thread.queue_action("run_island_place_tiles", {surface = event.surface}) + Thread.queue_action("run_chart_update", {area = event.area, surface = event.surface} end + global.island_tiles_hold = {} global.island_decoratives_hold = {} @@ -37,6 +39,15 @@ function run_island_place_tiles(params) end end +function run_chart_update(params) + local x = params.area.left_top.x / 32 + local y = params.area.left_top.y / 32 + if game.forces.player.is_chunk_charted(params.surface, {x,y} ) then + -- Don't use full area, otherwise adjacent chunks get charted + game.forces.player.chart(params.surface, {{ params.area.left_top.x, params.area.left_top.y}, { params.area.left_top.x+30, params.area.left_top.y+30} } ) + end +end + function run_island( params ) local area = params.area local surface = params.surface From 13bd4969f0d545c31d61da3fea738e1e4925206e Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Thu, 28 Dec 2017 19:11:25 +0100 Subject: [PATCH 02/12] ported tile names from 0.15 to 0.16 --- locale/gen_combined/borg_planet.lua | 10 ++-- locale/gen_combined/borg_planet_v2.lua | 8 +-- locale/gen_combined/dagobah_swamp.lua | 16 ++--- .../grilledham_map_gen/builders.lua | 30 +++++----- .../grilledham_map_gen/map_gen.lua | 58 +++++++++---------- .../grilledham_map_gen/presets/antfarm.lua | 2 +- .../presets/connected_dots.lua | 2 +- .../presets/creation_of_adam.lua | 2 +- locale/gen_combined/island_resort.lua | 40 ++++++------- locale/gen_combined/red_planet.lua | 16 ++--- locale/gen_combined/red_planet_v2.lua | 16 ++--- locale/gen_terrain/neko_bridged_rivers.lua | 16 ++--- locale/gen_terrain/neko_river_overlay.lua | 2 +- 13 files changed, 109 insertions(+), 109 deletions(-) diff --git a/locale/gen_combined/borg_planet.lua b/locale/gen_combined/borg_planet.lua index f46e156d..222b9480 100644 --- a/locale/gen_combined/borg_planet.lua +++ b/locale/gen_combined/borg_planet.lua @@ -288,7 +288,7 @@ function run_combined_module(event) local entities = surface.find_entities(area) for _, entity in pairs(entities) do if entity.type == "resource" then - --table.insert(resource_tiles, {name = "sand-dark", position = entity.position}) + --table.insert(resource_tiles, {name = "sand-3", position = entity.position}) special_tiles = false end if entity.type == "simple-entity" or entity.type == "tree" then @@ -304,7 +304,7 @@ function run_combined_module(event) local pos_y = event.area.left_top.y + y local pos = {x = pos_x,y = pos_y} local tile = surface.get_tile(pos_x,pos_y) - local tile_to_insert = "sand" + local tile_to_insert = "sand-1" local entity_placed = false local seed_increment_number = 10000 @@ -338,7 +338,7 @@ function run_combined_module(event) end if noise_trees > 0.4 then - tile_to_insert = "sand-dark" + tile_to_insert = "sand-3" end if noise_borg_defense > 0.4 then tile_to_insert = "concrete" @@ -411,7 +411,7 @@ function run_combined_module(event) tile_to_insert = "stone-path" end - if noise_trees > 0.4 and tile_to_insert == "sand-dark" then + if noise_trees > 0.4 and tile_to_insert == "sand-3" then if math.random(1,20) == 1 then if event.surface.can_place_entity {name="dry-tree", position={pos_x,pos_y}} then event.surface.create_entity {name="dry-tree", position={pos_x,pos_y}} @@ -446,7 +446,7 @@ function run_combined_module(event) end if noise_trees < -0.5 then - if tile_to_insert == "sand-dark" or tile_to_insert == "sand" then + if tile_to_insert == "sand-3" or tile_to_insert == "sand-1" then if math.random(1,15) == 1 then if event.surface.can_place_entity {name="stone-rock", position={pos_x,pos_y}} then event.surface.create_entity {name="stone-rock", position={pos_x,pos_y}} diff --git a/locale/gen_combined/borg_planet_v2.lua b/locale/gen_combined/borg_planet_v2.lua index 623f03e5..3a2da007 100644 --- a/locale/gen_combined/borg_planet_v2.lua +++ b/locale/gen_combined/borg_planet_v2.lua @@ -307,7 +307,7 @@ function run_borg( params ) local pos_y = area.left_top.y + y local pos = {x = pos_x,y = pos_y} local tile = surface.get_tile(pos_x,pos_y) - local tile_to_insert = "sand" + local tile_to_insert = "sand-1" local entity_placed = false local seed_increment_number = 10000 @@ -349,7 +349,7 @@ function run_borg( params ) end if noise_trees > 0.17 then - tile_to_insert = "sand-dark" + tile_to_insert = "sand-3" end if noise_borg_defense > 0.4 then tile_to_insert = "concrete" @@ -399,7 +399,7 @@ function run_borg( params ) end - if noise_trees > 0.2 and tile_to_insert == "sand-dark" then + if noise_trees > 0.2 and tile_to_insert == "sand-3" then if math.random(1,15) == 1 then if math.random(1,5) == 1 then if surface.can_place_entity {name="dry-hairy-tree", position={pos_x,pos_y}} then @@ -450,7 +450,7 @@ function run_borg( params ) end if noise_trees < -0.5 then - if tile_to_insert == "sand-dark" or tile_to_insert == "sand" then + if tile_to_insert == "sand-3" or tile_to_insert == "sand-1" then if math.random(1,15) == 1 then if surface.can_place_entity {name="stone-rock", position={pos_x,pos_y}} then surface.create_entity {name="stone-rock", position={pos_x,pos_y}} diff --git a/locale/gen_combined/dagobah_swamp.lua b/locale/gen_combined/dagobah_swamp.lua index 6c128a2e..627a0c28 100644 --- a/locale/gen_combined/dagobah_swamp.lua +++ b/locale/gen_combined/dagobah_swamp.lua @@ -322,10 +322,10 @@ function run_swamp_entities(params) local tile = surface.get_tile(pos_x,pos_y) local tile_to_insert = tile local entity_placed = false - -- or tile.name == "grass-dry" + -- or tile.name == "grass-2" --if tile.name ~= "water" and tile.name ~= "deepwater" and tile.name ~= "water-green" then if tile.name ~= "water-green" then - table.insert(global.swamp_tiles_hold, {name = "grass", position = {pos_x,pos_y}}) + table.insert(global.swamp_tiles_hold, {name = "grass-1", position = {pos_x,pos_y}}) local entity_list = {} table.insert(entity_list, {name="big-ship-wreck-1", pos={pos_x,pos_y},chance = 65000, health="random"}) @@ -434,18 +434,18 @@ function run_swamp_cleanup(params) local tile = surface.get_tile(pos_x, pos_y) local decal_has_been_placed = false - if tile.name == "grass" then + if tile.name == "grass-1" then if decal_has_been_placed == false then local r = math.random(1,3) if r == 1 then - table.insert(decoratives, {name="green-carpet-grass", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="green-carpet-grass-1", position={pos_x,pos_y}, amount=1}) decal_has_been_placed = false end end if decal_has_been_placed == false then local r = math.random(1,7) if r == 1 then - table.insert(decoratives, {name="green-hairy-grass", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="green-hairy-grass-1", position={pos_x,pos_y}, amount=1}) decal_has_been_placed = false end end @@ -466,7 +466,7 @@ function run_swamp_cleanup(params) if decal_has_been_placed == false then local r = math.random(1,12) if r == 1 then - table.insert(decoratives, {name="green-small-grass", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="green-small-grass-1", position={pos_x,pos_y}, amount=1}) decal_has_been_placed = false end end @@ -483,14 +483,14 @@ function run_swamp_cleanup(params) if decal_has_been_placed == false then local r = math.random(1,18) if r == 1 then - table.insert(decoratives, {name="green-carpet-grass", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="green-carpet-grass-1", position={pos_x,pos_y}, amount=1}) decal_has_been_placed = false end end if decal_has_been_placed == false then local r = math.random(1,950) if r == 1 then - table.insert(decoratives, {name="green-small-grass", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="green-small-grass-1", position={pos_x,pos_y}, amount=1}) decal_has_been_placed = false end end diff --git a/locale/gen_combined/grilledham_map_gen/builders.lua b/locale/gen_combined/grilledham_map_gen/builders.lua index 28d126db..98f424a5 100644 --- a/locale/gen_combined/grilledham_map_gen/builders.lua +++ b/locale/gen_combined/grilledham_map_gen/builders.lua @@ -74,18 +74,18 @@ local tile_map = [3] = "concrete", [4] = "deepwater-green", [5] = "deepwater", - [6] = "dirt-1", - [7] = "dirt-2", - [8] = "dirt-3", - [9] = "dirt-4", - [10] = "dirt-5", - [11] = "dirt-6", - [12] = "dirt-7", - [13] = "dry-dirt", - [14] = "grass-1", - [15] = "grass-2", - [16] = "grass-3", - [17] = "grass-4", + [6] = "dirt-3-1", + [7] = "dirt-3-2", + [8] = "dirt-3-3", + [9] = "dirt-3-4", + [10] = "dirt-3-5", + [11] = "dirt-3-6", + [12] = "dirt-3-7", + [13] = "dry-dirt-3", + [14] = "grass-1-1", + [15] = "grass-1-2", + [16] = "grass-1-3", + [17] = "grass-1-4", [18] = "hazard-concrete-left", [19] = "hazard-concrete-right", [20] = "lab-dark-1", @@ -95,9 +95,9 @@ local tile_map = [24] = "red-desert-1", [25] = "red-desert-2", [26] = "red-desert-3", - [27] = "sand-1", - [28] = "sand-2", - [29] = "sand-3", + [27] = "sand-1-1", + [28] = "sand-1-2", + [29] = "sand-1-3", [30] = "stone-path", [31] = "water-green", [32] = "water" diff --git a/locale/gen_combined/grilledham_map_gen/map_gen.lua b/locale/gen_combined/grilledham_map_gen/map_gen.lua index c76b20c7..cc2d2d53 100644 --- a/locale/gen_combined/grilledham_map_gen/map_gen.lua +++ b/locale/gen_combined/grilledham_map_gen/map_gen.lua @@ -125,15 +125,15 @@ local decorative_options = { ["concrete"] = {}, ["deepwater"] = {}, ["deepwater-green"] = { - {"brown-carpet-grass", 100}, + {"brown-carpet-grass-1", 100}, {"brown-cane-cluster", 500}, }, - ["dirt"] = { - {"brown-carpet-grass", 100}, + ["dirt-3"] = { + {"brown-carpet-grass-1", 100}, {"brown-cane-cluster", 200}, {"red-desert-rock-tiny", 150}, }, - ["dirt-dark"] = { + ["dirt-6"] = { {"red-desert-rock-tiny", 150}, {"red-asterisk", 45}, {"red-desert-bush", 12}, @@ -141,41 +141,41 @@ local decorative_options = { }, - ["grass"] = { - {"green-carpet-grass", 3}, - {"green-hairy-grass", 7}, + ["grass-1"] = { + {"green-carpet-grass-1", 3}, + {"green-hairy-grass-1", 7}, {"green-bush-mini", 10}, {"green-pita", 6}, - {"green-small-grass", 12}, + {"green-small-grass-1", 12}, {"green-asterisk", 25}, {"green-bush-mini", 7}, {"garballo", 20}, }, - ["grass-medium"] = { - {"green-carpet-grass", 12}, - {"green-hairy-grass", 28}, + ["grass-3"] = { + {"green-carpet-grass-1", 12}, + {"green-hairy-grass-1", 28}, {"green-bush-mini", 40}, {"green-pita", 24}, - {"green-small-grass", 48}, + {"green-small-grass-1", 48}, {"green-asterisk", 100}, {"green-bush-mini", 28}, }, - ["grass-dry"] = { - {"green-hairy-grass", 56}, + ["grass-2"] = { + {"green-hairy-grass-1", 56}, {"green-bush-mini", 80}, {"green-pita", 48}, - {"green-small-grass", 96}, + {"green-small-grass-1", 96}, {"green-asterisk", 200}, {"green-bush-mini", 56}, {"brown-cane-cluster", 100}, - {"brown-carpet-grass", 100}, + {"brown-carpet-grass-1", 100}, }, ["hazard-concrete-left"] = {}, ["hazard-concrete-right"] = {}, ["lab-dark-1"] = {}, ["lab-dark-2"] = {}, ["red-desert"] = { - {"brown-carpet-grass", 35}, + {"brown-carpet-grass-1", 35}, {"orange-coral-mini", 45}, {"red-asterisk", 45}, {"red-desert-bush", 12}, @@ -184,7 +184,7 @@ local decorative_options = { {"red-desert-rock-tiny", 30}, }, ["red-desert-dark"] = { - {"brown-carpet-grass", 70}, + {"brown-carpet-grass-1", 70}, {"orange-coral-mini", 90}, {"red-asterisk", 90}, {"red-desert-bush", 35}, @@ -192,14 +192,14 @@ local decorative_options = { {"red-desert-rock-small", 200}, {"red-desert-rock-tiny", 150}, }, - ["sand"] = { - {"brown-carpet-grass", 35}, + ["sand-1"] = { + {"brown-carpet-grass-1", 35}, {"orange-coral-mini", 45}, {"red-asterisk", 45}, {"brown-asterisk", 45}, }, - ["sand-dark"] = { - {"brown-carpet-grass", 35}, + ["sand-3"] = { + {"brown-carpet-grass-1", 35}, {"orange-coral-mini", 45}, {"brown-asterisk", 45}, }, @@ -230,20 +230,20 @@ local entity_options = { ["deepwater-green"] = {}, ["water"] = {}, ["water-green"] = {}, - ["dirt"] = { + ["dirt-3"] = { {"tree-01", 500}, {"tree-06", 300}, {"tree-07", 800}, {"tree-09", 2000}, {"stone-rock", 400}, }, - ["dirt-dark"] = { + ["dirt-6"] = { {"tree-06", 150}, {"tree-07", 400}, {"tree-09", 1000}, {"stone-rock", 300}, }, - ["grass"] = { + ["grass-1"] = { {"tree-01", 150}, {"tree-04", 400}, {"tree-06", 400}, @@ -252,7 +252,7 @@ local entity_options = { {"stone-rock", 400}, {"green-coral", 10000}, }, - ["grass-medium"] = { + ["grass-3"] = { {"tree-02", 400}, {"tree-03", 400}, {"tree-04", 800}, @@ -262,7 +262,7 @@ local entity_options = { {"tree-09", 2000}, {"stone-rock", 400}, }, - ["grass-dry"] = { + ["grass-2"] = { {"tree-04", 800}, {"tree-06", 300}, {"tree-07", 400}, @@ -298,14 +298,14 @@ local entity_options = { {"red-desert-rock-huge-01", 400}, {"red-desert-rock-huge-02", 400}, }, - ["sand"] = { + ["sand-1"] = { {"dry-tree", 1000}, {"dry-hairy-tree", 1000}, {"dead-tree", 1000}, {"stone-rock", 150}, }, - ["sand-dark"] = { + ["sand-3"] = { {"dead-tree", 1000}, {"dry-tree", 1000}, {"dry-hairy-tree", 1000}, diff --git a/locale/gen_combined/grilledham_map_gen/presets/antfarm.lua b/locale/gen_combined/grilledham_map_gen/presets/antfarm.lua index 1777466e..9f6a60fc 100644 --- a/locale/gen_combined/grilledham_map_gen/presets/antfarm.lua +++ b/locale/gen_combined/grilledham_map_gen/presets/antfarm.lua @@ -12,6 +12,6 @@ map = translate(map, -12, 2) map = scale(map, scale_factor, scale_factor) --map = change_tile(map, false, "water") ---map = change_map_gen_collision_tile(map, "water-tile", "grass") +--map = change_map_gen_collision_tile(map, "water-tile", "grass-1") return map \ No newline at end of file diff --git a/locale/gen_combined/grilledham_map_gen/presets/connected_dots.lua b/locale/gen_combined/grilledham_map_gen/presets/connected_dots.lua index a2a2a24e..c7555b70 100644 --- a/locale/gen_combined/grilledham_map_gen/presets/connected_dots.lua +++ b/locale/gen_combined/grilledham_map_gen/presets/connected_dots.lua @@ -90,6 +90,6 @@ local pattern = local map = grid_pattern_builder(pattern, 2, 2, 480,480) map = choose(mediumn_dot, start, map) -map = change_map_gen_collision_tile(map,"water-tile", "grass") +map = change_map_gen_collision_tile(map,"water-tile", "grass-1") return map diff --git a/locale/gen_combined/grilledham_map_gen/presets/creation_of_adam.lua b/locale/gen_combined/grilledham_map_gen/presets/creation_of_adam.lua index da72ee29..0441e508 100644 --- a/locale/gen_combined/grilledham_map_gen/presets/creation_of_adam.lua +++ b/locale/gen_combined/grilledham_map_gen/presets/creation_of_adam.lua @@ -17,6 +17,6 @@ local pattern = local map = grid_pattern_builder(pattern, 2, 2, pic.width * scale_factor, pic.height * scale_factor) map = translate(map, 128 * scale_factor, 26 * scale_factor) -map = change_map_gen_collision_tile(map, "water-tile", "grass") +map = change_map_gen_collision_tile(map, "water-tile", "grass-1") return map \ No newline at end of file diff --git a/locale/gen_combined/island_resort.lua b/locale/gen_combined/island_resort.lua index dc6ff973..7af7dd10 100644 --- a/locale/gen_combined/island_resort.lua +++ b/locale/gen_combined/island_resort.lua @@ -119,7 +119,7 @@ function run_island( params ) local b = pos_x * pos_x local tile_distance_to_center = a + b if tile_distance_to_center + noise_island_starting <= radsquare then - tile_to_insert = "grass" + tile_to_insert = "grass-1" end if tile_distance_to_center + noise_island_starting > radsquare + 20000 then @@ -133,17 +133,17 @@ function run_island( params ) end if noise_island_stone_and_coal > 0.47 then - tile_to_insert = "grass-medium" + tile_to_insert = "grass-3" end if noise_island_stone_and_coal < -0.47 then - tile_to_insert = "grass-dry" + tile_to_insert = "grass-2" end if noise_island_iron_and_copper > 0.47 then - tile_to_insert = "sand" + tile_to_insert = "sand-1" end if noise_island_iron_and_copper < -0.47 then - tile_to_insert = "sand-dark" + tile_to_insert = "sand-3" end end @@ -152,19 +152,19 @@ function run_island( params ) if tile_to_insert ~= "water" then if noise_trees > 0.1 then local tree = "tree-01" - if tile_to_insert == "grass" then + if tile_to_insert == "grass-1" then tree = "tree-05" end - if tile_to_insert == "grass-dry" then + if tile_to_insert == "grass-2" then tree = "tree-02" end - if tile_to_insert == "grass-medium" then + if tile_to_insert == "grass-3" then tree = "tree-04" end - if tile_to_insert == "sand" then + if tile_to_insert == "sand-1" then tree = "tree-07" end - if tile_to_insert == "sand-dark" then + if tile_to_insert == "sand-3" then tree = "dry-hairy-tree" end if tile_to_insert == "red-desert" then @@ -185,14 +185,14 @@ function run_island( params ) end end - if tile_to_insert == "sand" or tile_to_insert == "sand-dark" then + if tile_to_insert == "sand-1" or tile_to_insert == "sand-3" then if math.random(1,200) == 1 then if surface.can_place_entity {name="stone-rock", position={pos_x,pos_y}} then surface.create_entity {name="stone-rock", position={pos_x,pos_y}} end end end - if tile_to_insert == "grass" or tile_to_insert == "grass-dry" or tile_to_insert == "grass-medium" then + if tile_to_insert == "grass-1" or tile_to_insert == "grass-2" or tile_to_insert == "grass-3" then if math.random(1,2000) == 1 then if surface.can_place_entity {name="stone-rock", position={pos_x,pos_y}} then surface.create_entity {name="stone-rock", position={pos_x,pos_y}} @@ -203,20 +203,20 @@ function run_island( params ) --Placement of Decoratives if tile_to_insert ~= "water" then if noise_decoratives > 0.3 then - local decorative = "green-carpet-grass" - if tile_to_insert == "grass" then + local decorative = "green-carpet-grass-1" + if tile_to_insert == "grass-1" then decorative = "green-pita" end - if tile_to_insert == "grass-dry" then + if tile_to_insert == "grass-2" then decorative = "green-pita" end - if tile_to_insert == "grass-medium" then + if tile_to_insert == "grass-3" then decorative = "green-pita" end - if tile_to_insert == "sand" then + if tile_to_insert == "sand-1" then decorative = "green-asterisk" end - if tile_to_insert == "sand-dark" then + if tile_to_insert == "sand-3" then decorative = "green-asterisk" end if tile_to_insert == "red-desert" then @@ -248,7 +248,7 @@ function run_island( params ) local noise_resource_amount_modifier = perlin:noise(((pos_x+seed)/200),((pos_y+seed)/200),0) local resource_amount = 1 + ((500 + (500*noise_resource_amount_modifier*0.2)) * resource_amount_distance_multiplicator) - if tile_to_insert == "sand" or tile_to_insert == "sand-dark" then + if tile_to_insert == "sand-1" or tile_to_insert == "sand-3" then if noise_island_iron_and_copper > 0.5 and noise_island_resource > 0.2 then if surface.can_place_entity {name="iron-ore", position={pos_x,pos_y}} then surface.create_entity {name="iron-ore", position={pos_x,pos_y}, amount=resource_amount} @@ -261,7 +261,7 @@ function run_island( params ) end end - if tile_to_insert == "grass-medium" or tile_to_insert == "grass-dry" then + if tile_to_insert == "grass-3" or tile_to_insert == "grass-2" then if noise_island_stone_and_coal > 0.5 and noise_island_resource > 0.2 then if surface.can_place_entity {name="stone", position={pos_x,pos_y}} then surface.create_entity {name="stone", position={pos_x,pos_y}, amount=resource_amount*1.5} diff --git a/locale/gen_combined/red_planet.lua b/locale/gen_combined/red_planet.lua index 7cb571ac..114a4778 100644 --- a/locale/gen_combined/red_planet.lua +++ b/locale/gen_combined/red_planet.lua @@ -287,8 +287,8 @@ function run_combined_module(event) local noise_terrain_5 = perlin:noise(((pos_x+seed)/5),((pos_y+seed)/5),0) noise_terrain_5 = noise_terrain_5 * 4 seed = seed + seed_increment_number - local noise_sand = perlin:noise(((pos_x+seed)/18),((pos_y+seed)/18),0) - noise_sand = noise_sand * 10 + local noise_sand-1 = perlin:noise(((pos_x+seed)/18),((pos_y+seed)/18),0) + noise_sand-1 = noise_sand-1 * 10 --DECORATIVES seed = seed + seed_increment_number @@ -353,8 +353,8 @@ function run_combined_module(event) if noise_terrain_1 < 8 + terrain_smoothing + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then tile_to_insert = "red-desert" - if noise_water_1 + noise_water_2 + noise_sand > -10 and noise_water_1 + noise_water_2 + noise_sand < 25 and noise_terrain_1 < -52 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then - tile_to_insert = "sand" + if noise_water_1 + noise_water_2 + noise_sand-1 > -10 and noise_water_1 + noise_water_2 + noise_sand-1 < 25 and noise_terrain_1 < -52 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then + tile_to_insert = "sand-1" place_tree_number = math.random(3,#tree_to_place) else place_tree_number = math.random(1,(#tree_to_place - 3)) @@ -372,7 +372,7 @@ function run_combined_module(event) table.insert(tiles, {name = tile_to_insert, position = {pos_x,a}}) if noise_water_1 + noise_water_2 < 2 or noise_water_1 + noise_water_2 > 13 then if math.random(1,15) == 1 then - table.insert(decoratives, {name="green-carpet-grass", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="green-carpet-grass-1", position={pos_x,pos_y}, amount=1}) end if math.random(1,15) == 1 then table.insert(decoratives, {name="brown-cane-cluster", position={pos_x,pos_y}, amount=1}) @@ -383,12 +383,12 @@ function run_combined_module(event) if tile_to_insert ~= "water" then if noise_water_1 + noise_water_2 > 16 and noise_water_1 + noise_water_2 < 25 and noise_terrain_1 < -55 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then if math.random(1,35) == 1 then - table.insert(decoratives, {name="brown-carpet-grass", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="brown-carpet-grass-1", position={pos_x,pos_y}, amount=1}) end end if noise_water_1 + noise_water_2 > -10 and noise_water_1 + noise_water_2 < -1 and noise_terrain_1 < -55 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then if math.random(1,35) == 1 then - table.insert(decoratives, {name="brown-carpet-grass", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="brown-carpet-grass-1", position={pos_x,pos_y}, amount=1}) end end if noise_decoratives_1 > 0.5 and noise_decoratives_1 <= 0.8 then @@ -502,7 +502,7 @@ function run_combined_module(event) table.insert(decoratives, {name="red-desert-rock-medium", position={pos_x,pos_y}, amount=1}) end else - if tile_to_insert ~= "water" and tile_to_insert ~= "sand" then + if tile_to_insert ~= "water" and tile_to_insert ~= "sand-1" then if math.random(1,15) == 1 then table.insert(decoratives, {name="red-desert-rock-small", position={pos_x,pos_y}, amount=1}) else diff --git a/locale/gen_combined/red_planet_v2.lua b/locale/gen_combined/red_planet_v2.lua index 91748151..d187fa1f 100644 --- a/locale/gen_combined/red_planet_v2.lua +++ b/locale/gen_combined/red_planet_v2.lua @@ -127,8 +127,8 @@ function run_planet( params ) local noise_terrain_5 = perlin:noise(((pos_x+seed)/5),((pos_y+seed)/5),0) noise_terrain_5 = noise_terrain_5 * 4 seed = seed + seed_increment_number - local noise_sand = perlin:noise(((pos_x+seed)/18),((pos_y+seed)/18),0) - noise_sand = noise_sand * 10 + local noise_sand-1 = perlin:noise(((pos_x+seed)/18),((pos_y+seed)/18),0) + noise_sand-1 = noise_sand-1 * 10 --DECORATIVES seed = seed + seed_increment_number @@ -193,8 +193,8 @@ function run_planet( params ) if noise_terrain_1 < 8 + terrain_smoothing + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then tile_to_insert = "red-desert" - if noise_water_1 + noise_water_2 + noise_sand > -10 and noise_water_1 + noise_water_2 + noise_sand < 25 and noise_terrain_1 < -52 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then - tile_to_insert = "sand" + if noise_water_1 + noise_water_2 + noise_sand-1 > -10 and noise_water_1 + noise_water_2 + noise_sand-1 < 25 and noise_terrain_1 < -52 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then + tile_to_insert = "sand-1" place_tree_number = math.random(3,#tree_to_place) else place_tree_number = math.random(1,(#tree_to_place - 3)) @@ -212,7 +212,7 @@ function run_planet( params ) table.insert(global.planet_tiles_hold, {name = tile_to_insert, position = {pos_x,a}}) if noise_water_1 + noise_water_2 < 2 or noise_water_1 + noise_water_2 > 13 then if math.random(1,15) == 1 then - table.insert(global.planet_decoratives_hold, {name="green-carpet-grass", position={pos_x,pos_y}, amount=1}) + table.insert(global.planet_decoratives_hold, {name="green-carpet-grass-1", position={pos_x,pos_y}, amount=1}) end if math.random(1,15) == 1 then table.insert(global.planet_decoratives_hold, {name="brown-cane-cluster", position={pos_x,pos_y}, amount=1}) @@ -223,12 +223,12 @@ function run_planet( params ) if tile_to_insert ~= "water" then if noise_water_1 + noise_water_2 > 16 and noise_water_1 + noise_water_2 < 25 and noise_terrain_1 < -55 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then if math.random(1,35) == 1 then - table.insert(global.planet_decoratives_hold, {name="brown-carpet-grass", position={pos_x,pos_y}, amount=1}) + table.insert(global.planet_decoratives_hold, {name="brown-carpet-grass-1", position={pos_x,pos_y}, amount=1}) end end if noise_water_1 + noise_water_2 > -10 and noise_water_1 + noise_water_2 < -1 and noise_terrain_1 < -55 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then if math.random(1,35) == 1 then - table.insert(global.planet_decoratives_hold, {name="brown-carpet-grass", position={pos_x,pos_y}, amount=1}) + table.insert(global.planet_decoratives_hold, {name="brown-carpet-grass-1", position={pos_x,pos_y}, amount=1}) end end if noise_decoratives_1 > 0.5 and noise_decoratives_1 <= 0.8 then @@ -342,7 +342,7 @@ function run_planet( params ) table.insert(global.planet_decoratives_hold, {name="red-desert-rock-medium", position={pos_x,pos_y}, amount=1}) end else - if tile_to_insert ~= "water" and tile_to_insert ~= "sand" then + if tile_to_insert ~= "water" and tile_to_insert ~= "sand-1" then if math.random(1,15) == 1 then table.insert(global.planet_decoratives_hold, {name="red-desert-rock-small", position={pos_x,pos_y}, amount=1}) else diff --git a/locale/gen_terrain/neko_bridged_rivers.lua b/locale/gen_terrain/neko_bridged_rivers.lua index a6e23237..b89b5524 100644 --- a/locale/gen_terrain/neko_bridged_rivers.lua +++ b/locale/gen_terrain/neko_bridged_rivers.lua @@ -41,7 +41,7 @@ function run_terrain_module(event) if tile.name ~= "out-of-map" then - local tile_to_insert = "grass-medium" + local tile_to_insert = "grass-3" local wiggle = 50 + perlin:noise((x*0.005),(y*0.005),global.terrain_seed_A + 71) * 60 local terrain_A = perlin:noise((x*0.005),(y*0.005),global.terrain_seed_A + 19) * wiggle --For determining where water is @@ -67,7 +67,7 @@ function run_terrain_module(event) --table.insert(tileswater, {name = "water", position = {x+1,y+1}}) else - if terrain_D >= 20 then tile_to_insert = "sand" end + if terrain_D >= 20 then tile_to_insert = "sand-1" end end elseif terrain_sqr > 70 then wiggle = 100 + perlin:noise((x*0.01),(y*0.01),global.terrain_seed_B + 41) * 60 @@ -106,9 +106,9 @@ function run_terrain_module(event) if terrain_D < 20 then - if terrain_C < 4 then --we set grass around near forest areas + if terrain_C < 4 then --we set grass-1 around near forest areas - tile_to_insert = "grass" + tile_to_insert = "grass-1" if terrain_C < -20 and math.random(1,3) == 1 then --dense trees local treenum = math.random(3,7) @@ -126,7 +126,7 @@ function run_terrain_module(event) end else if terrain_D < 30 then - tile_to_insert = "sand" + tile_to_insert = "sand-1" if terrain_C < -20 and math.random(1,7) == 1 then --dense trees local treenum = math.random(1,3) @@ -141,7 +141,7 @@ function run_terrain_module(event) end else - tile_to_insert = "sand-dark" + tile_to_insert = "sand-3" --if terrain_C > 40 and math.random(1,200) == 1 and surface.can_place_entity {name="crude-oil", position={pos_x,pos_y}} then -- surface.create_entity {name="crude-oil", position={pos_x,pos_y}, amount = math.random(20000,60000) +distance_bonus* 2000 } --end @@ -158,9 +158,9 @@ function run_terrain_module(event) if terrain_D >= 20 then if terrain_D < 30 then - tile_to_insert = "sand" + tile_to_insert = "sand-1" else - tile_to_insert = "sand-dark" + tile_to_insert = "sand-3" end end end diff --git a/locale/gen_terrain/neko_river_overlay.lua b/locale/gen_terrain/neko_river_overlay.lua index 04768ecf..1c75def9 100644 --- a/locale/gen_terrain/neko_river_overlay.lua +++ b/locale/gen_terrain/neko_river_overlay.lua @@ -29,7 +29,7 @@ function run_terrain_module(event) if tile.name ~= "out-of-map" then - --local tile_to_insert = "grass-medium" + --local tile_to_insert = "grass-3" local wiggle = 50 + perlin:noise((x*0.005),(y*0.005),global.terrain_seed_A + 71) * 60 local terrain_A = perlin:noise((x*0.005),(y*0.005),global.terrain_seed_A + 19) * wiggle --For determining where water is From 8207c277bb4b76df394a209b8a22dcd99e24bb7e Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Thu, 28 Dec 2017 20:53:48 +0100 Subject: [PATCH 03/12] fixed accidental name changes --- .../grilledham_map_gen/builders.lua | 31 ++++++++++--------- locale/gen_combined/red_planet.lua | 4 +-- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/locale/gen_combined/grilledham_map_gen/builders.lua b/locale/gen_combined/grilledham_map_gen/builders.lua index 98f424a5..727ce742 100644 --- a/locale/gen_combined/grilledham_map_gen/builders.lua +++ b/locale/gen_combined/grilledham_map_gen/builders.lua @@ -74,18 +74,18 @@ local tile_map = [3] = "concrete", [4] = "deepwater-green", [5] = "deepwater", - [6] = "dirt-3-1", - [7] = "dirt-3-2", - [8] = "dirt-3-3", - [9] = "dirt-3-4", - [10] = "dirt-3-5", - [11] = "dirt-3-6", - [12] = "dirt-3-7", - [13] = "dry-dirt-3", - [14] = "grass-1-1", - [15] = "grass-1-2", - [16] = "grass-1-3", - [17] = "grass-1-4", + [6] = "dirt-1", + [7] = "dirt-2", + [8] = "dirt-3", + [9] = "dirt-4", + [10] = "dirt-5", + [11] = "dirt-6", + [12] = "dirt-7", + [13] = "dry-dirt", + [14] = "grass-1", + [15] = "grass-2", + [16] = "grass-3", + [17] = "grass-4", [18] = "hazard-concrete-left", [19] = "hazard-concrete-right", [20] = "lab-dark-1", @@ -95,9 +95,9 @@ local tile_map = [24] = "red-desert-1", [25] = "red-desert-2", [26] = "red-desert-3", - [27] = "sand-1-1", - [28] = "sand-1-2", - [29] = "sand-1-3", + [27] = "sand-1", + [28] = "sand-2", + [29] = "sand-3", [30] = "stone-path", [31] = "water-green", [32] = "water" @@ -487,3 +487,4 @@ function apply_effect(builder, func) return tile, entity end end + diff --git a/locale/gen_combined/red_planet.lua b/locale/gen_combined/red_planet.lua index 114a4778..815c107a 100644 --- a/locale/gen_combined/red_planet.lua +++ b/locale/gen_combined/red_planet.lua @@ -287,8 +287,8 @@ function run_combined_module(event) local noise_terrain_5 = perlin:noise(((pos_x+seed)/5),((pos_y+seed)/5),0) noise_terrain_5 = noise_terrain_5 * 4 seed = seed + seed_increment_number - local noise_sand-1 = perlin:noise(((pos_x+seed)/18),((pos_y+seed)/18),0) - noise_sand-1 = noise_sand-1 * 10 + local noise_sand = perlin:noise(((pos_x+seed)/18),((pos_y+seed)/18),0) + noise_sand = noise_sand * 10 --DECORATIVES seed = seed + seed_increment_number From 3163d8c4e88f7646ce81a086742fe74fa169adb8 Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Thu, 28 Dec 2017 20:55:45 +0100 Subject: [PATCH 04/12] Added log output in case of error in Thread.lua --- locale/utils/Thread.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/locale/utils/Thread.lua b/locale/utils/Thread.lua index 7f893f4f..d5e16f77 100644 --- a/locale/utils/Thread.lua +++ b/locale/utils/Thread.lua @@ -24,7 +24,8 @@ local function on_tick() if global.actions_queue[1] then global.actions_queue_n = global.actions_queue_n - 1 local callback = global.actions_queue[1] - pcall(_G[callback.action], callback.params) + local _, err = pcall(_G[callback.action], callback.params) + if err then log(err) end table.remove(global.actions_queue, 1) end end From adda0b94a526dd58bbfd7632cb8bec937a2f7138 Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Thu, 28 Dec 2017 21:02:36 +0100 Subject: [PATCH 05/12] fixed missing ) --- locale/gen_combined/island_resort.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/locale/gen_combined/island_resort.lua b/locale/gen_combined/island_resort.lua index 7af7dd10..9a976d4e 100644 --- a/locale/gen_combined/island_resort.lua +++ b/locale/gen_combined/island_resort.lua @@ -19,7 +19,7 @@ function run_combined_module(event) -- run_island( {area = event.area, surface = event.surface, x = x}) end Thread.queue_action("run_island_place_tiles", {surface = event.surface}) - Thread.queue_action("run_chart_update", {area = event.area, surface = event.surface} + Thread.queue_action("run_chart_update", {area = event.area, surface = event.surface}) end @@ -126,10 +126,10 @@ function run_island( params ) --Placement of Island Tiles if noise_island_oil_and_uranium > 0.53 then - tile_to_insert = "red-desert" + tile_to_insert = "red-desert-0" end if noise_island_oil_and_uranium < -0.53 then - tile_to_insert = "red-desert-dark" + tile_to_insert = "red-desert-0-dark" end if noise_island_stone_and_coal > 0.47 then @@ -167,14 +167,14 @@ function run_island( params ) if tile_to_insert == "sand-3" then tree = "dry-hairy-tree" end - if tile_to_insert == "red-desert" then + if tile_to_insert == "red-desert-0" then tree = "dry-tree" end - if tile_to_insert == "red-desert-dark" then + if tile_to_insert == "red-desert-0-dark" then if math.random(1,3) == 1 then - tree = "red-desert-rock-huge-01" + tree = "red-desert-0-rock-huge-01" else - tree = "red-desert-rock-big-01" + tree = "red-desert-0-rock-big-01" end end if math.random(1,8) == 1 then @@ -219,19 +219,19 @@ function run_island( params ) if tile_to_insert == "sand-3" then decorative = "green-asterisk" end - if tile_to_insert == "red-desert" then + if tile_to_insert == "red-desert-0" then decorative = "red-asterisk" end - if tile_to_insert == "red-desert-dark" then + if tile_to_insert == "red-desert-0-dark" then decorative = "red-asterisk" end if math.random(1,5) == 1 then table.insert(global.island_decoratives_hold, {name=decorative, position={pos_x,pos_y}, amount=1}) end end - if tile_to_insert == "red-desert-dark" then + if tile_to_insert == "red-desert-0-dark" then if math.random(1,50) == 1 then - table.insert(global.island_decoratives_hold, {name="red-desert-rock-medium", position={pos_x,pos_y}, amount=1}) + table.insert(global.island_decoratives_hold, {name="red-desert-0-rock-medium", position={pos_x,pos_y}, amount=1}) end end end @@ -274,7 +274,7 @@ function run_island( params ) end end - if tile_to_insert == "red-desert" or tile_to_insert == "red-desert-dark" then + if tile_to_insert == "red-desert-0" or tile_to_insert == "red-desert-0-dark" then if noise_island_oil_and_uranium > 0.55 and noise_island_resource > 0.25 then if surface.can_place_entity {name="crude-oil", position={pos_x,pos_y}} then if math.random(1,60) == 1 then From 9cffe0e5e807d9d4b3ad2807ac427b7a56da3a60 Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Thu, 28 Dec 2017 21:32:22 +0100 Subject: [PATCH 06/12] further tile name changes --- locale/gen_combined/island_resort.lua | 22 +++++++++++----------- locale/gen_combined/red_planet.lua | 4 ++-- locale/gen_combined/red_planet_v2.lua | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/locale/gen_combined/island_resort.lua b/locale/gen_combined/island_resort.lua index 9a976d4e..cf54702c 100644 --- a/locale/gen_combined/island_resort.lua +++ b/locale/gen_combined/island_resort.lua @@ -126,10 +126,10 @@ function run_island( params ) --Placement of Island Tiles if noise_island_oil_and_uranium > 0.53 then - tile_to_insert = "red-desert-0" + tile_to_insert = "red-desert-1" end if noise_island_oil_and_uranium < -0.53 then - tile_to_insert = "red-desert-0-dark" + tile_to_insert = "red-desert-0" end if noise_island_stone_and_coal > 0.47 then @@ -167,14 +167,14 @@ function run_island( params ) if tile_to_insert == "sand-3" then tree = "dry-hairy-tree" end - if tile_to_insert == "red-desert-0" then + if tile_to_insert == "red-desert-1" then tree = "dry-tree" end - if tile_to_insert == "red-desert-0-dark" then + if tile_to_insert == "red-desert-0" then if math.random(1,3) == 1 then - tree = "red-desert-0-rock-huge-01" + tree = "red-desert-rock-huge-01" else - tree = "red-desert-0-rock-big-01" + tree = "red-desert-rock-big-01" end end if math.random(1,8) == 1 then @@ -219,19 +219,19 @@ function run_island( params ) if tile_to_insert == "sand-3" then decorative = "green-asterisk" end - if tile_to_insert == "red-desert-0" then + if tile_to_insert == "red-desert-1" then decorative = "red-asterisk" end - if tile_to_insert == "red-desert-0-dark" then + if tile_to_insert == "red-desert-0" then decorative = "red-asterisk" end if math.random(1,5) == 1 then table.insert(global.island_decoratives_hold, {name=decorative, position={pos_x,pos_y}, amount=1}) end end - if tile_to_insert == "red-desert-0-dark" then + if tile_to_insert == "red-desert-0" then if math.random(1,50) == 1 then - table.insert(global.island_decoratives_hold, {name="red-desert-0-rock-medium", position={pos_x,pos_y}, amount=1}) + table.insert(global.island_decoratives_hold, {name="red-desert-rock-medium", position={pos_x,pos_y}, amount=1}) end end end @@ -274,7 +274,7 @@ function run_island( params ) end end - if tile_to_insert == "red-desert-0" or tile_to_insert == "red-desert-0-dark" then + if tile_to_insert == "red-desert-1" or tile_to_insert == "red-desert-0" then if noise_island_oil_and_uranium > 0.55 and noise_island_resource > 0.25 then if surface.can_place_entity {name="crude-oil", position={pos_x,pos_y}} then if math.random(1,60) == 1 then diff --git a/locale/gen_combined/red_planet.lua b/locale/gen_combined/red_planet.lua index 815c107a..3346efc1 100644 --- a/locale/gen_combined/red_planet.lua +++ b/locale/gen_combined/red_planet.lua @@ -352,7 +352,7 @@ function run_combined_module(event) local place_tree_number if noise_terrain_1 < 8 + terrain_smoothing + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then - tile_to_insert = "red-desert" + tile_to_insert = "red-desert-1" if noise_water_1 + noise_water_2 + noise_sand-1 > -10 and noise_water_1 + noise_water_2 + noise_sand-1 < 25 and noise_terrain_1 < -52 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then tile_to_insert = "sand-1" place_tree_number = math.random(3,#tree_to_place) @@ -442,7 +442,7 @@ function run_combined_module(event) end end else - tile_to_insert = "red-desert-dark" + tile_to_insert = "red-desert-0" end if resource_entity_placed == false and noise_resources_coal_and_uranium + noise_resources < -72 and noise_terrain_1 > 65 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then if surface.can_place_entity {name="uranium-ore", position={pos_x,pos_y}} then diff --git a/locale/gen_combined/red_planet_v2.lua b/locale/gen_combined/red_planet_v2.lua index d187fa1f..b0441329 100644 --- a/locale/gen_combined/red_planet_v2.lua +++ b/locale/gen_combined/red_planet_v2.lua @@ -192,7 +192,7 @@ function run_planet( params ) local place_tree_number if noise_terrain_1 < 8 + terrain_smoothing + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then - tile_to_insert = "red-desert" + tile_to_insert = "red-desert-1" if noise_water_1 + noise_water_2 + noise_sand-1 > -10 and noise_water_1 + noise_water_2 + noise_sand-1 < 25 and noise_terrain_1 < -52 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then tile_to_insert = "sand-1" place_tree_number = math.random(3,#tree_to_place) @@ -282,7 +282,7 @@ function run_planet( params ) end end else - tile_to_insert = "red-desert-dark" + tile_to_insert = "red-desert-0" end if resource_entity_placed == false and noise_resources_coal_and_uranium + noise_resources < -72 and noise_terrain_1 > 65 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then if surface.can_place_entity {name="uranium-ore", position={pos_x,pos_y}} then From 1dd02d2e76fe88131a35dd227f43e212370dd302 Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Thu, 28 Dec 2017 21:54:19 +0100 Subject: [PATCH 07/12] changed additional variable names from sand-1 to sand --- locale/gen_combined/red_planet.lua | 2 +- locale/gen_combined/red_planet_v2.lua | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/gen_combined/red_planet.lua b/locale/gen_combined/red_planet.lua index 3346efc1..f7f19cb8 100644 --- a/locale/gen_combined/red_planet.lua +++ b/locale/gen_combined/red_planet.lua @@ -353,7 +353,7 @@ function run_combined_module(event) if noise_terrain_1 < 8 + terrain_smoothing + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then tile_to_insert = "red-desert-1" - if noise_water_1 + noise_water_2 + noise_sand-1 > -10 and noise_water_1 + noise_water_2 + noise_sand-1 < 25 and noise_terrain_1 < -52 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then + if noise_water_1 + noise_water_2 + noise_sand > -10 and noise_water_1 + noise_water_2 + noise_sand < 25 and noise_terrain_1 < -52 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then tile_to_insert = "sand-1" place_tree_number = math.random(3,#tree_to_place) else diff --git a/locale/gen_combined/red_planet_v2.lua b/locale/gen_combined/red_planet_v2.lua index b0441329..44265331 100644 --- a/locale/gen_combined/red_planet_v2.lua +++ b/locale/gen_combined/red_planet_v2.lua @@ -127,8 +127,8 @@ function run_planet( params ) local noise_terrain_5 = perlin:noise(((pos_x+seed)/5),((pos_y+seed)/5),0) noise_terrain_5 = noise_terrain_5 * 4 seed = seed + seed_increment_number - local noise_sand-1 = perlin:noise(((pos_x+seed)/18),((pos_y+seed)/18),0) - noise_sand-1 = noise_sand-1 * 10 + local noise_sand = perlin:noise(((pos_x+seed)/18),((pos_y+seed)/18),0) + noise_sand = noise_sand * 10 --DECORATIVES seed = seed + seed_increment_number @@ -193,7 +193,7 @@ function run_planet( params ) if noise_terrain_1 < 8 + terrain_smoothing + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then tile_to_insert = "red-desert-1" - if noise_water_1 + noise_water_2 + noise_sand-1 > -10 and noise_water_1 + noise_water_2 + noise_sand-1 < 25 and noise_terrain_1 < -52 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then + if noise_water_1 + noise_water_2 + noise_sand > -10 and noise_water_1 + noise_water_2 + noise_sand < 25 and noise_terrain_1 < -52 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then tile_to_insert = "sand-1" place_tree_number = math.random(3,#tree_to_place) else From b50f1b68afd65f297566529e93c636ec3c5b33d2 Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Thu, 28 Dec 2017 21:54:43 +0100 Subject: [PATCH 08/12] added build.sh to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1377554e..6dc773d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.swp +build.sh From ba1f81c3e644aa4344c3f5d9dd4bd2c719e4bc25 Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Thu, 28 Dec 2017 22:45:27 +0100 Subject: [PATCH 09/12] Renamed rocks and grass to 0.16 compatibe names --- .../grilledham_map_gen/map_gen.lua | 40 +++++++++---------- locale/gen_combined/island_resort.lua | 6 +-- locale/gen_combined/red_planet.lua | 26 ++++++------ locale/gen_combined/red_planet_v2.lua | 31 +++++++------- locale/gen_shared/ent_functions.lua | 8 ++-- 5 files changed, 54 insertions(+), 57 deletions(-) diff --git a/locale/gen_combined/grilledham_map_gen/map_gen.lua b/locale/gen_combined/grilledham_map_gen/map_gen.lua index cc2d2d53..3b409032 100644 --- a/locale/gen_combined/grilledham_map_gen/map_gen.lua +++ b/locale/gen_combined/grilledham_map_gen/map_gen.lua @@ -125,19 +125,19 @@ local decorative_options = { ["concrete"] = {}, ["deepwater"] = {}, ["deepwater-green"] = { - {"brown-carpet-grass-1", 100}, + {"brown-carpet-grass", 100}, {"brown-cane-cluster", 500}, }, ["dirt-3"] = { - {"brown-carpet-grass-1", 100}, + {"brown-carpet-grass", 100}, {"brown-cane-cluster", 200}, - {"red-desert-rock-tiny", 150}, + {"sand-rock-small", 150}, }, ["dirt-6"] = { - {"red-desert-rock-tiny", 150}, + {"sand-rock-small", 150}, {"red-asterisk", 45}, {"red-desert-bush", 12}, - {"red-desert-rock-medium", 375}, + {"rock-medium", 375}, }, @@ -168,38 +168,38 @@ local decorative_options = { {"green-asterisk", 200}, {"green-bush-mini", 56}, {"brown-cane-cluster", 100}, - {"brown-carpet-grass-1", 100}, + {"brown-carpet-grass", 100}, }, ["hazard-concrete-left"] = {}, ["hazard-concrete-right"] = {}, ["lab-dark-1"] = {}, ["lab-dark-2"] = {}, ["red-desert"] = { - {"brown-carpet-grass-1", 35}, + {"brown-carpet-grass", 35}, {"orange-coral-mini", 45}, {"red-asterisk", 45}, {"red-desert-bush", 12}, - {"red-desert-rock-medium", 375}, - {"red-desert-rock-small", 200}, - {"red-desert-rock-tiny", 30}, + {"rock-medium", 375}, + {"sand-rock-small", 200}, + {"sand-rock-small", 30}, }, ["red-desert-dark"] = { - {"brown-carpet-grass-1", 70}, + {"brown-carpet-grass", 70}, {"orange-coral-mini", 90}, {"red-asterisk", 90}, {"red-desert-bush", 35}, - {"red-desert-rock-medium", 375}, - {"red-desert-rock-small", 200}, - {"red-desert-rock-tiny", 150}, + {"rock-medium", 375}, + {"sand-rock-small", 200}, + {"sand-rock-small", 150}, }, ["sand-1"] = { - {"brown-carpet-grass-1", 35}, + {"brown-carpet-grass", 35}, {"orange-coral-mini", 45}, {"red-asterisk", 45}, {"brown-asterisk", 45}, }, ["sand-3"] = { - {"brown-carpet-grass-1", 35}, + {"brown-carpet-grass", 35}, {"orange-coral-mini", 45}, {"brown-asterisk", 45}, }, @@ -282,8 +282,8 @@ local entity_options = { {"tree-01", 500}, {"tree-02", 500}, {"tree-03", 500}, - {"red-desert-rock-big-01", 200}, - {"red-desert-rock-huge-01", 400}, + {"sand-rock-big", 200}, + {"sand-rock-big", 400}, {"red-desert-rock-huge-02", 400}, }, ["red-desert-dark"] = { @@ -294,8 +294,8 @@ local entity_options = { {"tree-01", 500}, {"tree-02", 500}, {"tree-03", 500}, - {"red-desert-rock-big-01", 200}, - {"red-desert-rock-huge-01", 400}, + {"sand-rock-big", 200}, + {"sand-rock-big", 400}, {"red-desert-rock-huge-02", 400}, }, ["sand-1"] = { diff --git a/locale/gen_combined/island_resort.lua b/locale/gen_combined/island_resort.lua index cf54702c..b406a7ee 100644 --- a/locale/gen_combined/island_resort.lua +++ b/locale/gen_combined/island_resort.lua @@ -172,9 +172,9 @@ function run_island( params ) end if tile_to_insert == "red-desert-0" then if math.random(1,3) == 1 then - tree = "red-desert-rock-huge-01" + tree = "sand-rock-big" else - tree = "red-desert-rock-big-01" + tree = "sand-rock-big" end end if math.random(1,8) == 1 then @@ -231,7 +231,7 @@ function run_island( params ) end if tile_to_insert == "red-desert-0" then if math.random(1,50) == 1 then - table.insert(global.island_decoratives_hold, {name="red-desert-rock-medium", position={pos_x,pos_y}, amount=1}) + table.insert(global.island_decoratives_hold, {name="rock-medium", position={pos_x,pos_y}, amount=1}) end end end diff --git a/locale/gen_combined/red_planet.lua b/locale/gen_combined/red_planet.lua index f7f19cb8..55c5bd92 100644 --- a/locale/gen_combined/red_planet.lua +++ b/locale/gen_combined/red_planet.lua @@ -383,12 +383,12 @@ function run_combined_module(event) if tile_to_insert ~= "water" then if noise_water_1 + noise_water_2 > 16 and noise_water_1 + noise_water_2 < 25 and noise_terrain_1 < -55 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then if math.random(1,35) == 1 then - table.insert(decoratives, {name="brown-carpet-grass-1", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="brown-carpet-grass", position={pos_x,pos_y}, amount=1}) end end if noise_water_1 + noise_water_2 > -10 and noise_water_1 + noise_water_2 < -1 and noise_terrain_1 < -55 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then if math.random(1,35) == 1 then - table.insert(decoratives, {name="brown-carpet-grass-1", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="brown-carpet-grass", position={pos_x,pos_y}, amount=1}) end end if noise_decoratives_1 > 0.5 and noise_decoratives_1 <= 0.8 then @@ -427,17 +427,17 @@ function run_combined_module(event) if tile_to_insert ~= "water" then if noise_terrain_1 < 8 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 and noise_terrain_1 > -5 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then if math.random(1,45) == 1 then - table.insert(decoratives, {name="red-desert-rock-medium", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="rock-medium", position={pos_x,pos_y}, amount=1}) end if math.random(1,20) == 1 then - table.insert(decoratives, {name="red-desert-rock-tiny", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="sand-rock-small", position={pos_x,pos_y}, amount=1}) end else if math.random(1,375) == 1 then - table.insert(decoratives, {name="red-desert-rock-medium", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="rock-medium", position={pos_x,pos_y}, amount=1}) end if math.random(1,45) == 1 then - table.insert(decoratives, {name="red-desert-rock-tiny", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="sand-rock-small", position={pos_x,pos_y}, amount=1}) end end end @@ -486,12 +486,12 @@ function run_combined_module(event) if resource_entity_placed == false and noise_red_desert_rocks_1 + noise_red_desert_rocks_2 + noise_red_desert_rocks_3 > 20 and noise_red_desert_rocks_1 + noise_red_desert_rocks_2 < 60 and noise_terrain_1 > 7 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then if math.random(1,3) == 1 then if math.random(1,3) == 1 then - if surface.can_place_entity {name="red-desert-rock-huge-01", position={pos_x,pos_y}} then - surface.create_entity {name="red-desert-rock-huge-01", position={pos_x,pos_y}} + if surface.can_place_entity {name="sand-rock-big", position={pos_x,pos_y}} then + surface.create_entity {name="sand-rock-big", position={pos_x,pos_y}} end else - if surface.can_place_entity {name="red-desert-rock-big-01", position={pos_x,pos_y}} then - surface.create_entity {name="red-desert-rock-big-01", position={pos_x,pos_y}} + if surface.can_place_entity {name="sand-rock-big", position={pos_x,pos_y}} then + surface.create_entity {name="sand-rock-big", position={pos_x,pos_y}} end end end @@ -499,15 +499,15 @@ function run_combined_module(event) if noise_red_desert_rocks_1 + noise_red_desert_rocks_2 + noise_red_desert_rocks_3 + noise_terrain_4 >= 10 and noise_red_desert_rocks_1 + noise_red_desert_rocks_2 + noise_red_desert_rocks_3 < 20 and noise_terrain_1 > 7 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then if math.random(1,5) == 1 then - table.insert(decoratives, {name="red-desert-rock-medium", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="rock-medium", position={pos_x,pos_y}, amount=1}) end else if tile_to_insert ~= "water" and tile_to_insert ~= "sand-1" then if math.random(1,15) == 1 then - table.insert(decoratives, {name="red-desert-rock-small", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="sand-rock-small", position={pos_x,pos_y}, amount=1}) else if math.random(1,8) == 1 then - table.insert(decoratives, {name="red-desert-rock-tiny", position={pos_x,pos_y}, amount=1}) + table.insert(decoratives, {name="sand-rock-small", position={pos_x,pos_y}, amount=1}) end end end diff --git a/locale/gen_combined/red_planet_v2.lua b/locale/gen_combined/red_planet_v2.lua index 44265331..483a3362 100644 --- a/locale/gen_combined/red_planet_v2.lua +++ b/locale/gen_combined/red_planet_v2.lua @@ -212,10 +212,7 @@ function run_planet( params ) table.insert(global.planet_tiles_hold, {name = tile_to_insert, position = {pos_x,a}}) if noise_water_1 + noise_water_2 < 2 or noise_water_1 + noise_water_2 > 13 then if math.random(1,15) == 1 then - table.insert(global.planet_decoratives_hold, {name="green-carpet-grass-1", position={pos_x,pos_y}, amount=1}) - end - if math.random(1,15) == 1 then - table.insert(global.planet_decoratives_hold, {name="brown-cane-cluster", position={pos_x,pos_y}, amount=1}) + table.insert(global.planet_decoratives_hold, {name="green-carpet-grass", position={pos_x,pos_y}, amount=1}) end end end @@ -223,12 +220,12 @@ function run_planet( params ) if tile_to_insert ~= "water" then if noise_water_1 + noise_water_2 > 16 and noise_water_1 + noise_water_2 < 25 and noise_terrain_1 < -55 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then if math.random(1,35) == 1 then - table.insert(global.planet_decoratives_hold, {name="brown-carpet-grass-1", position={pos_x,pos_y}, amount=1}) + table.insert(global.planet_decoratives_hold, {name="brown-carpet-grass", position={pos_x,pos_y}, amount=1}) end end if noise_water_1 + noise_water_2 > -10 and noise_water_1 + noise_water_2 < -1 and noise_terrain_1 < -55 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then if math.random(1,35) == 1 then - table.insert(global.planet_decoratives_hold, {name="brown-carpet-grass-1", position={pos_x,pos_y}, amount=1}) + table.insert(global.planet_decoratives_hold, {name="brown-carpet-grass", position={pos_x,pos_y}, amount=1}) end end if noise_decoratives_1 > 0.5 and noise_decoratives_1 <= 0.8 then @@ -267,17 +264,17 @@ function run_planet( params ) if tile_to_insert ~= "water" then if noise_terrain_1 < 8 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 and noise_terrain_1 > -5 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then if math.random(1,180) == 1 then - table.insert(global.planet_decoratives_hold, {name="red-desert-rock-medium", position={pos_x,pos_y}, amount=1}) + table.insert(global.planet_decoratives_hold, {name="rock-medium", position={pos_x,pos_y}, amount=1}) end if math.random(1,80) == 1 then - table.insert(global.planet_decoratives_hold, {name="red-desert-rock-tiny", position={pos_x,pos_y}, amount=1}) + table.insert(global.planet_decoratives_hold, {name="sand-rock-small", position={pos_x,pos_y}, amount=1}) end else if math.random(1,1500) == 1 then - table.insert(global.planet_decoratives_hold, {name="red-desert-rock-medium", position={pos_x,pos_y}, amount=1}) + table.insert(global.planet_decoratives_hold, {name="rock-medium", position={pos_x,pos_y}, amount=1}) end if math.random(1,180) == 1 then - table.insert(global.planet_decoratives_hold, {name="red-desert-rock-tiny", position={pos_x,pos_y}, amount=1}) + table.insert(global.planet_decoratives_hold, {name="sand-rock-small", position={pos_x,pos_y}, amount=1}) end end end @@ -326,12 +323,12 @@ function run_planet( params ) if resource_entity_placed == false and noise_red_desert_rocks_1 + noise_red_desert_rocks_2 + noise_red_desert_rocks_3 > 20 and noise_red_desert_rocks_1 + noise_red_desert_rocks_2 < 60 and noise_terrain_1 > 7 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then if math.random(1,3) == 1 then if math.random(1,3) == 1 then - if surface.can_place_entity {name="red-desert-rock-huge-01", position={pos_x,pos_y}} then - surface.create_entity {name="red-desert-rock-huge-01", position={pos_x,pos_y}} + if surface.can_place_entity {name="sand-rock-big", position={pos_x,pos_y}} then + surface.create_entity {name="sand-rock-big", position={pos_x,pos_y}} end else - if surface.can_place_entity {name="red-desert-rock-big-01", position={pos_x,pos_y}} then - surface.create_entity {name="red-desert-rock-big-01", position={pos_x,pos_y}} + if surface.can_place_entity {name="sand-rock-big", position={pos_x,pos_y}} then + surface.create_entity {name="sand-rock-big", position={pos_x,pos_y}} end end end @@ -339,15 +336,15 @@ function run_planet( params ) if noise_red_desert_rocks_1 + noise_red_desert_rocks_2 + noise_red_desert_rocks_3 + noise_terrain_4 >= 10 and noise_red_desert_rocks_1 + noise_red_desert_rocks_2 + noise_red_desert_rocks_3 < 20 and noise_terrain_1 > 7 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then if math.random(1,5) == 1 then - table.insert(global.planet_decoratives_hold, {name="red-desert-rock-medium", position={pos_x,pos_y}, amount=1}) + table.insert(global.planet_decoratives_hold, {name="rock-medium", position={pos_x,pos_y}, amount=1}) end else if tile_to_insert ~= "water" and tile_to_insert ~= "sand-1" then if math.random(1,15) == 1 then - table.insert(global.planet_decoratives_hold, {name="red-desert-rock-small", position={pos_x,pos_y}, amount=1}) + table.insert(global.planet_decoratives_hold, {name="sand-rock-small", position={pos_x,pos_y}, amount=1}) else if math.random(1,8) == 1 then - table.insert(global.planet_decoratives_hold, {name="red-desert-rock-tiny", position={pos_x,pos_y}, amount=1}) + table.insert(global.planet_decoratives_hold, {name="sand-rock-small", position={pos_x,pos_y}, amount=1}) end end end diff --git a/locale/gen_shared/ent_functions.lua b/locale/gen_shared/ent_functions.lua index 68636ea9..a84d2b9e 100644 --- a/locale/gen_shared/ent_functions.lua +++ b/locale/gen_shared/ent_functions.lua @@ -245,9 +245,9 @@ function create_rock_cluster(pos, amount) entity.pos = pos for i = 1, amount, 1 do if 1 == math.random(1,3) then - entity.name = "red-desert-rock-huge-01" + entity.name = "sand-rock-big" else - entity.name = "red-desert-rock-big-01" + entity.name = "sand-rock-big" end local b, e = auto_place_entity_around_target(entity, scan_radius, mode) if b == true then @@ -531,5 +531,5 @@ function create_tile_cluster(tilename,position,amount) end if b == false then return false,x,y end if i >= amount then return true,x,y end - end -end \ No newline at end of file + end +end From 85a310847e1445bab6e3f9de8675ffaad82d62fc Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Thu, 28 Dec 2017 22:45:49 +0100 Subject: [PATCH 10/12] removed red planet --- locale/gen_combined/red_planet.lua | 539 ----------------------------- 1 file changed, 539 deletions(-) delete mode 100644 locale/gen_combined/red_planet.lua diff --git a/locale/gen_combined/red_planet.lua b/locale/gen_combined/red_planet.lua deleted file mode 100644 index 55c5bd92..00000000 --- a/locale/gen_combined/red_planet.lua +++ /dev/null @@ -1,539 +0,0 @@ ---Author: MewMew - --- !! ATTENTION !! --- Use water only in starting area as map setting!!! - -require "locale.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="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}} - - -local function place_entities(surface, entity_list) - local directions = {defines.direction.north, defines.direction.east, defines.direction.south, defines.direction.west} - for _, entity in pairs(entity_list) do - local r = math.random(1,entity.chance) - if r == 1 then - if not entity.force then entity.force = "player" end - local r = math.random(1,4) - if surface.can_place_entity {name=entity.name, position=entity.pos, direction=directions[r], force=entity.force} then - local e = surface.create_entity {name=entity.name, position=entity.pos, direction=directions[r], force=entity.force} - if entity.health then - if entity.health == "low" then e.health = ((e.health / 1000) * math.random(33,330)) end - if entity.health == "medium" then e.health = ((e.health / 1000) * math.random(333,666)) end - if entity.health == "high" then e.health = ((e.health / 1000) * math.random(666,999)) end - if entity.health == "random" then e.health = ((e.health / 1000) * math.random(1,1000)) end - end - return true, e - end - end - end - return false -end - -local function auto_place_entity_around_target(entity, scan_radius, mode, density, surface) - local x = entity.pos.x - local y = entity.pos.y - if not surface then surface = game.surfaces[1] end - if not scan_radius then scan_radius = 6 end - if not entity then return end - if not mode then mode = "ball" end - if not density then density = 1 end - - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - - local i = 2 - local r = 1 - - if mode == "ball" then - if math.random(1,2) == 1 then - density = density * -1 - end - r = math.random(1,4) - end - if mode == "line" then - density = 1 - r = math.random(1,4) - end - if mode == "line_down" then - density = density * -1 - r = math.random(1,4) - end - if mode == "line_up" then - density = 1 - r = math.random(1,4) - end - if mode == "block" then - r = 1 - density = 1 - end - - if r == 1 then - --start placing at -1,-1 - while i <= scan_radius do - y = y - density - x = x - density - for a = 1, i, 1 do - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - x = x + density - end - for a = 1, i, 1 do - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - y = y + density - end - for a = 1, i, 1 do - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - x = x - density - end - for a = 1, i, 1 do - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - y = y - density - end - i = i + 2 - end - end - - if r == 2 then - --start placing at 0,-1 - while i <= scan_radius do - y = y - density - x = x - density - for a = 1, i, 1 do - x = x + density - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - end - for a = 1, i, 1 do - y = y + density - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - end - for a = 1, i, 1 do - x = x - density - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - end - for a = 1, i, 1 do - y = y - density - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - end - i = i + 2 - end - end - - if r == 3 then - --start placing at 1,-1 - while i <= scan_radius do - y = y - density - x = x + density - for a = 1, i, 1 do - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - y = y + density - end - for a = 1, i, 1 do - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - x = x - density - end - for a = 1, i, 1 do - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - y = y - density - end - for a = 1, i, 1 do - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - x = x + density - end - i = i + 2 - end - end - - if r == 4 then - --start placing at 1,0 - while i <= scan_radius do - y = y - density - x = x + density - for a = 1, i, 1 do - y = y + density - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - end - for a = 1, i, 1 do - x = x - density - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - end - for a = 1, i, 1 do - y = y - density - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - end - for a = 1, i, 1 do - x = x + density - if surface.can_place_entity {name=entity.name, position={x,y}} then - local e = surface.create_entity {name=entity.name, position={x,y}} - return true, e - end - end - i = i + 2 - end - end - - return false -end - -function run_combined_module(event) - if not global.perlin_noise_seed then global.perlin_noise_seed = math.random(1000,1000000) end - local surface = game.surfaces[1] - local tiles = {} - local decoratives = {} - local tree_to_place = {"dry-tree","dry-hairy-tree","tree-06","tree-06","tree-01","tree-02","tree-03"} - local entities = surface.find_entities(event.area) - for _, entity in pairs(entities) do - if entity.type == "simple-entity" or entity.type == "resource" or entity.type == "tree" then - entity.destroy() - end - end - - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos_x = event.area.left_top.x + x - local pos_y = event.area.left_top.y + y - local tile = surface.get_tile(pos_x,pos_y) - local tile_to_insert = "concrete" - - local a = pos_x - local b = pos_y - local c = 1 - if event.area.right_bottom.x < 0 then a = event.area.right_bottom.x * -1 end - if event.area.right_bottom.y < 0 then b = event.area.right_bottom.y * -1 end - if a > b then c = a else c = b end - local resource_amount_distance_multiplicator = (((c + 1) / 75) / 75) + 1 - local resource_entity_placed = false - - local entity_list = {} - table.insert(entity_list, {name="big-ship-wreck-1", pos={pos_x,pos_y},chance = 65000, health="random"}) - table.insert(entity_list, {name="big-ship-wreck-2", pos={pos_x,pos_y},chance = 65000, health="random"}) - table.insert(entity_list, {name="big-ship-wreck-3", pos={pos_x,pos_y},chance = 65000, health="random"}) - table.insert(entity_list, {name="medium-ship-wreck", pos={pos_x,pos_y},chance = 25000, health="medium"}) - table.insert(entity_list, {name="small-ship-wreck", pos={pos_x,pos_y},chance = 15000, health="medium"}) - table.insert(entity_list, {name="car", pos={pos_x,pos_y},chance = 150000, health="low"}) - table.insert(entity_list, {name="laser-turret", pos={pos_x,pos_y},chance = 100000, force="enemy", health="low"}) - table.insert(entity_list, {name="nuclear-reactor", pos={pos_x,pos_y},chance = 1000000, force="enemy", health="medium"}) - local b, placed_entity = place_entities(surface, entity_list) - if b == true then - if placed_entity.name == "big-ship-wreck-1" or placed_entity.name == "big-ship-wreck-2" or placed_entity.name == "big-ship-wreck-3" then - placed_entity.insert(wreck_item_pool[math.random(1,#wreck_item_pool)]) - placed_entity.insert(wreck_item_pool[math.random(1,#wreck_item_pool)]) - placed_entity.insert(wreck_item_pool[math.random(1,#wreck_item_pool)]) - end - end - - local seed_increment_number = 10000 - local seed = global.perlin_noise_seed - - local noise_terrain_1 = perlin:noise(((pos_x+seed)/400),((pos_y+seed)/400),0) - noise_terrain_1 = noise_terrain_1 * 100 - seed = seed + seed_increment_number - local noise_terrain_2 = perlin:noise(((pos_x+seed)/250),((pos_y+seed)/250),0) - noise_terrain_2 = noise_terrain_2 * 100 - seed = seed + seed_increment_number - local noise_terrain_3 = perlin:noise(((pos_x+seed)/100),((pos_y+seed)/100),0) - noise_terrain_3 = noise_terrain_3 * 50 - seed = seed + seed_increment_number - local noise_terrain_4 = perlin:noise(((pos_x+seed)/20),((pos_y+seed)/20),0) - noise_terrain_4 = noise_terrain_4 * 10 - seed = seed + seed_increment_number - local noise_terrain_5 = perlin:noise(((pos_x+seed)/5),((pos_y+seed)/5),0) - noise_terrain_5 = noise_terrain_5 * 4 - seed = seed + seed_increment_number - local noise_sand = perlin:noise(((pos_x+seed)/18),((pos_y+seed)/18),0) - noise_sand = noise_sand * 10 - - --DECORATIVES - seed = seed + seed_increment_number - local noise_decoratives_1 = perlin:noise(((pos_x+seed)/20),((pos_y+seed)/20),0) - noise_decoratives_1 = noise_decoratives_1 - seed = seed + seed_increment_number - local noise_decoratives_2 = perlin:noise(((pos_x+seed)/30),((pos_y+seed)/30),0) - noise_decoratives_2 = noise_decoratives_2 - seed = seed + seed_increment_number - local noise_decoratives_3 = perlin:noise(((pos_x+seed)/30),((pos_y+seed)/30),0) - noise_decoratives_3 = noise_decoratives_3 - - - seed = seed + seed_increment_number - local noise_water_1 = perlin:noise(((pos_x+seed)/250),((pos_y+seed)/300),0) - noise_water_1 = noise_water_1 * 100 - seed = seed + seed_increment_number - local noise_water_2 = perlin:noise(((pos_x+seed)/100),((pos_y+seed)/150),0) - noise_water_2 = noise_water_2 * 50 - - --RESOURCES - seed = seed + seed_increment_number - local noise_resources = perlin:noise(((pos_x+seed)/100),((pos_y+seed)/100),0) - seed = seed + seed_increment_number - local noise_resources_2 = perlin:noise(((pos_x+seed)/40),((pos_y+seed)/40),0) - seed = seed + seed_increment_number - local noise_resources_3 = perlin:noise(((pos_x+seed)/20),((pos_y+seed)/20),0) - noise_resources = noise_resources * 50 + noise_resources_2 * 20 + noise_resources_3 * 20 - noise_resources = noise_resources_2 * 100 - - seed = seed + seed_increment_number - local noise_resource_amount_modifier = perlin:noise(((pos_x+seed)/200),((pos_y+seed)/200),0) - local resource_amount = 1 + ((400 + (400*noise_resource_amount_modifier*0.2)) * resource_amount_distance_multiplicator) - seed = seed + seed_increment_number - local noise_resources_iron_and_copper = perlin:noise(((pos_x+seed)/250),((pos_y+seed)/250),0) - noise_resources_iron_and_copper = noise_resources_iron_and_copper * 100 - seed = seed + seed_increment_number - local noise_resources_coal_and_uranium = perlin:noise(((pos_x+seed)/250),((pos_y+seed)/250),0) - noise_resources_coal_and_uranium = noise_resources_coal_and_uranium * 100 - seed = seed + seed_increment_number - local noise_resources_stone_and_oil = perlin:noise(((pos_x+seed)/150),((pos_y+seed)/150),0) - noise_resources_stone_and_oil = noise_resources_stone_and_oil * 100 - - seed = seed + seed_increment_number - local noise_red_desert_rocks_1 = perlin:noise(((pos_x+seed)/20),((pos_y+seed)/20),0) - noise_red_desert_rocks_1 = noise_red_desert_rocks_1 * 100 - seed = seed + seed_increment_number - local noise_red_desert_rocks_2 = perlin:noise(((pos_x+seed)/10),((pos_y+seed)/10),0) - noise_red_desert_rocks_2 = noise_red_desert_rocks_2 * 50 - seed = seed + seed_increment_number - local noise_red_desert_rocks_3 = perlin:noise(((pos_x+seed)/5),((pos_y+seed)/5),0) - noise_red_desert_rocks_3 = noise_red_desert_rocks_3 * 100 - seed = seed + seed_increment_number - local noise_forest = perlin:noise(((pos_x+seed)/100),((pos_y+seed)/100),0) - noise_forest = noise_forest * 100 - seed = seed + seed_increment_number - local noise_forest_2 = perlin:noise(((pos_x+seed)/20),((pos_y+seed)/20),0) - noise_forest_2 = noise_forest_2 * 20 - - local terrain_smoothing = math.random(0,1) - local place_tree_number - - if noise_terrain_1 < 8 + terrain_smoothing + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then - tile_to_insert = "red-desert-1" - if noise_water_1 + noise_water_2 + noise_sand > -10 and noise_water_1 + noise_water_2 + noise_sand < 25 and noise_terrain_1 < -52 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then - tile_to_insert = "sand-1" - place_tree_number = math.random(3,#tree_to_place) - else - place_tree_number = math.random(1,(#tree_to_place - 3)) - end - - if noise_water_1 + noise_water_2 > 0 and noise_water_1 + noise_water_2 < 15 and noise_terrain_1 < -60 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then - tile_to_insert = "water" - local a = pos_x + 1 - table.insert(tiles, {name = tile_to_insert, position = {a,pos_y}}) - local a = pos_y + 1 - table.insert(tiles, {name = tile_to_insert, position = {pos_x,a}}) - local a = pos_x - 1 - table.insert(tiles, {name = tile_to_insert, position = {a,pos_y}}) - local a = pos_y - 1 - table.insert(tiles, {name = tile_to_insert, position = {pos_x,a}}) - if noise_water_1 + noise_water_2 < 2 or noise_water_1 + noise_water_2 > 13 then - if math.random(1,15) == 1 then - table.insert(decoratives, {name="green-carpet-grass-1", position={pos_x,pos_y}, amount=1}) - end - if math.random(1,15) == 1 then - table.insert(decoratives, {name="brown-cane-cluster", position={pos_x,pos_y}, amount=1}) - end - end - end - - if tile_to_insert ~= "water" then - if noise_water_1 + noise_water_2 > 16 and noise_water_1 + noise_water_2 < 25 and noise_terrain_1 < -55 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then - if math.random(1,35) == 1 then - table.insert(decoratives, {name="brown-carpet-grass", position={pos_x,pos_y}, amount=1}) - end - end - if noise_water_1 + noise_water_2 > -10 and noise_water_1 + noise_water_2 < -1 and noise_terrain_1 < -55 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 + noise_terrain_5 then - if math.random(1,35) == 1 then - table.insert(decoratives, {name="brown-carpet-grass", position={pos_x,pos_y}, amount=1}) - end - end - if noise_decoratives_1 > 0.5 and noise_decoratives_1 <= 0.8 then - if math.random(1,12) == 1 then table.insert(decoratives, {name="red-desert-bush", position={pos_x,pos_y}, amount=1}) end - end - if noise_decoratives_1 > 0.4 and noise_decoratives_1 <= 0.5 then - if math.random(1,4) == 1 then table.insert(decoratives, {name="red-desert-bush", position={pos_x,pos_y}, amount=1}) end - end - end - - --HAPPY TREES - if noise_terrain_1 < -30 + noise_terrain_2 + noise_terrain_3 + noise_terrain_5 + noise_forest_2 then - if noise_forest > 0 and noise_forest <= 10 then - if math.random(1,50) == 1 then - if surface.can_place_entity {name=tree_to_place[place_tree_number], position={pos_x,pos_y}} then - surface.create_entity {name=tree_to_place[place_tree_number], position={pos_x,pos_y}} - end - end - end - if noise_forest > 10 and noise_forest <= 20 then - if math.random(1,25) == 1 then - if surface.can_place_entity {name=tree_to_place[place_tree_number], position={pos_x,pos_y}} then - surface.create_entity {name=tree_to_place[place_tree_number], position={pos_x,pos_y}} - end - end - end - if noise_forest > 20 then - if math.random(1,10) == 1 then - if surface.can_place_entity {name=tree_to_place[place_tree_number], position={pos_x,pos_y}} then - surface.create_entity {name=tree_to_place[place_tree_number], position={pos_x,pos_y}} - end - end - end - end - - if tile_to_insert ~= "water" then - if noise_terrain_1 < 8 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 and noise_terrain_1 > -5 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then - if math.random(1,45) == 1 then - table.insert(decoratives, {name="rock-medium", position={pos_x,pos_y}, amount=1}) - end - if math.random(1,20) == 1 then - table.insert(decoratives, {name="sand-rock-small", position={pos_x,pos_y}, amount=1}) - end - else - if math.random(1,375) == 1 then - table.insert(decoratives, {name="rock-medium", position={pos_x,pos_y}, amount=1}) - end - if math.random(1,45) == 1 then - table.insert(decoratives, {name="sand-rock-small", position={pos_x,pos_y}, amount=1}) - end - end - end - else - tile_to_insert = "red-desert-0" - end - if resource_entity_placed == false and noise_resources_coal_and_uranium + noise_resources < -72 and noise_terrain_1 > 65 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then - if surface.can_place_entity {name="uranium-ore", position={pos_x,pos_y}} then - surface.create_entity {name="uranium-ore", position={pos_x,pos_y}, amount=resource_amount} - resource_entity_placed = true - end - end - if resource_entity_placed == false and noise_resources_iron_and_copper + noise_resources > 72 and noise_terrain_1 > 15 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then - if surface.can_place_entity {name="iron-ore", position={pos_x,pos_y}} then - surface.create_entity {name="iron-ore", position={pos_x,pos_y}, amount=resource_amount} - resource_entity_placed = true - end - end - if resource_entity_placed == false and noise_resources_coal_and_uranium + noise_resources > 70 and noise_terrain_1 > 15 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then - if surface.can_place_entity {name="coal", position={pos_x,pos_y}} then - surface.create_entity {name="coal", position={pos_x,pos_y}, amount=resource_amount} - resource_entity_placed = true - end - end - if resource_entity_placed == false and noise_resources_iron_and_copper + noise_resources < -72 and noise_terrain_1 > 15 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then - if surface.can_place_entity {name="copper-ore", position={pos_x,pos_y}} then - surface.create_entity {name="copper-ore", position={pos_x,pos_y}, amount=resource_amount} - resource_entity_placed = true - end - end - if resource_entity_placed == false and noise_resources_stone_and_oil + noise_resources > 72 and noise_terrain_1 > 15 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then - if surface.can_place_entity {name="stone", position={pos_x,pos_y}} then - surface.create_entity {name="stone", position={pos_x,pos_y}, amount=resource_amount} - resource_entity_placed = true - end - end - if resource_entity_placed == false and noise_resources_stone_and_oil + noise_resources < -70 and noise_terrain_1 < -50 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then - if math.random(1,42) == 1 then - if surface.can_place_entity {name="crude-oil", position={pos_x,pos_y}} then - surface.create_entity {name="crude-oil", position={pos_x,pos_y}, amount=(resource_amount*500)} - resource_entity_placed = true - end - end - end - - if resource_entity_placed == false and noise_red_desert_rocks_1 + noise_red_desert_rocks_2 + noise_red_desert_rocks_3 > 20 and noise_red_desert_rocks_1 + noise_red_desert_rocks_2 < 60 and noise_terrain_1 > 7 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then - if math.random(1,3) == 1 then - if math.random(1,3) == 1 then - if surface.can_place_entity {name="sand-rock-big", position={pos_x,pos_y}} then - surface.create_entity {name="sand-rock-big", position={pos_x,pos_y}} - end - else - if surface.can_place_entity {name="sand-rock-big", position={pos_x,pos_y}} then - surface.create_entity {name="sand-rock-big", position={pos_x,pos_y}} - end - end - end - end - - if noise_red_desert_rocks_1 + noise_red_desert_rocks_2 + noise_red_desert_rocks_3 + noise_terrain_4 >= 10 and noise_red_desert_rocks_1 + noise_red_desert_rocks_2 + noise_red_desert_rocks_3 < 20 and noise_terrain_1 > 7 + noise_terrain_2 + noise_terrain_3 + noise_terrain_4 then - if math.random(1,5) == 1 then - table.insert(decoratives, {name="rock-medium", position={pos_x,pos_y}, amount=1}) - end - else - if tile_to_insert ~= "water" and tile_to_insert ~= "sand-1" then - if math.random(1,15) == 1 then - table.insert(decoratives, {name="sand-rock-small", position={pos_x,pos_y}, amount=1}) - else - if math.random(1,8) == 1 then - table.insert(decoratives, {name="sand-rock-small", position={pos_x,pos_y}, amount=1}) - end - end - end - end - if tile_to_insert ~= "water" then - if noise_decoratives_2 > 0.6 then - if math.random(1,9) == 1 then table.insert(decoratives, {name="red-asterisk", position={pos_x,pos_y}, amount=1}) end - else - if noise_decoratives_2 > 0.4 then - if math.random(1,17) == 1 then table.insert(decoratives, {name="red-asterisk", position={pos_x,pos_y}, amount=1}) end - end - end - if noise_decoratives_3 < -0.6 then - if math.random(1,2) == 1 then table.insert(decoratives, {name="brown-fluff-dry", position={pos_x,pos_y}, amount=1}) end - else - if noise_decoratives_3 < -0.4 then - if math.random(1,5) == 1 then table.insert(decoratives, {name="brown-fluff-dry", position={pos_x,pos_y}, amount=1}) end - end - end - end - table.insert(tiles, {name = tile_to_insert, position = {pos_x,pos_y}}) - end - end - - surface.set_tiles(tiles,true) - for _,deco in pairs(decoratives) do - surface.create_decoratives{check_collision=false, decoratives={deco}} - end -end From d98022947b3f6b7ea713c9e925b96db1a71a33b3 Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Thu, 28 Dec 2017 22:47:41 +0100 Subject: [PATCH 11/12] added a dismembered hooker --- locale/resources/poke_messages.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/locale/resources/poke_messages.lua b/locale/resources/poke_messages.lua index 30188a72..0f262f37 100644 --- a/locale/resources/poke_messages.lua +++ b/locale/resources/poke_messages.lua @@ -272,4 +272,10 @@ return "the Spanish Inquisition", "an addiction to Cracktorio", "a broken mirror", + "a dismembered hooker", + "a popped balloon", + "a hipster breakfast", + "a nintendo cartridge", + "a generic greething card", + "an empty bottle of barbiturics", } From 468878b2899502c36b43333e1484cabc84a29685 Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Thu, 28 Dec 2017 22:53:39 +0100 Subject: [PATCH 12/12] stone-rock ==> rock-big --- locale/gen_combined/borg_planet.lua | 4 ++-- locale/gen_combined/borg_planet_v2.lua | 4 ++-- locale/gen_combined/dagobah_swamp.lua | 2 +- locale/gen_combined/grilledham_map_gen/map_gen.lua | 14 +++++++------- locale/gen_combined/island_resort.lua | 8 ++++---- locale/gen_terrain/neko_bridged_rivers.lua | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/locale/gen_combined/borg_planet.lua b/locale/gen_combined/borg_planet.lua index 222b9480..1c31c586 100644 --- a/locale/gen_combined/borg_planet.lua +++ b/locale/gen_combined/borg_planet.lua @@ -448,8 +448,8 @@ function run_combined_module(event) if noise_trees < -0.5 then if tile_to_insert == "sand-3" or tile_to_insert == "sand-1" then if math.random(1,15) == 1 then - if event.surface.can_place_entity {name="stone-rock", position={pos_x,pos_y}} then - event.surface.create_entity {name="stone-rock", position={pos_x,pos_y}} + if event.surface.can_place_entity {name="rock-big", position={pos_x,pos_y}} then + event.surface.create_entity {name="rock-big", position={pos_x,pos_y}} end end end diff --git a/locale/gen_combined/borg_planet_v2.lua b/locale/gen_combined/borg_planet_v2.lua index 3a2da007..a2ae4174 100644 --- a/locale/gen_combined/borg_planet_v2.lua +++ b/locale/gen_combined/borg_planet_v2.lua @@ -452,8 +452,8 @@ function run_borg( params ) if noise_trees < -0.5 then if tile_to_insert == "sand-3" or tile_to_insert == "sand-1" then if math.random(1,15) == 1 then - if surface.can_place_entity {name="stone-rock", position={pos_x,pos_y}} then - surface.create_entity {name="stone-rock", position={pos_x,pos_y}} + if surface.can_place_entity {name="rock-big", position={pos_x,pos_y}} then + surface.create_entity {name="rock-big", position={pos_x,pos_y}} end end end diff --git a/locale/gen_combined/dagobah_swamp.lua b/locale/gen_combined/dagobah_swamp.lua index 627a0c28..e88499d6 100644 --- a/locale/gen_combined/dagobah_swamp.lua +++ b/locale/gen_combined/dagobah_swamp.lua @@ -343,7 +343,7 @@ function run_swamp_entities(params) table.insert(entity_list, {name="tree-09", pos={pos_x,pos_y},chance = 1000}) table.insert(entity_list, {name="tree-07", pos={pos_x,pos_y},chance = 400}) table.insert(entity_list, {name="tree-06", pos={pos_x,pos_y},chance = 150}) - table.insert(entity_list, {name="stone-rock", pos={pos_x,pos_y},chance = 400}) + table.insert(entity_list, {name="rock-big", pos={pos_x,pos_y},chance = 400}) table.insert(entity_list, {name="green-coral", pos={pos_x,pos_y},chance = 10000}) table.insert(entity_list, {name="medium-ship-wreck", pos={pos_x,pos_y},chance = 25000, health="random"}) table.insert(entity_list, {name="small-ship-wreck", pos={pos_x,pos_y},chance = 25000, health="random"}) diff --git a/locale/gen_combined/grilledham_map_gen/map_gen.lua b/locale/gen_combined/grilledham_map_gen/map_gen.lua index 3b409032..3a5d4fa3 100644 --- a/locale/gen_combined/grilledham_map_gen/map_gen.lua +++ b/locale/gen_combined/grilledham_map_gen/map_gen.lua @@ -235,13 +235,13 @@ local entity_options = { {"tree-06", 300}, {"tree-07", 800}, {"tree-09", 2000}, - {"stone-rock", 400}, + {"rock-big", 400}, }, ["dirt-6"] = { {"tree-06", 150}, {"tree-07", 400}, {"tree-09", 1000}, - {"stone-rock", 300}, + {"rock-big", 300}, }, ["grass-1"] = { {"tree-01", 150}, @@ -249,7 +249,7 @@ local entity_options = { {"tree-06", 400}, {"tree-07", 400}, {"tree-09", 1000}, - {"stone-rock", 400}, + {"rock-big", 400}, {"green-coral", 10000}, }, ["grass-3"] = { @@ -260,7 +260,7 @@ local entity_options = { {"tree-07", 800}, {"tree-08", 400}, {"tree-09", 2000}, - {"stone-rock", 400}, + {"rock-big", 400}, }, ["grass-2"] = { {"tree-04", 800}, @@ -268,7 +268,7 @@ local entity_options = { {"tree-07", 400}, {"tree-09", 1000}, {"dry-tree", 1000}, - {"stone-rock", 200}, + {"rock-big", 200}, }, ["hazard-concrete-left"] = {}, ["hazard-concrete-right"] = {}, @@ -302,14 +302,14 @@ local entity_options = { {"dry-tree", 1000}, {"dry-hairy-tree", 1000}, {"dead-tree", 1000}, - {"stone-rock", 150}, + {"rock-big", 150}, }, ["sand-3"] = { {"dead-tree", 1000}, {"dry-tree", 1000}, {"dry-hairy-tree", 1000}, - {"stone-rock", 150}, + {"rock-big", 150}, }, ["stone-path"] = {}, diff --git a/locale/gen_combined/island_resort.lua b/locale/gen_combined/island_resort.lua index b406a7ee..ff094e4d 100644 --- a/locale/gen_combined/island_resort.lua +++ b/locale/gen_combined/island_resort.lua @@ -187,15 +187,15 @@ function run_island( params ) if tile_to_insert == "sand-1" or tile_to_insert == "sand-3" then if math.random(1,200) == 1 then - if surface.can_place_entity {name="stone-rock", position={pos_x,pos_y}} then - surface.create_entity {name="stone-rock", position={pos_x,pos_y}} + if surface.can_place_entity {name="rock-big", position={pos_x,pos_y}} then + surface.create_entity {name="rock-big", position={pos_x,pos_y}} end end end if tile_to_insert == "grass-1" or tile_to_insert == "grass-2" or tile_to_insert == "grass-3" then if math.random(1,2000) == 1 then - if surface.can_place_entity {name="stone-rock", position={pos_x,pos_y}} then - surface.create_entity {name="stone-rock", position={pos_x,pos_y}} + if surface.can_place_entity {name="rock-big", position={pos_x,pos_y}} then + surface.create_entity {name="rock-big", position={pos_x,pos_y}} end end end diff --git a/locale/gen_terrain/neko_bridged_rivers.lua b/locale/gen_terrain/neko_bridged_rivers.lua index b89b5524..377a80ef 100644 --- a/locale/gen_terrain/neko_bridged_rivers.lua +++ b/locale/gen_terrain/neko_bridged_rivers.lua @@ -150,8 +150,8 @@ function run_terrain_module(event) end - if math.floor(terrain_D) % 5 == 1 and math.random(1,70) == 1 and surface.can_place_entity {name="stone-rock", position={x,y}} then - surface.create_entity {name="stone-rock", position={x,y}} + if math.floor(terrain_D) % 5 == 1 and math.random(1,70) == 1 and surface.can_place_entity {name="rock-big", position={x,y}} then + surface.create_entity {name="rock-big", position={x,y}} end else