mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-01-12 02:28:02 +02:00
ported tile names from 0.15 to 0.16
This commit is contained in:
parent
e52341219a
commit
13bd4969f0
@ -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}}
|
||||
|
@ -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}}
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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},
|
||||
|
@ -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
|
@ -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
|
||||
|
@ -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
|
@ -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}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user