1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-06 00:23:49 +02:00

Update terrain.lua

add rocks to stone area at start plus increase in starting ores amounts and tiny size increase.
This commit is contained in:
NekoBaron 2021-07-18 14:31:34 +01:00 committed by GitHub
parent 3292db2e23
commit 0f4eeb7fe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,15 @@ local math_random = math.random
local math_abs = math.abs
local math_sqrt = math.sqrt
--rock spawning code for stone pile
local rock_raffle = {'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge'}
local size_of_rock_raffle = #rock_raffle
local function place_rock(surface, position)
local a = (math_random(-250, 250)) * 0.05
local b = (math_random(-250, 250)) * 0.05
surface.create_entity({name = rock_raffle[math_random(1, size_of_rock_raffle)], position = {position.x + a, position.y + b}})
end
local function shuffle(tbl)
local size = #tbl
for i = size, 1, -1 do
@ -191,10 +200,15 @@ local function generate_spawn_area(surface)
{x = spawn_position_x - 52, y = _y * -1}
}
shuffle(ore_positions)
map_functions.draw_smoothed_out_ore_circle(ore_positions[1], 'copper-ore', surface, 15, 2500)
map_functions.draw_smoothed_out_ore_circle(ore_positions[2], 'iron-ore', surface, 15, 2500)
map_functions.draw_smoothed_out_ore_circle(ore_positions[3], 'coal', surface, 15, 1500)
map_functions.draw_smoothed_out_ore_circle(ore_positions[4], 'stone', surface, 15, 1500)
map_functions.draw_smoothed_out_ore_circle(ore_positions[1], 'copper-ore', surface, 16, 3500)
map_functions.draw_smoothed_out_ore_circle(ore_positions[2], 'iron-ore', surface, 16, 3500)
map_functions.draw_smoothed_out_ore_circle(ore_positions[3], 'coal', surface, 16, 2500)
map_functions.draw_smoothed_out_ore_circle(ore_positions[4], 'stone', surface, 16, 2500)
for ii = 0,10,1 do
place_rock(surface, ore_positions[4]) --add rocks to stone area
end
map_functions.draw_noise_tile_circle({x = spawn_position_x - 20, y = 0}, 'water', surface, 16)
map_functions.draw_oil_circle(ore_positions[5], 'crude-oil', surface, 8, 200000)