1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2024-12-26 22:56:43 +02:00

Rename: rock-% to %-rock

This commit is contained in:
Gerkiz 2024-09-25 23:25:57 +02:00
parent beeb592b05
commit 0e2f0401ae
65 changed files with 7700 additions and 7700 deletions

View File

@ -1484,11 +1484,11 @@ local function on_chunk_generated(event)
'dead-tree-desert',
'dry-hairy-tree',
'dry-tree',
'rock-big',
'rock-huge'
'big-rock',
'huge-rock'
}
)
--surface.regenerate_entity({"dead-dry-hairy-tree","dead-grey-trunk","dead-tree-desert","dry-hairy-tree","dry-tree","rock-big","rock-huge"})
--surface.regenerate_entity({"dead-dry-hairy-tree","dead-grey-trunk","dead-tree-desert","dry-hairy-tree","dry-tree","big-rock","huge-rock"})
local entities = surface.find_entities({ { -10, -10 }, { 10, 10 } })
for _, e in pairs(entities) do
if e.type == 'simple-entity' or e.type == 'resource' or e.type == 'tree' then

View File

@ -14,7 +14,7 @@ local GetNoise = require 'utils.get_noise'
local simplex_noise = require 'utils.simplex_noise'.d2
local spawn_circle_size = 39
local ores = { 'copper-ore', 'iron-ore', 'stone', 'coal' }
local rocks = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rocks = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local chunk_tile_vectors = {}
for x = 0, 31, 1 do
@ -629,7 +629,7 @@ function Public.generate_additional_rocks(surface)
return
end
local position = { x = -96 + math_random(0, 192), y = -40 - math_random(0, 96) }
local rocks = { 'rock-huge', 'rock-big', 'rock-big', 'rock-big', 'sand-rock-big' }
local rocks = { 'huge-rock', 'big-rock', 'big-rock', 'big-rock', 'big-sand-rock' }
for _ = 1, math_random(6, 10) do
local name = rocks[math_random(1, 5)]
local p = surface.find_non_colliding_position(name, { position.x + (-10 + math_random(0, 20)), position.y + (-10 + math_random(0, 20)) }, 16, 1)

View File

@ -85,7 +85,7 @@ local function south_side(surface, left_top)
surface.create_entity({ name = 'tree-02', position = pos })
else
if math_random(1, 512) == 1 then
surface.create_entity({ name = 'rock-huge', position = pos })
surface.create_entity({ name = 'huge-rock', position = pos })
end
end
end

View File

@ -18,9 +18,9 @@ local math_random = math.random
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true,
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true,
['mineable-wreckage'] = true
}
@ -40,7 +40,7 @@ local tile_replacements = {
['red-desert-3'] = 'grass-4'
}
local rocks = { 'rock-big', 'rock-big', 'rock-huge' }
local rocks = { 'big-rock', 'big-rock', 'huge-rock' }
local decos = {
'green-hairy-grass',
'green-hairy-grass',
@ -435,8 +435,8 @@ local function on_player_joined_game()
['tree-02-red'] = { 'copper-ore' },
['tree-04'] = { 'coal' },
['tree-08-brown'] = { 'stone' },
['rock-big'] = { 'uranium-ore' },
['rock-huge'] = { 'uranium-ore' }
['big-rock'] = { 'uranium-ore' },
['huge-rock'] = { 'uranium-ore' }
}
if prototypes.item['angels-ore1'] then
@ -449,8 +449,8 @@ local function on_player_joined_game()
end
if prototypes.item['thorium-ore'] then
storage.entity_yield['rock-big'] = { 'uranium-ore', 'thorium-ore' }
storage.entity_yield['rock-huge'] = { 'uranium-ore', 'thorium-ore' }
storage.entity_yield['big-rock'] = { 'uranium-ore', 'thorium-ore' }
storage.entity_yield['huge-rock'] = { 'uranium-ore', 'thorium-ore' }
end
storage.map_choppy_init_done = true

View File

@ -282,7 +282,7 @@ local function create_cave_miner_stats_gui(player)
separators[1] = t.add { type = 'label', caption = '|' }
captions[2] = t.add { type = 'label', caption = '[img=entity.rock-huge] :' }
captions[2] = t.add { type = 'label', caption = '[img=entity.huge-rock] :' }
captions[2].tooltip = 'Amount of rocks mined.'
stat_numbers[2] = t.add { type = 'label', caption = storage.stats_rocks_broken }
@ -450,14 +450,14 @@ local function treasure_chest(position, distance_to_center)
evolution_min = 0.0,
evolution_max = 0.4
},
{ { name = 'fast-inserter', count = math.random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'fast-inserter', count = math.random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 1 },
{
{ name = 'bulk-inserter', count = math.random(4, 8) },
weight = 1,
evolution_min = 0.4,
evolution_max = 1
},
{ { name = 'stack-inserter', count = math.random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'stack-inserter', count = math.random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{
{ name = 'small-electric-pole', count = math.random(16, 24) },
weight = 3,
@ -1139,15 +1139,15 @@ local function on_player_joined_game(event)
storage.rock_density = 62 ---- table.insert value up to 100
storage.rock_raffle = {
'sand-rock-big',
'sand-rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-huge'
'big-sand-rock',
'big-sand-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'huge-rock'
}
storage.worm_free_zone_radius = math.sqrt(spawn_dome_size) + 40
@ -1293,7 +1293,7 @@ local function biter_attack_event()
for _, player in pairs(game.connected_players) do
if player.character.driving == false then
local position = { x = player.position.x, y = player.position.y }
local p = find_first_entity_spiral_scan(position, { 'rock-huge', 'rock-big', 'sand-rock-big' }, 32)
local p = find_first_entity_spiral_scan(position, { 'huge-rock', 'big-rock', 'big-sand-rock' }, 32)
if p then
if p.x ^ 2 + p.y ^ 2 > spawn_dome_size then
table.insert(valid_positions, p)
@ -1384,9 +1384,9 @@ local function darkness_checks()
end
local healing_amount = {
['rock-big'] = 4,
['sand-rock-big'] = 4,
['rock-huge'] = 16
['big-rock'] = 4,
['big-sand-rock'] = 4,
['huge-rock'] = 16
}
local function heal_rocks()
for key, rock in pairs(storage.damaged_rocks) do
@ -1490,15 +1490,15 @@ local function on_tick()
for _, item in pairs(market_items.spawn) do
storage.market.add_market_item(item)
end
surface.regenerate_entity({ 'rock-big', 'rock-huge' })
surface.regenerate_entity({ 'big-rock', 'huge-rock' })
end
end
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true,
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true,
['tree-02'] = true,
['tree-04'] = true
}
@ -1522,7 +1522,7 @@ local function pre_player_mined_item(event)
return
end
if math.random(1, 12) == 1 then
if event.entity.name == 'rock-huge' or event.entity.name == 'rock-big' or event.entity.name == 'sand-rock-big' then
if event.entity.name == 'huge-rock' or event.entity.name == 'big-rock' or event.entity.name == 'big-sand-rock' then
for x = 1, math.random(6, 10), 1 do
table.insert(storage.biter_spawn_schedule, { game.tick + 30 * x, event.entity.position })
end
@ -1533,7 +1533,7 @@ local function pre_player_mined_item(event)
surface.spill_item_stack(player.position, { name = 'raw-fish', count = math.random(1, 2) }, true)
end
if event.entity.name == 'rock-huge' or event.entity.name == 'rock-big' or event.entity.name == 'sand-rock-big' then
if event.entity.name == 'huge-rock' or event.entity.name == 'big-rock' or event.entity.name == 'big-sand-rock' then
local rock_position = { x = event.entity.position.x, y = event.entity.position.y }
event.entity.destroy()
@ -1658,7 +1658,7 @@ local function on_player_mined_entity(event)
if player.surface.name ~= 'cave_miner' then
return
end
if event.entity.name == 'rock-huge' or event.entity.name == 'rock-big' or event.entity.name == 'sand-rock-big' then
if event.entity.name == 'huge-rock' or event.entity.name == 'big-rock' or event.entity.name == 'big-sand-rock' then
event.buffer.clear()
end
if event.entity.name == 'fish' then
@ -1688,7 +1688,7 @@ local function on_entity_damaged(event)
if not event.entity.valid then
return
end
if event.entity.name == 'rock-huge' or event.entity.name == 'rock-big' or event.entity.name == 'sand-rock-big' then
if event.entity.name == 'huge-rock' or event.entity.name == 'big-rock' or event.entity.name == 'big-sand-rock' then
local rock_is_alive = true
if event.force.name == 'enemy' then
event.entity.health = event.entity.health + (event.final_damage_amount - 0.2)

View File

@ -32,9 +32,9 @@ local darkness_messages = {
}
local rocks = {
['rock-big'] = true,
['rock-huge'] = true,
['sand-rock-big'] = true
['big-rock'] = true,
['huge-rock'] = true,
['big-sand-rock'] = true
}
local rock_inhabitants = {
@ -854,7 +854,7 @@ Darkness is a hazard in the mines, stay near your lamps..
end
storage.rock_density = 62 ---- insert value up to 100
storage.rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
storage.rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
storage.worm_free_zone_radius = math.sqrt(spawn_dome_size) + 40
@ -984,7 +984,7 @@ local function biter_attack_event()
if player.character then
if player.character.driving == false then
local position = { x = player.position.x, y = player.position.y }
local p = find_first_entity_spiral_scan(position, { 'rock-huge', 'rock-big', 'sand-rock-big' }, 32)
local p = find_first_entity_spiral_scan(position, { 'huge-rock', 'big-rock', 'big-sand-rock' }, 32)
if p then
if p.x ^ 2 + p.y ^ 2 > spawn_dome_size then
table.insert(valid_positions, p)
@ -1111,15 +1111,15 @@ local function on_tick(event)
for _, item in pairs(market_items.spawn) do
market.add_market_item(item)
end
surface.regenerate_entity({ 'rock-big', 'rock-huge' })
surface.regenerate_entity({ 'big-rock', 'huge-rock' })
end
end
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true,
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true,
['tree-02'] = true,
['tree-04'] = true
}
@ -1141,7 +1141,7 @@ local function on_pre_player_mined_item(event)
local player = game.players[event.player_index]
if math_random(1, 12) == 1 then
if event.entity.name == 'rock-huge' or event.entity.name == 'rock-big' or event.entity.name == 'sand-rock-big' then
if event.entity.name == 'huge-rock' or event.entity.name == 'big-rock' or event.entity.name == 'big-sand-rock' then
for x = 1, math_random(6, 10), 1 do
table.insert(storage.biter_spawn_schedule, { game.tick + 30 * x, event.entity.position })
end
@ -1152,7 +1152,7 @@ local function on_pre_player_mined_item(event)
surface.spill_item_stack(player.position, { name = 'raw-fish', count = math.random(1, 2) }, true)
end
if event.entity.name == 'rock-huge' or event.entity.name == 'rock-big' or event.entity.name == 'sand-rock-big' then
if event.entity.name == 'huge-rock' or event.entity.name == 'big-rock' or event.entity.name == 'big-sand-rock' then
local rock_position = { x = event.entity.position.x, y = event.entity.position.y }
local distance_to_center = rock_position.x ^ 2 + rock_position.y ^ 2

View File

@ -7,9 +7,9 @@ local math_floor = math.floor
local math_sqrt = math.sqrt
local rock_yield = {
['rock-big'] = 1,
['rock-huge'] = 2,
['sand-rock-big'] = 1
['big-rock'] = 1,
['huge-rock'] = 2,
['big-sand-rock'] = 1
}
local particles = {

View File

@ -9,7 +9,7 @@ local math_abs = math.abs
local math_random = math.random
local math_floor = math.floor
local rock_raffle = {'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge'}
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local size_of_rock_raffle = #rock_raffle
local loot_blacklist = {
@ -20,26 +20,26 @@ function Public.roll_source_surface()
local map_gen_settings = {
['water'] = 0,
['starting_area'] = 1,
['cliff_settings'] = {cliff_elevation_interval = 0, cliff_elevation_0 = 0},
['cliff_settings'] = { cliff_elevation_interval = 0, cliff_elevation_0 = 0 },
['default_enable_all_autoplace_controls'] = false,
['autoplace_settings'] = {
['entity'] = {treat_missing_as_default = false},
['tile'] = {treat_missing_as_default = false},
['decorative'] = {treat_missing_as_default = false}
['entity'] = { treat_missing_as_default = false },
['tile'] = { treat_missing_as_default = false },
['decorative'] = { treat_missing_as_default = false }
},
autoplace_controls = {
['coal'] = {frequency = 0, size = 0, richness = 0},
['stone'] = {frequency = 0, size = 0, richness = 0},
['copper-ore'] = {frequency = 0, size = 0, richness = 0},
['iron-ore'] = {frequency = 0, size = 0, richness = 0},
['uranium-ore'] = {frequency = 0, size = 0, richness = 0},
['crude-oil'] = {frequency = 0, size = 0, richness = 0},
['trees'] = {frequency = 0, size = 0, richness = 0},
['enemy-base'] = {frequency = 0, size = 0, richness = 0}
['coal'] = { frequency = 0, size = 0, richness = 0 },
['stone'] = { frequency = 0, size = 0, richness = 0 },
['copper-ore'] = { frequency = 0, size = 0, richness = 0 },
['iron-ore'] = { frequency = 0, size = 0, richness = 0 },
['uranium-ore'] = { frequency = 0, size = 0, richness = 0 },
['crude-oil'] = { frequency = 0, size = 0, richness = 0 },
['trees'] = { frequency = 0, size = 0, richness = 0 },
['enemy-base'] = { frequency = 0, size = 0, richness = 0 }
}
}
local surface = game.create_surface('cave_miner_source', map_gen_settings)
surface.request_to_generate_chunks({x = 0, y = 0}, 2)
surface.request_to_generate_chunks({ x = 0, y = 0 }, 2)
surface.force_generate_chunk_requests()
end
@ -51,7 +51,7 @@ function Public.out_of_map(event)
for x = 0, 31, 1 do
for y = 0, 31, 1 do
i = i + 1
tiles[i] = {name = 'out-of-map', position = {left_top_x + x, left_top_y + y}}
tiles[i] = { name = 'out-of-map', position = { left_top_x + x, left_top_y + y } }
end
end
event.surface.set_tiles(tiles, false)
@ -60,23 +60,23 @@ end
local function place_rock(surface, position)
local a = (-49 + math_random(0, 98)) * 0.01
local b = (-49 + math_random(0, 98)) * 0.01
surface.create_entity({name = rock_raffle[math_random(1, size_of_rock_raffle)], position = {position.x + a, position.y + b}})
surface.create_entity({ name = rock_raffle[math_random(1, size_of_rock_raffle)], position = { position.x + a, position.y + b } })
end
local biomes = {}
function biomes.oasis(surface, seed, position, square_distance, noise)
if noise > 0.83 then
surface.set_tiles({{name = 'deepwater', position = position}}, true)
surface.set_tiles({ { name = 'deepwater', position = position } }, true)
if math_random(1, 16) == 1 then
surface.create_entity({name = 'fish', position = position})
surface.create_entity({ name = 'fish', position = position })
end
return
end
local noise_decoratives = GetNoise('decoratives', position, seed + 50000)
surface.set_tiles({{name = 'grass-1', position = position}}, true)
surface.set_tiles({ { name = 'grass-1', position = position } }, true)
if math_random(1, 16) == 1 and math_abs(noise_decoratives) > 0.17 then
surface.create_entity({name = 'tree-04', position = position})
surface.create_entity({ name = 'tree-04', position = position })
end
if math_random(1, 128) == 1 then
Functions.place_crude_oil(surface, position, 1)
@ -88,16 +88,16 @@ function biomes.oasis(surface, seed, position, square_distance, noise)
end
function biomes.void(surface, seed, position)
surface.set_tiles({{name = 'out-of-map', position = position}}, false, false, false, false)
surface.set_tiles({ { name = 'out-of-map', position = position } }, false, false, false, false)
end
function biomes.pond_cave(surface, seed, position, square_distance, noise)
local noise_2 = GetNoise('cm_ponds', position, seed)
if math_abs(noise_2) > 0.60 then
surface.set_tiles({{name = 'water', position = position}}, true, false, false, false)
surface.set_tiles({ { name = 'water', position = position } }, true, false, false, false)
if math_random(1, 16) == 1 then
surface.create_entity({name = 'fish', position = position})
surface.create_entity({ name = 'fish', position = position })
end
return
end
@ -123,9 +123,9 @@ function biomes.spawn(surface, seed, position, square_distance)
local noise = GetNoise('decoratives', position, seed)
if math_abs(noise) > 0.60 and square_distance < 900 then
surface.set_tiles({{name = 'water', position = position}}, true, false, false, false)
surface.set_tiles({ { name = 'water', position = position } }, true, false, false, false)
if math_random(1, 16) == 1 then
surface.create_entity({name = 'fish', position = position})
surface.create_entity({ name = 'fish', position = position })
end
return
end
@ -142,16 +142,16 @@ end
function biomes.ocean(surface, seed, position, square_distance, noise)
if noise > 0.66 then
surface.set_tiles({{name = 'deepwater', position = position}}, true, false, false, false)
surface.set_tiles({ { name = 'deepwater', position = position } }, true, false, false, false)
if math_random(1, 32) == 1 then
surface.create_entity({name = 'fish', position = position})
surface.create_entity({ name = 'fish', position = position })
end
return
end
if noise > 0.63 then
surface.set_tiles({{name = 'water', position = position}}, true, false, false, false)
surface.set_tiles({ { name = 'water', position = position } }, true, false, false, false)
if math_random(1, 32) == 1 then
surface.create_entity({name = 'fish', position = position})
surface.create_entity({ name = 'fish', position = position })
end
return
end
@ -169,7 +169,7 @@ function biomes.worm_desert(surface, seed, position, square_distance, noise)
end
local i = math_floor((GetNoise('decoratives', position, seed) * 8) % 3) + 1
surface.set_tiles({{name = 'sand-' .. i, position = position}}, true, false, false, false)
surface.set_tiles({ { name = 'sand-' .. i, position = position } }, true, false, false, false)
if math_random(1, 64) == 1 then
local e = Functions.place_worm(surface, position, 1)
@ -180,8 +180,8 @@ function biomes.worm_desert(surface, seed, position, square_distance, noise)
if math_random(1, 32) == 1 then
local n = GetNoise('decoratives', position, seed + 10000)
if n > 0.2 then
local trees = {'dead-grey-trunk', 'dead-grey-trunk', 'dry-tree'}
surface.create_entity({name = trees[math_random(1, 3)], position = position})
local trees = { 'dead-grey-trunk', 'dead-grey-trunk', 'dry-tree' }
surface.create_entity({ name = trees[math_random(1, 3)], position = position })
return
end
end
@ -200,9 +200,9 @@ function biomes.cave(surface, seed, position, square_distance, noise)
if math_abs(noise_cave_rivers1) < 0.025 then
local noise_cave_rivers2 = GetNoise('cave_rivers_3', position, seed + 200000)
if noise_cave_rivers2 > 0 then
surface.set_tiles({{name = 'water-shallow', position = position}}, true, false, false, false)
surface.set_tiles({ { name = 'water-shallow', position = position } }, true, false, false, false)
if math_random(1, 16) == 1 then
surface.create_entity({name = 'fish', position = position})
surface.create_entity({ name = 'fish', position = position })
end
return
end
@ -215,7 +215,7 @@ function biomes.cave(surface, seed, position, square_distance, noise)
Market.spawn_random_cave_market(surface, position)
end
end
surface.set_tiles({{name = 'dirt-' .. math_floor(no_rocks_2 * 16) % 4 + 3, position = position}}, true, false, false, false)
surface.set_tiles({ { name = 'dirt-' .. math_floor(no_rocks_2 * 16) % 4 + 3, position = position } }, true, false, false, false)
return
end
@ -229,7 +229,7 @@ function biomes.cave(surface, seed, position, square_distance, noise)
if math_random(1, 3) > 1 then
local a = (-49 + math_random(0, 98)) * 0.01
local b = (-49 + math_random(0, 98)) * 0.01
surface.create_entity({name = rock_raffle[math_random(1, size_of_rock_raffle)], position = {position.x + a, position.y + b}})
surface.create_entity({ name = rock_raffle[math_random(1, size_of_rock_raffle)], position = { position.x + a, position.y + b } })
end
if math_random(1, 2048) == 1 then
Functions.loot_crate(surface, position, 'wooden-chest')
@ -250,7 +250,7 @@ function biomes.cave(surface, seed, position, square_distance, noise)
return
end
if math_random(1, 64) == 1 then
local e = surface.create_entity({name = 'biter-spawner', position = position, force = 'enemy'})
local e = surface.create_entity({ name = 'biter-spawner', position = position, force = 'enemy' })
e.active = false
return
end
@ -310,15 +310,15 @@ function Public.generate_cave(event)
for x = 0, 31, 1 do
for y = 0, 31, 1 do
i = i + 1
local position = {x = left_top_x + x, y = left_top_y + y}
tiles[i] = {name = Functions.get_base_ground_tile(position, seed), position = position}
local position = { x = left_top_x + x, y = left_top_y + y }
tiles[i] = { name = Functions.get_base_ground_tile(position, seed), position = position }
end
end
surface.set_tiles(tiles, true)
for x = 0.5, 31.5, 1 do
for y = 0.5, 31.5, 1 do
local position = {x = left_top_x + x, y = left_top_y + y}
local position = { x = left_top_x + x, y = left_top_y + y }
local biome, square_distance, noise = get_biome(surface, seed, position)
biome(surface, seed, position, square_distance, noise)
end

View File

@ -19,9 +19,9 @@ local map_functions = require 'utils.tools.map_functions'
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true,
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true,
['mineable-wreckage'] = true
}
@ -41,7 +41,7 @@ local tile_replacements = {
['red-desert-3'] = 'grass-4'
}
local rocks = { 'rock-big', 'rock-big', 'rock-huge' }
local rocks = { 'big-rock', 'big-rock', 'huge-rock' }
local decos = {
'green-hairy-grass',
'green-hairy-grass',
@ -270,8 +270,8 @@ local function on_player_joined_game(event)
['tree-02-red'] = { 'copper-ore' },
['tree-04'] = { 'coal' },
['tree-08-brown'] = { 'stone' },
['rock-big'] = { 'uranium-ore' },
['rock-huge'] = { 'uranium-ore' }
['big-rock'] = { 'uranium-ore' },
['huge-rock'] = { 'uranium-ore' }
}
if prototypes.item['angels-ore1'] then
@ -284,8 +284,8 @@ local function on_player_joined_game(event)
end
if prototypes.item['thorium-ore'] then
storage.entity_yield['rock-big'] = { 'uranium-ore', 'thorium-ore' }
storage.entity_yield['rock-huge'] = { 'uranium-ore', 'thorium-ore' }
storage.entity_yield['big-rock'] = { 'uranium-ore', 'thorium-ore' }
storage.entity_yield['huge-rock'] = { 'uranium-ore', 'thorium-ore' }
end
storage.map_init_done = true

View File

@ -24,9 +24,9 @@ local math_random = math.random
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true,
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true,
['mineable-wreckage'] = true
}
@ -46,7 +46,7 @@ local tile_replacements = {
['red-desert-3'] = 'grass-4'
}
local rocks = { 'rock-big', 'rock-big', 'rock-huge' }
local rocks = { 'big-rock', 'big-rock', 'huge-rock' }
local decos = {
'green-hairy-grass',
'green-hairy-grass',
@ -387,8 +387,8 @@ local function on_player_joined_game(event)
['tree-02-red'] = { 'copper-ore' },
['tree-04'] = { 'coal' },
['tree-08-brown'] = { 'stone' },
['rock-big'] = { 'uranium-ore' },
['rock-huge'] = { 'uranium-ore' },
['big-rock'] = { 'uranium-ore' },
['huge-rock'] = { 'uranium-ore' },
['tree-09-brown'] = { 'stone', 'coal' },
['tree-08-red'] = { 'copper-ore', 'iron-ore' },
['tree-03'] = { 'coal', 'iron-ore' },
@ -405,8 +405,8 @@ local function on_player_joined_game(event)
end
if prototypes.item['thorium-ore'] then
storage.entity_yield['rock-big'] = { 'uranium-ore', 'thorium-ore' }
storage.entity_yield['rock-huge'] = { 'uranium-ore', 'thorium-ore' }
storage.entity_yield['big-rock'] = { 'uranium-ore', 'thorium-ore' }
storage.entity_yield['huge-rock'] = { 'uranium-ore', 'thorium-ore' }
end
local surface = player.surface

View File

@ -45,15 +45,15 @@ local tile_map = {
}
local rock_raffle = {
'sand-rock-big',
'sand-rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-huge'
'big-sand-rock',
'big-sand-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'huge-rock'
}
local function decompress()
@ -98,7 +98,7 @@ local function get_pos(x, y)
end
end
local ores = {'coal', 'iron-ore', 'copper-ore', 'stone'}
local ores = { 'coal', 'iron-ore', 'copper-ore', 'stone' }
local function plankton_territory(position, seed, ent)
local noise = simplex_noise(position.x * 0.009, position.y * 0.009, seed)
@ -113,18 +113,18 @@ local function plankton_territory(position, seed, ent)
end
if noise_2 > 0.75 then
local i = floor(noise * 6) % 4 + 1
ent[#ent + 1] = {name = ores[i], position = position, amount = 1 + 2500 * abs(noise_2 * 3)}
ent[#ent + 1] = { name = ores[i], position = position, amount = 1 + 2500 * abs(noise_2 * 3) }
return ('grass-' .. i)
end
if noise_2 < -0.76 then
local i = floor(noise * 6) % 4 + 1
if noise_2 < -0.86 then
ent[#ent + 1] = {name = 'uranium-ore', position = position, amount = 1 + 1000 * abs(noise_2 * 2)}
ent[#ent + 1] = { name = 'uranium-ore', position = position, amount = 1 + 1000 * abs(noise_2 * 2) }
return ('grass-' .. i)
end
if random(1, 3) ~= 1 then
ent[#ent + 1] = {name = rock_raffle[random(1, #rock_raffle)], position = position}
ent[#ent + 1] = { name = rock_raffle[random(1, #rock_raffle)], position = position }
end
return ('grass-' .. i)
end
@ -132,13 +132,13 @@ local function plankton_territory(position, seed, ent)
if noise < 0.12 and noise > -0.12 then
local i = floor(noise * 32) % 4 + 1
if random(1, 5) == 1 then
ent[#ent + 1] = {name = rock_raffle[random(1, #rock_raffle)], position = position}
ent[#ent + 1] = { name = rock_raffle[random(1, #rock_raffle)], position = position }
end
return ('grass-' .. i)
end
if random(1, 128) == 1 then
ent[#ent + 1] = {name = 'fish', position = position}
ent[#ent + 1] = { name = 'fish', position = position }
end
return 'water'
@ -174,20 +174,20 @@ function Public.make_chunk(event)
for x = x1, x2 do
for y = y1, y2 do
local pos = {x = x, y = y}
local pos = { x = x, y = y }
local new = get_pos(x, y)
local ore = get_random_ore(pos)
if new and type(new) == 'string' then
if new == 'lab-dark-2' then
ent[#ent + 1] = {name = ore, position = pos, amount = 2500}
ent[#ent + 1] = { name = ore, position = pos, amount = 2500 }
else
tiles[#tiles + 1] = {name = new, position = pos}
tiles[#tiles + 1] = { name = new, position = pos }
end
else
local tile_to_set = plankton_territory(pos, seed, ent)
if tile_to_set then
noise[#noise + 1] = {name = tile_to_set, position = pos}
noise[#noise + 1] = { name = tile_to_set, position = pos }
end
end
end
@ -197,9 +197,9 @@ function Public.make_chunk(event)
surface.set_tiles(noise, true)
for i = 1, #ent do
if ent[i].amount then
surface.create_entity({name = ent[i].name, position = ent[i].position, amount = ent[i].amount})
surface.create_entity({ name = ent[i].name, position = ent[i].position, amount = ent[i].amount })
else
surface.create_entity({name = ent[i].name, position = ent[i].position})
surface.create_entity({ name = ent[i].name, position = ent[i].position })
end
end
end

View File

@ -2,7 +2,7 @@ local Event = require 'utils.event'
local FDT = require 'maps.crab_defender.table'
local math_random = math.random
local rock_raffle = {'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge'}
local rock_raffle = { 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local function on_entity_died(event)
local crumbly_walls_unlocked = FDT.get('crumbly_walls_unlocked')
@ -19,7 +19,7 @@ local function on_entity_died(event)
if math_random(1, 4) == 1 then
return
end
entity.surface.create_entity({name = rock_raffle[math_random(1, #rock_raffle)], position = entity.position, force = 'player'})
entity.surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = entity.position, force = 'player' })
end
Event.add(defines.events.on_entity_died, on_entity_died)

View File

@ -14,53 +14,53 @@ end
local function secret_shop(pos, surface)
local secret_market_items = {
{ price = { { 'coin', random(300, 600) } }, offer = { type = 'give-item', item = 'combat-shotgun' } },
{ price = { { 'coin', random(200, 400) } }, offer = { type = 'give-item', item = 'rocket-launcher' } },
{ price = { { 'coin', random(5, 10) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } },
{ price = { { 'coin', random(300, 600) } }, offer = { type = 'give-item', item = 'combat-shotgun' } },
{ price = { { 'coin', random(200, 400) } }, offer = { type = 'give-item', item = 'rocket-launcher' } },
{ price = { { 'coin', random(5, 10) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } },
--{price = {{"coin", random(150,250)}}, offer = {type = 'give-item', item = 'uranium-rounds-magazine'}},
{ price = { { 'coin', random(15, 30) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } },
{ price = { { 'coin', random(10, 20) } }, offer = { type = 'give-item', item = 'rocket' } },
{ price = { { 'coin', random(20, 30) } }, offer = { type = 'give-item', item = 'explosive-rocket' } },
{ price = { { 'coin', random(30, 60) } }, offer = { type = 'give-item', item = 'cluster-grenade' } },
{ price = { { 'coin', random(8, 16) } }, offer = { type = 'give-item', item = 'land-mine' } },
{ price = { { 'coin', random(200, 300) } }, offer = { type = 'give-item', item = 'heavy-armor' } },
{ price = { { 'coin', random(400, 800) } }, offer = { type = 'give-item', item = 'modular-armor' } },
{ price = { { 'coin', random(1000, 2000) } }, offer = { type = 'give-item', item = 'power-armor' } },
{ price = { { 'coin', random(2500, 5000) } }, offer = { type = 'give-item', item = 'fusion-reactor-equipment' } },
{ price = { { 'coin', random(200, 400) } }, offer = { type = 'give-item', item = 'battery-equipment' } },
{ price = { { 'coin', random(150, 250) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } },
{ price = { { 'coin', random(100, 200) } }, offer = { type = 'give-item', item = 'night-vision-equipment' } },
{ price = { { 'coin', random(400, 800) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } },
{ price = { { 'coin', random(200, 300) } }, offer = { type = 'give-item', item = 'personal-roboport-equipment' } },
{ price = { { 'coin', random(25, 50) } }, offer = { type = 'give-item', item = 'construction-robot' } },
{ price = { { 'coin', random(15, 30) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } },
{ price = { { 'coin', random(10, 20) } }, offer = { type = 'give-item', item = 'rocket' } },
{ price = { { 'coin', random(20, 30) } }, offer = { type = 'give-item', item = 'explosive-rocket' } },
{ price = { { 'coin', random(30, 60) } }, offer = { type = 'give-item', item = 'cluster-grenade' } },
{ price = { { 'coin', random(8, 16) } }, offer = { type = 'give-item', item = 'land-mine' } },
{ price = { { 'coin', random(200, 300) } }, offer = { type = 'give-item', item = 'heavy-armor' } },
{ price = { { 'coin', random(400, 800) } }, offer = { type = 'give-item', item = 'modular-armor' } },
{ price = { { 'coin', random(1000, 2000) } }, offer = { type = 'give-item', item = 'power-armor' } },
{ price = { { 'coin', random(2500, 5000) } }, offer = { type = 'give-item', item = 'fusion-reactor-equipment' } },
{ price = { { 'coin', random(200, 400) } }, offer = { type = 'give-item', item = 'battery-equipment' } },
{ price = { { 'coin', random(150, 250) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } },
{ price = { { 'coin', random(100, 200) } }, offer = { type = 'give-item', item = 'night-vision-equipment' } },
{ price = { { 'coin', random(400, 800) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } },
{ price = { { 'coin', random(200, 300) } }, offer = { type = 'give-item', item = 'personal-roboport-equipment' } },
{ price = { { 'coin', random(25, 50) } }, offer = { type = 'give-item', item = 'construction-robot' } },
-- {price = {{"coin", random(10000,20000)}}, offer = {type = 'give-item', item = 'energy-shield-equipment'}},
-- {price = {{"coin", random(5000,15000)}}, offer = {type = 'give-item', item = 'personal-laser-defense-equipment'}},
{ price = { { 'coin', random(100, 300) } }, offer = { type = 'give-item', item = 'loader' } },
{ price = { { 'coin', random(200, 400) } }, offer = { type = 'give-item', item = 'fast-loader' } },
{ price = { { 'coin', random(300, 500) } }, offer = { type = 'give-item', item = 'express-loader' } },
{ price = { { 'coin', random(150, 300) } }, offer = { type = 'give-item', item = 'locomotive' } },
{ price = { { 'coin', random(100, 200) } }, offer = { type = 'give-item', item = 'cargo-wagon' } },
{ price = { { 'coin', random(5, 15) } }, offer = { type = 'give-item', item = 'grenade' } },
{ price = { { 'coin', random(80, 160) } }, offer = { type = 'give-item', item = 'cliff-explosives' } },
{ price = { { 'coin', random(10, 20) } }, offer = { type = 'give-item', item = 'explosives', count = 50 } },
{ price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'rail', count = 4 } },
{ price = { { 'coin', random(20, 30) } }, offer = { type = 'give-item', item = 'train-stop' } },
{ price = { { 'coin', random(4, 12) } }, offer = { type = 'give-item', item = 'small-lamp' } },
{ price = { { 'coin', random(1, 4) } }, offer = { type = 'give-item', item = 'firearm-magazine' } },
{ price = { { 'coin', random(60, 150) } }, offer = { type = 'give-item', item = 'car', count = 1 } },
{ price = { { 'coin', random(75, 150) } }, offer = { type = 'give-item', item = 'gun-turret', count = 1 } },
{ price = { { 'coin', random(500, 750) } }, offer = { type = 'give-item', item = 'laser-turret', count = 1 } },
{ price = { { 'coin', random(1000, 2000) } }, offer = { type = 'give-item', item = 'artillery-turret', count = 1 } },
{ price = { { 'coin', random(100, 200) } }, offer = { type = 'give-item', item = 'artillery-shell', count = 1 } },
{ price = { { 'coin', random(50, 150) } }, offer = { type = 'give-item', item = 'artillery-targeting-remote', count = 1 } },
{ price = { { 'coin', random(5, 15) } }, offer = { type = 'give-item', item = 'shotgun-shell', count = 1 } },
{ price = { { 'coin', random(100, 300) } }, offer = { type = 'give-item', item = 'loader' } },
{ price = { { 'coin', random(200, 400) } }, offer = { type = 'give-item', item = 'fast-loader' } },
{ price = { { 'coin', random(300, 500) } }, offer = { type = 'give-item', item = 'express-loader' } },
{ price = { { 'coin', random(150, 300) } }, offer = { type = 'give-item', item = 'locomotive' } },
{ price = { { 'coin', random(100, 200) } }, offer = { type = 'give-item', item = 'cargo-wagon' } },
{ price = { { 'coin', random(5, 15) } }, offer = { type = 'give-item', item = 'grenade' } },
{ price = { { 'coin', random(80, 160) } }, offer = { type = 'give-item', item = 'cliff-explosives' } },
{ price = { { 'coin', random(10, 20) } }, offer = { type = 'give-item', item = 'explosives', count = 50 } },
{ price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'rail', count = 4 } },
{ price = { { 'coin', random(20, 30) } }, offer = { type = 'give-item', item = 'train-stop' } },
{ price = { { 'coin', random(4, 12) } }, offer = { type = 'give-item', item = 'small-lamp' } },
{ price = { { 'coin', random(1, 4) } }, offer = { type = 'give-item', item = 'firearm-magazine' } },
{ price = { { 'coin', random(60, 150) } }, offer = { type = 'give-item', item = 'car', count = 1 } },
{ price = { { 'coin', random(75, 150) } }, offer = { type = 'give-item', item = 'gun-turret', count = 1 } },
{ price = { { 'coin', random(500, 750) } }, offer = { type = 'give-item', item = 'laser-turret', count = 1 } },
{ price = { { 'coin', random(1000, 2000) } }, offer = { type = 'give-item', item = 'artillery-turret', count = 1 } },
{ price = { { 'coin', random(100, 200) } }, offer = { type = 'give-item', item = 'artillery-shell', count = 1 } },
{ price = { { 'coin', random(50, 150) } }, offer = { type = 'give-item', item = 'artillery-targeting-remote', count = 1 } },
{ price = { { 'coin', random(5, 15) } }, offer = { type = 'give-item', item = 'shotgun-shell', count = 1 } },
{ price = { { 'coin', random(8000, 16000) } }, offer = { type = 'give-item', item = 'power-armor-mk2', count = 1 } },
{ price = { { 'coin', random(80, 160) } }, offer = { type = 'give-item', item = 'solar-panel-equipment', count = 1 } },
{ price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'wood', count = 50 } },
{ price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'iron-ore', count = 50 } },
{ price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'copper-ore', count = 50 } },
{ price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'stone', count = 50 } },
{ price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'coal', count = 50 } }
{ price = { { 'coin', random(80, 160) } }, offer = { type = 'give-item', item = 'solar-panel-equipment', count = 1 } },
{ price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'wood', count = 50 } },
{ price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'iron-ore', count = 50 } },
{ price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'copper-ore', count = 50 } },
{ price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'stone', count = 50 } },
{ price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'coal', count = 50 } }
--{price = {{"coin", random(4,8)}}, offer = {type = 'give-item', item = 'uranium-ore', count = 50}}
}
secret_market_items = shuffle(secret_market_items)
@ -189,7 +189,7 @@ local function get_noise(name, pos)
end
end
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local tree_raffle = { 'tree-04', 'tree-07', 'tree-09', 'tree-06', 'tree-04', 'tree-07', 'tree-09', 'tree-04' }
local function process_tile(pos)

View File

@ -6,9 +6,9 @@ local table_shuffle_table = table.shuffle_table
local math_random = math.random
local math_abs = math.abs
local decoratives = {'green-pita', 'green-pita-mini'}
local ores = {'copper-ore', 'copper-ore', 'coal'}
local trees = {'dead-dry-hairy-tree', 'dead-dry-hairy-tree', 'dead-dry-hairy-tree', 'dead-dry-hairy-tree', 'dead-tree-desert'}
local decoratives = { 'green-pita', 'green-pita-mini' }
local ores = { 'copper-ore', 'copper-ore', 'coal' }
local trees = { 'dead-dry-hairy-tree', 'dead-dry-hairy-tree', 'dead-dry-hairy-tree', 'dead-dry-hairy-tree', 'dead-tree-desert' }
local size_of_trees = #trees
local function draw_deco(surface, position, decorative_name, seed)
@ -20,7 +20,7 @@ local function draw_deco(surface, position, decorative_name, seed)
end
local noise = Get_noise('decoratives', position, seed)
if math_abs(noise) > 0.37 then
surface.create_decoratives {check_collision = false, decoratives = {{name = decorative_name, position = position, amount = math.floor(math.abs(noise * 3)) + 1}}}
surface.create_decoratives { check_collision = false, decoratives = { { name = decorative_name, position = position, amount = math.floor(math.abs(noise * 3)) + 1 } } }
end
end
@ -54,7 +54,7 @@ end
local function desert(surface, room)
local dungeontable = DungeonsTable.get_dungeontable()
for _, tile in pairs(room.path_tiles) do
surface.set_tiles({{name = 'sand-2', position = tile.position}}, true)
surface.set_tiles({ { name = 'sand-2', position = tile.position } }, true)
end
if not room.room_tiles[1] then
@ -64,39 +64,39 @@ local function desert(surface, room)
table_shuffle_table(room.room_border_tiles)
for key, tile in pairs(room.room_border_tiles) do
surface.set_tiles({{name = 'sand-1', position = tile.position}}, true)
surface.set_tiles({ { name = 'sand-1', position = tile.position } }, true)
end
local seed = game.surfaces[surface.index].map_gen_settings.seed + math_random(1, 1000000)
table_shuffle_table(room.room_tiles)
for key, tile in pairs(room.room_tiles) do
surface.set_tiles({{name = 'sand-3', position = tile.position}}, true)
surface.set_tiles({ { name = 'sand-3', position = tile.position } }, true)
if math_random(1, 16) == 1 and Get_noise('n3', tile.position, seed) > 0.1 then
surface.create_entity({name = ores[math_random(1, #ores)], position = tile.position, amount = Functions.get_common_resource_amount(surface.index)})
surface.create_entity({ name = ores[math_random(1, #ores)], position = tile.position, amount = Functions.get_common_resource_amount(surface.index) })
else
if math_random(1, 320) == 1 then
surface.create_entity({name = 'crude-oil', position = tile.position, amount = Functions.get_crude_oil_amount(surface.index)})
surface.create_entity({ name = 'crude-oil', position = tile.position, amount = Functions.get_crude_oil_amount(surface.index) })
end
if math_random(1, 64) == 1 then
surface.create_entity({name = trees[math_random(1, size_of_trees)], position = tile.position})
surface.create_entity({ name = trees[math_random(1, size_of_trees)], position = tile.position })
end
end
if key % 128 == 1 and math_random(1, 3) == 1 then
Functions.set_spawner_tier(
surface.create_entity({name = Functions.roll_spawner_name(), position = tile.position, force = dungeontable.enemy_forces[surface.index]}),
surface.create_entity({ name = Functions.roll_spawner_name(), position = tile.position, force = dungeontable.enemy_forces[surface.index] }),
surface.index
)
end
if math_random(1, 160) == 1 then
surface.create_entity({name = Functions.roll_worm_name(surface.index), position = tile.position, force = dungeontable.enemy_forces[surface.index]})
surface.create_entity({ name = Functions.roll_worm_name(surface.index), position = tile.position, force = dungeontable.enemy_forces[surface.index] })
end
local noise = Get_noise('decoratives', tile.position, seed)
if math_random(1, 3) > 1 and math_abs(noise) > 0.52 then
Functions.create_scrap(surface, tile.position)
end
if math_random(1, 128) == 1 then
surface.create_entity({name = 'rock-huge', position = tile.position})
surface.create_entity({ name = 'huge-rock', position = tile.position })
end
end
@ -106,10 +106,10 @@ local function desert(surface, room)
if math_random(1, 64) == 1 then
for x = -1, 1, 1 do
for y = -1, 1, 1 do
local p = {room.center.x + x, room.center.y + y}
surface.set_tiles({{name = 'water', position = p}})
local p = { room.center.x + x, room.center.y + y }
surface.set_tiles({ { name = 'water', position = p } })
if math_random(1, 4) == 1 then
surface.create_entity({name = 'fish', position = p})
surface.create_entity({ name = 'fish', position = p })
end
end
end

View File

@ -6,9 +6,9 @@ local table_shuffle_table = table.shuffle_table
local math_random = math.random
local math_abs = math.abs
local decoratives = {'brown-asterisk', 'brown-carpet-grass', 'brown-fluff', 'brown-fluff-dry', 'brown-hairy-grass', 'brown-asterisk', 'brown-fluff', 'brown-fluff-dry'}
local ores = {'iron-ore', 'iron-ore', 'iron-ore', 'iron-ore', 'copper-ore', 'copper-ore', 'copper-ore', 'coal', 'coal', 'stone', 'stone'}
local trees = {'dead-dry-hairy-tree', 'dead-grey-trunk', 'dead-tree-desert', 'dry-hairy-tree', 'dry-tree'}
local decoratives = { 'brown-asterisk', 'brown-carpet-grass', 'brown-fluff', 'brown-fluff-dry', 'brown-hairy-grass', 'brown-asterisk', 'brown-fluff', 'brown-fluff-dry' }
local ores = { 'iron-ore', 'iron-ore', 'iron-ore', 'iron-ore', 'copper-ore', 'copper-ore', 'copper-ore', 'coal', 'coal', 'stone', 'stone' }
local trees = { 'dead-dry-hairy-tree', 'dead-grey-trunk', 'dead-tree-desert', 'dry-hairy-tree', 'dry-tree' }
local size_of_trees = #trees
local function draw_deco(surface, position, decorative_name, seed)
@ -20,7 +20,7 @@ local function draw_deco(surface, position, decorative_name, seed)
end
local noise = Get_noise('decoratives', position, seed)
if math_abs(noise) > 0.38 then
surface.create_decoratives {check_collision = false, decoratives = {{name = decorative_name, position = position, amount = math.floor(math.abs(noise * 3)) + 1}}}
surface.create_decoratives { check_collision = false, decoratives = { { name = decorative_name, position = position, amount = math.floor(math.abs(noise * 3)) + 1 } } }
end
end
@ -57,7 +57,7 @@ local function dirtlands(surface, room)
local max_worm = max_spawn + 1
local path_tile = 'dirt-' .. math_random(1, 3)
for _, tile in pairs(room.path_tiles) do
surface.set_tiles({{name = path_tile, position = tile.position}}, true)
surface.set_tiles({ { name = path_tile, position = tile.position } }, true)
end
if not room.room_border_tiles[1] then
@ -67,33 +67,33 @@ local function dirtlands(surface, room)
table_shuffle_table(room.room_tiles)
for key, tile in pairs(room.room_tiles) do
surface.set_tiles({{name = 'dirt-7', position = tile.position}}, true)
surface.set_tiles({ { name = 'dirt-7', position = tile.position } }, true)
if math_random(1, 64) == 1 then
surface.create_entity({name = ores[math_random(1, #ores)], position = tile.position, amount = Functions.get_common_resource_amount(surface.index)})
surface.create_entity({ name = ores[math_random(1, #ores)], position = tile.position, amount = Functions.get_common_resource_amount(surface.index) })
else
if math_random(1, 2048) == 1 then
surface.create_entity({name = 'crude-oil', position = tile.position, amount = Functions.get_crude_oil_amount(surface.index)})
surface.create_entity({ name = 'crude-oil', position = tile.position, amount = Functions.get_crude_oil_amount(surface.index) })
end
if math_random(1, 128) == 1 then
surface.create_entity({name = trees[math_random(1, size_of_trees)], position = tile.position})
surface.create_entity({ name = trees[math_random(1, size_of_trees)], position = tile.position })
end
end
if key % 128 == 1 and math_random(1, 2) == 1 and max_spawn > 0 then
Functions.set_spawner_tier(
surface.create_entity({name = Functions.roll_spawner_name(), position = tile.position, force = dungeontable.enemy_forces[surface.index]}),
surface.create_entity({ name = Functions.roll_spawner_name(), position = tile.position, force = dungeontable.enemy_forces[surface.index] }),
surface.index
)
max_spawn = max_spawn - 1
max_spawn = max_spawn - 1
end
if math_random(1, 320) == 1 and max_worm > 0 then
surface.create_entity({name = Functions.roll_worm_name(surface.index), position = tile.position, force = dungeontable.enemy_forces[surface.index]})
max_worm = max_worm - 1
surface.create_entity({ name = Functions.roll_worm_name(surface.index), position = tile.position, force = dungeontable.enemy_forces[surface.index] })
max_worm = max_worm - 1
end
if math_random(1, 512) == 1 then
Functions.create_scrap(surface, tile.position)
end
if math_random(1, 256) == 1 then
surface.create_entity({name = 'rock-huge', position = tile.position})
surface.create_entity({ name = 'huge-rock', position = tile.position })
end
end
@ -103,10 +103,10 @@ local function dirtlands(surface, room)
if math_random(1, 16) == 1 then
for x = -1, 1, 1 do
for y = -1, 1, 1 do
local p = {room.center.x + x, room.center.y + y}
surface.set_tiles({{name = 'water', position = p}})
local p = { room.center.x + x, room.center.y + y }
surface.set_tiles({ { name = 'water', position = p } })
if math_random(1, 4) == 1 then
surface.create_entity({name = 'fish', position = p})
surface.create_entity({ name = 'fish', position = p })
end
end
end
@ -115,7 +115,7 @@ local function dirtlands(surface, room)
table_shuffle_table(room.room_border_tiles)
for key, tile in pairs(room.room_border_tiles) do
surface.set_tiles({{name = 'dirt-4', position = tile.position}}, true)
surface.set_tiles({ { name = 'dirt-4', position = tile.position } }, true)
end
for key, tile in pairs(room.room_border_tiles) do

View File

@ -7,21 +7,21 @@ local math_random = math.random
local math_abs = math.abs
local math_floor = math.floor
local decoratives = {'green-asterisk', 'green-bush-mini', 'green-carpet-grass', 'green-hairy-grass', 'green-small-grass'}
local ores = {'iron-ore', 'iron-ore', 'coal'}
local trees = {'tree-01', 'tree-02', 'tree-04', 'tree-05', 'tree-06', 'tree-07', 'tree-08'}
local decoratives = { 'green-asterisk', 'green-bush-mini', 'green-carpet-grass', 'green-hairy-grass', 'green-small-grass' }
local ores = { 'iron-ore', 'iron-ore', 'coal' }
local trees = { 'tree-01', 'tree-02', 'tree-04', 'tree-05', 'tree-06', 'tree-07', 'tree-08' }
local size_of_trees = #trees
local function draw_deco(surface, position, decorative_name, seed)
if surface.get_tile(position).name == 'water' then
return
end
if surface.count_entities_filtered({type = 'resource', position = position}) > 0 then
if surface.count_entities_filtered({ type = 'resource', position = position }) > 0 then
return
end
local noise = Get_noise('decoratives', position, seed)
if math_abs(noise) > 0.28 then
surface.create_decoratives {check_collision = false, decoratives = {{name = decorative_name, position = position, amount = math.floor(math.abs(noise * 3)) + 1}}}
surface.create_decoratives { check_collision = false, decoratives = { { name = decorative_name, position = position, amount = math.floor(math.abs(noise * 3)) + 1 } } }
end
end
@ -55,7 +55,7 @@ end
local function grasslands(surface, room)
local dungeontable = DungeonsTable.get_dungeontable()
for _, tile in pairs(room.path_tiles) do
surface.set_tiles({{name = 'grass-1', position = tile.position}}, true)
surface.set_tiles({ { name = 'grass-1', position = tile.position } }, true)
end
if not room.room_tiles[1] then
@ -68,25 +68,25 @@ local function grasslands(surface, room)
table_shuffle_table(room.room_tiles)
for key, tile in pairs(room.room_tiles) do
surface.set_tiles({{name = 'grass-2', position = tile.position}}, true)
surface.set_tiles({ { name = 'grass-2', position = tile.position } }, true)
if math_random(1, 16) == 1 and Get_noise('n3', tile.position, seed) > 0.1 then
surface.create_entity({name = ores[math_random(1, #ores)], position = tile.position, amount = Functions.get_common_resource_amount(surface.index)})
surface.create_entity({ name = ores[math_random(1, #ores)], position = tile.position, amount = Functions.get_common_resource_amount(surface.index) })
else
if math_random(1, math_random(2, 20)) == 1 and math_abs(Get_noise('decoratives', tile.position, seed + 100000)) > 0.2 then
surface.create_entity({name = tree_name, position = tile.position})
surface.create_entity({ name = tree_name, position = tile.position })
end
end
if key % 128 == 1 and math_random(1, 3) == 1 then
Functions.set_spawner_tier(
surface.create_entity({name = Functions.roll_spawner_name(), position = tile.position, force = dungeontable.enemy_forces[surface.index]}),
surface.create_entity({ name = Functions.roll_spawner_name(), position = tile.position, force = dungeontable.enemy_forces[surface.index] }),
surface.index
)
end
if math_random(1, 320) == 1 then
surface.create_entity({name = Functions.roll_worm_name(surface.index), position = tile.position, force = dungeontable.enemy_forces[surface.index]})
surface.create_entity({ name = Functions.roll_worm_name(surface.index), position = tile.position, force = dungeontable.enemy_forces[surface.index] })
end
if math_random(1, 1024) == 1 then
surface.create_entity({name = 'rock-huge', position = tile.position})
surface.create_entity({ name = 'huge-rock', position = tile.position })
end
end
@ -97,10 +97,10 @@ local function grasslands(surface, room)
local r = math_random(1, r_max)
for x = r * -1, r, 1 do
for y = r * -1, r, 1 do
local p = {room.center.x + x, room.center.y + y}
surface.set_tiles({{name = 'water', position = p}})
local p = { room.center.x + x, room.center.y + y }
surface.set_tiles({ { name = 'water', position = p } })
if math_random(1, 8) == 1 then
surface.create_entity({name = 'fish', position = p})
surface.create_entity({ name = 'fish', position = p })
end
end
end
@ -108,7 +108,7 @@ local function grasslands(surface, room)
table_shuffle_table(room.room_border_tiles)
for key, tile in pairs(room.room_border_tiles) do
surface.set_tiles({{name = 'grass-3', position = tile.position}}, true)
surface.set_tiles({ { name = 'grass-3', position = tile.position } }, true)
end
for key, tile in pairs(room.room_border_tiles) do

View File

@ -6,8 +6,8 @@ local math_random = math.random
local math_sqrt = math.sqrt
local math_floor = math.floor
local trees = {'dead-dry-hairy-tree', 'dead-grey-trunk', 'dead-tree-desert', 'dry-hairy-tree', 'dry-tree'}
local ores = {'stone', 'stone', 'coal'}
local trees = { 'dead-dry-hairy-tree', 'dead-grey-trunk', 'dead-tree-desert', 'dry-hairy-tree', 'dry-tree' }
local ores = { 'stone', 'stone', 'coal' }
local size_of_trees = #trees
local function add_enemy_units(surface, room)
@ -26,32 +26,32 @@ end
local function red_desert(surface, room)
local dungeontable = DungeonsTable.get_dungeontable()
for _, tile in pairs(room.path_tiles) do
surface.set_tiles({{name = 'red-desert-0', position = tile.position}}, true)
surface.set_tiles({ { name = 'red-desert-0', position = tile.position } }, true)
end
if #room.room_tiles > 1 then
table_shuffle_table(room.room_tiles)
end
for key, tile in pairs(room.room_tiles) do
surface.set_tiles({{name = 'dry-dirt', position = tile.position}}, true)
surface.set_tiles({ { name = 'dry-dirt', position = tile.position } }, true)
if math_random(1, 32) == 1 then
surface.create_entity({name = ores[math_random(1, #ores)], position = tile.position, amount = Functions.get_common_resource_amount(surface.index)})
surface.create_entity({ name = ores[math_random(1, #ores)], position = tile.position, amount = Functions.get_common_resource_amount(surface.index) })
else
if math_random(1, 4) == 1 and surface.can_place_entity({name = trees[math_random(1, size_of_trees)], position = tile.position}) then
surface.create_entity({name = trees[math_random(1, size_of_trees)], position = tile.position})
if math_random(1, 4) == 1 and surface.can_place_entity({ name = trees[math_random(1, size_of_trees)], position = tile.position }) then
surface.create_entity({ name = trees[math_random(1, size_of_trees)], position = tile.position })
end
end
if key % 16 == 0 and math_random(1, 32) == 1 then
Functions.set_spawner_tier(
surface.create_entity({name = Functions.roll_spawner_name(), position = tile.position, force = dungeontable.enemy_forces[surface.index]}),
surface.create_entity({ name = Functions.roll_spawner_name(), position = tile.position, force = dungeontable.enemy_forces[surface.index] }),
surface.index
)
end
if math_random(1, 256) == 1 then
surface.create_entity({name = Functions.roll_worm_name(surface.index), position = tile.position, force = dungeontable.enemy_forces[surface.index]})
surface.create_entity({ name = Functions.roll_worm_name(surface.index), position = tile.position, force = dungeontable.enemy_forces[surface.index] })
end
if math_random(1, 32) == 1 then
surface.create_entity({name = 'rock-huge', position = tile.position})
surface.create_entity({ name = 'huge-rock', position = tile.position })
end
end
@ -62,10 +62,10 @@ local function red_desert(surface, room)
local r = math_floor(math_sqrt(#room.room_tiles) * 0.15) + 1
for x = r * -1, r, 1 do
for y = r * -1, r, 1 do
local p = {room.center.x + x, room.center.y + y}
surface.set_tiles({{name = 'water', position = p}})
local p = { room.center.x + x, room.center.y + y }
surface.set_tiles({ { name = 'water', position = p } })
if math_random(1, 8) == 1 then
surface.create_entity({name = 'fish', position = p})
surface.create_entity({ name = 'fish', position = p })
end
end
end
@ -76,7 +76,7 @@ local function red_desert(surface, room)
table_shuffle_table(room.room_border_tiles)
end
for key, tile in pairs(room.room_border_tiles) do
surface.set_tiles({{name = 'red-desert-1', position = tile.position}}, true)
surface.set_tiles({ { name = 'red-desert-1', position = tile.position } }, true)
end
for key, tile in pairs(room.room_border_tiles) do
@ -84,15 +84,15 @@ local function red_desert(surface, room)
Functions.place_border_rock(surface, tile.position)
else
if math_random(1, 3) > 1 then
surface.create_entity({name = 'rock-huge', position = tile.position})
surface.create_entity({ name = 'huge-rock', position = tile.position })
end
end
end
if room.entrance_tile then
local p = room.entrance_tile.position
local area = {{p.x - 0.5, p.y - 0.5}, {p.x + 0.5, p.y + 0.5}}
for _, entity in pairs(surface.find_entities_filtered({area = area})) do
local area = { { p.x - 0.5, p.y - 0.5 }, { p.x + 0.5, p.y + 0.5 } }
for _, entity in pairs(surface.find_entities_filtered({ area = area })) do
entity.destroy()
end
end

View File

@ -224,37 +224,37 @@ end
function Public.market(surface, position)
local offers = {
{ price = { { 'pistol', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(3, 4) } },
{ price = { { 'submachine-gun', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(15, 20) } },
{ price = { { 'shotgun', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(12, 18) } },
{ price = { { 'combat-shotgun', 1 } }, offer = { type = 'give-item', item = 'steel-plate', count = math_random(7, 10) } },
{ price = { { 'rocket-launcher', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(7, 10) } },
{ price = { { 'flamethrower', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(12, 18) } },
{ price = { { 'light-armor', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(15, 20) } },
{ price = { { 'heavy-armor', 1 } }, offer = { type = 'give-item', item = 'steel-plate', count = math_random(15, 20) } },
{ price = { { 'modular-armor', 1 } }, offer = { type = 'give-item', item = 'advanced-circuit', count = math_random(15, 20) } },
{ price = { { 'night-vision-equipment', 1 } }, offer = { type = 'give-item', item = 'steel-plate', count = math_random(3, 4) } },
{ price = { { 'solar-panel-equipment', 1 } }, offer = { type = 'give-item', item = 'copper-plate', count = math_random(15, 25) } },
{ price = { { 'red-wire', 100 } }, offer = { type = 'give-item', item = 'copper-cable', count = math_random(75, 100) } },
{ price = { { 'green-wire', 100 } }, offer = { type = 'give-item', item = 'copper-cable', count = math_random(75, 100) } },
{ price = { { 'barrel', 10 } }, offer = { type = 'give-item', item = 'steel-plate', count = math_random(6, 8) } },
{ price = { { 'arithmetic-combinator', 10 } }, offer = { type = 'give-item', item = 'electronic-circuit', count = math_random(15, 25) } },
{ price = { { 'decider-combinator', 10 } }, offer = { type = 'give-item', item = 'electronic-circuit', count = math_random(15, 25) } },
{ price = { { 'constant-combinator', 10 } }, offer = { type = 'give-item', item = 'electronic-circuit', count = math_random(9, 12) } },
{ price = { { 'power-switch', 10 } }, offer = { type = 'give-item', item = 'electronic-circuit', count = math_random(9, 12) } },
{ price = { { 'programmable-speaker', 10 } }, offer = { type = 'give-item', item = 'electronic-circuit', count = math_random(20, 30) } },
{ price = { { 'belt-immunity-equipment', 1 } }, offer = { type = 'give-item', item = 'advanced-circuit', count = math_random(2, 3) } },
{ price = { { 'pistol', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(3, 4) } },
{ price = { { 'submachine-gun', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(15, 20) } },
{ price = { { 'shotgun', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(12, 18) } },
{ price = { { 'combat-shotgun', 1 } }, offer = { type = 'give-item', item = 'steel-plate', count = math_random(7, 10) } },
{ price = { { 'rocket-launcher', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(7, 10) } },
{ price = { { 'flamethrower', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(12, 18) } },
{ price = { { 'light-armor', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(15, 20) } },
{ price = { { 'heavy-armor', 1 } }, offer = { type = 'give-item', item = 'steel-plate', count = math_random(15, 20) } },
{ price = { { 'modular-armor', 1 } }, offer = { type = 'give-item', item = 'advanced-circuit', count = math_random(15, 20) } },
{ price = { { 'night-vision-equipment', 1 } }, offer = { type = 'give-item', item = 'steel-plate', count = math_random(3, 4) } },
{ price = { { 'solar-panel-equipment', 1 } }, offer = { type = 'give-item', item = 'copper-plate', count = math_random(15, 25) } },
{ price = { { 'red-wire', 100 } }, offer = { type = 'give-item', item = 'copper-cable', count = math_random(75, 100) } },
{ price = { { 'green-wire', 100 } }, offer = { type = 'give-item', item = 'copper-cable', count = math_random(75, 100) } },
{ price = { { 'barrel', 10 } }, offer = { type = 'give-item', item = 'steel-plate', count = math_random(6, 8) } },
{ price = { { 'arithmetic-combinator', 10 } }, offer = { type = 'give-item', item = 'electronic-circuit', count = math_random(15, 25) } },
{ price = { { 'decider-combinator', 10 } }, offer = { type = 'give-item', item = 'electronic-circuit', count = math_random(15, 25) } },
{ price = { { 'constant-combinator', 10 } }, offer = { type = 'give-item', item = 'electronic-circuit', count = math_random(9, 12) } },
{ price = { { 'power-switch', 10 } }, offer = { type = 'give-item', item = 'electronic-circuit', count = math_random(9, 12) } },
{ price = { { 'programmable-speaker', 10 } }, offer = { type = 'give-item', item = 'electronic-circuit', count = math_random(20, 30) } },
{ price = { { 'belt-immunity-equipment', 1 } }, offer = { type = 'give-item', item = 'advanced-circuit', count = math_random(2, 3) } },
{ price = { { 'discharge-defense-remote', 1 } }, offer = { type = 'give-item', item = 'electronic-circuit', count = 1 } },
{ price = { { 'rail-signal', 10 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(30, 40) } },
{ price = { { 'rail-chain-signal', 10 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(30, 40) } },
{ price = { { 'train-stop', 10 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(75, 100) } },
{ price = { { 'locomotive', 1 } }, offer = { type = 'give-item', item = 'steel-plate', count = math_random(30, 40) } },
{ price = { { 'cargo-wagon', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(30, 40) } },
{ price = { { 'fluid-wagon', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(30, 40) } },
{ price = { { 'car', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(15, 20) } },
{ price = { { 'radar', 10 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(15, 20) } },
{ price = { { 'cannon-shell', 10 } }, offer = { type = 'give-item', item = 'steel-plate', count = math_random(7, 10) } },
{ price = { { 'uranium-cannon-shell', 10 } }, offer = { type = 'give-item', item = 'uranium-238', count = math_random(7, 10) } }
{ price = { { 'rail-signal', 10 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(30, 40) } },
{ price = { { 'rail-chain-signal', 10 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(30, 40) } },
{ price = { { 'train-stop', 10 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(75, 100) } },
{ price = { { 'locomotive', 1 } }, offer = { type = 'give-item', item = 'steel-plate', count = math_random(30, 40) } },
{ price = { { 'cargo-wagon', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(30, 40) } },
{ price = { { 'fluid-wagon', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(30, 40) } },
{ price = { { 'car', 1 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(15, 20) } },
{ price = { { 'radar', 10 } }, offer = { type = 'give-item', item = 'iron-plate', count = math_random(15, 20) } },
{ price = { { 'cannon-shell', 10 } }, offer = { type = 'give-item', item = 'steel-plate', count = math_random(7, 10) } },
{ price = { { 'uranium-cannon-shell', 10 } }, offer = { type = 'give-item', item = 'uranium-238', count = math_random(7, 10) } }
}
table.shuffle_table(offers)
local market = surface.create_entity({ name = 'market', position = position, force = 'neutral' })
@ -370,7 +370,7 @@ function Public.place_border_rock(surface, position)
if key then
pos = { pos.x + vectors[key][1] * 0.45, pos.y + vectors[key][2] * 0.45 }
end
surface.create_entity({ name = 'rock-big', position = pos })
surface.create_entity({ name = 'big-rock', position = pos })
end
function Public.create_scrap(surface, position)
@ -393,9 +393,9 @@ end
function Public.on_marked_for_deconstruction(event)
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true,
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true,
['crash-site-spaceship-wreck-small-1'] = true,
['crash-site-spaceship-wreck-small-2'] = true,
['crash-site-spaceship-wreck-small-3'] = true,
@ -462,9 +462,9 @@ function Public.rocky_loot(event)
return
end
local allowed = {
['rock-big'] = true,
['rock-huge'] = true,
['sand-rock-big'] = true
['big-rock'] = true,
['huge-rock'] = true,
['big-sand-rock'] = true
}
if not allowed[event.entity.name] then
return
@ -610,15 +610,15 @@ function Public.draw_spawn(surface)
local position = { x = x, y = y }
if position.x <= spawn_size and position.y <= spawn_size and position.x >= spawn_size * -1 and position.y >= spawn_size * -1 then
if position.x == spawn_size then
entities[i] = { name = 'rock-big', position = { position.x + 0.95, position.y } }
entities[i] = { name = 'big-rock', position = { position.x + 0.95, position.y } }
i = i + 1
end
if position.y == spawn_size then
entities[i] = { name = 'rock-big', position = { position.x, position.y + 0.95 } }
entities[i] = { name = 'big-rock', position = { position.x, position.y + 0.95 } }
i = i + 1
end
if position.x == spawn_size * -1 or position.y == spawn_size * -1 then
entities[i] = { name = 'rock-big', position = position }
entities[i] = { name = 'big-rock', position = position }
i = i + 1
end
end

View File

@ -312,7 +312,7 @@ local function on_entity_damaged(event)
if math_random(1, 256) == 1 then
return
end
if entity.name ~= 'rock-big' then
if entity.name ~= 'big-rock' then
return
end
entity.health = entity.health + event.final_damage_amount
@ -326,7 +326,7 @@ local function on_player_mined_entity(event)
if entity.type == 'simple-entity' then
Functions.mining_events(entity)
end
if entity.name ~= 'rock-big' then
if entity.name ~= 'big-rock' then
return
end
expand(entity.surface, entity.position)
@ -340,7 +340,7 @@ local function on_entity_died(event)
if entity.type == 'unit-spawner' then
spawner_death(entity)
end
if entity.name ~= 'rock-big' then
if entity.name ~= 'big-rock' then
return
end
expand(entity.surface, entity.position)
@ -410,7 +410,7 @@ local function on_tick()
local surface = game.surfaces["dungeons"]
local entities = surface.find_entities_filtered({name = "rock-big"})
local entities = surface.find_entities_filtered({name = "big-rock"})
if not entities[1] then return end
local entity = entities[math_random(1, #entities)]

View File

@ -435,7 +435,7 @@ local function on_entity_damaged(event)
end
local size = dungeontable.surface_size[entity.surface.index]
if size < math.abs(entity.position.y) or size < math.abs(entity.position.x) then
if entity.name == 'rock-big' then
if entity.name == 'big-rock' then
entity.health = entity.health + event.final_damage_amount
end
return
@ -455,7 +455,7 @@ local function on_entity_damaged(event)
if math_random(1, 256) == 1 then
return
end
if entity.name ~= 'rock-big' then
if entity.name ~= 'big-rock' then
return
end
entity.health = entity.health + event.final_damage_amount
@ -467,7 +467,7 @@ local function on_player_mined_entity(event)
if not entity.valid then
return
end
if entity.name == 'rock-big' then
if entity.name == 'big-rock' then
local size = dungeontable.surface_size[entity.surface.index]
if size < math.abs(entity.position.y) or size < math.abs(entity.position.x) then
entity.surface.create_entity({ name = entity.name, position = entity.position })
@ -483,7 +483,7 @@ local function on_player_mined_entity(event)
Functions.mining_events(entity)
Functions.rocky_loot(event)
end
if entity.name ~= 'rock-big' then
if entity.name ~= 'big-rock' then
return
end
expand(entity.surface, entity.position)
@ -499,7 +499,7 @@ local function on_entity_died(event)
if entity.type == 'unit-spawner' then
spawner_death(entity)
end
if entity.name ~= 'rock-big' then
if entity.name ~= 'big-rock' then
return
end
expand(entity.surface, entity.position)
@ -819,7 +819,7 @@ local function on_tick()
local surface = game.surfaces["dungeons"]
local entities = surface.find_entities_filtered({name = "rock-big"})
local entities = surface.find_entities_filtered({name = "big-rock"})
if not entities[1] then return end
local entity = entities[math_random(1, #entities)]

View File

@ -351,7 +351,7 @@ function Public.expand(expanse, left_top)
end
surface.create_entity({ name = 'crude-oil', position = { a - 4, a - 4 }, amount = 1500000 })
Task.set_timeout_in_ticks(30, delay_infini_tree_token, { surface = surface, position = { a - 4, a + 4 } })
surface.create_entity({ name = 'rock-big', position = { a + 4, a - 4 } })
surface.create_entity({ name = 'big-rock', position = { a + 4, a - 4 } })
surface.spill_item_stack({ a, a + 2 }, { name = 'coin', count = 1 }, false, nil, false)
surface.spill_item_stack({ a + 0.5, a + 2.5 }, { name = 'coin', count = 1 }, false, nil, false)
surface.spill_item_stack({ a - 0.5, a + 2.5 }, { name = 'coin', count = 1 }, false, nil, false)

View File

@ -298,7 +298,7 @@ local function infini_rock(entity)
end
local a = math.floor(expanse.square_size * 0.5)
if entity.position.x == a + 4 and entity.position.y == a - 4 then
entity.surface.create_entity({ name = 'rock-big', position = { a + 4, a - 4 } })
entity.surface.create_entity({ name = 'big-rock', position = { a + 4, a - 4 } })
entity.surface.spill_item_stack(entity.position, { name = inf_ores[math.random(1, 4)], count = math.random(80, 160) }, true, nil, true)
entity.surface.spill_item_stack(entity.position, { name = 'stone', count = math.random(5, 15) }, true, nil, true)
uranium_mining(entity)

View File

@ -2,7 +2,7 @@ local Event = require 'utils.event'
local FDT = require 'maps.fish_defender.table'
local math_random = math.random
local rock_raffle = {'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge'}
local rock_raffle = { 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local function on_entity_died(event)
local crumbly_walls_unlocked = FDT.get('crumbly_walls_unlocked')
@ -19,7 +19,7 @@ local function on_entity_died(event)
if math_random(1, 4) == 1 then
return
end
entity.surface.create_entity({name = rock_raffle[math_random(1, #rock_raffle)], position = entity.position, force = 'player'})
entity.surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = entity.position, force = 'player' })
end
Event.add(defines.events.on_entity_died, on_entity_died)

View File

@ -11,15 +11,15 @@ local math_sqrt = math.sqrt
local Public = {}
local rock_raffle = {
'sand-rock-big',
'sand-rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-huge'
'big-sand-rock',
'big-sand-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'huge-rock'
}
local function get_replacement_tile(surface, position)

View File

@ -1,7 +1,7 @@
local Event = require 'utils.event'
local math_random = math.random
local rock_raffle = { 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local function on_entity_died(event)
if not storage.crumbly_walls_unlocked then

View File

@ -1277,15 +1277,15 @@ local worm_raffle_table = {
}
}
local rock_raffle = {
'sand-rock-big',
'sand-rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-huge'
'big-sand-rock',
'big-sand-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'huge-rock'
}
local function spawn_obstacles(left_top, surface)

View File

@ -45,15 +45,15 @@ local tile_map = {
}
local rock_raffle = {
'sand-rock-big',
'sand-rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-huge'
'big-sand-rock',
'big-sand-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'huge-rock'
}
local function decompress()
@ -98,7 +98,7 @@ local function get_pos(x, y)
end
end
local ores = {'coal', 'iron-ore', 'copper-ore', 'stone'}
local ores = { 'coal', 'iron-ore', 'copper-ore', 'stone' }
local function plankton_territory(position, seed, ent)
local noise = simplex_noise(position.x * 0.009, position.y * 0.009, seed)
@ -120,19 +120,19 @@ local function plankton_territory(position, seed, ent)
if noise_2 > 0.75 then
local i = floor(noise * 6) % 4 + 1
--surface.set_tiles({{name = "grass-" .. i, position = position}}, true)
ent[#ent + 1] = {name = ores[i], position = position, amount = 1 + 2500 * abs(noise_2 * 3)}
ent[#ent + 1] = { name = ores[i], position = position, amount = 1 + 2500 * abs(noise_2 * 3) }
return ('grass-' .. i)
end
if noise_2 < -0.76 then
local i = floor(noise * 6) % 4 + 1
--surface.set_tiles({{name = "grass-" .. i, position = position}}, true)
if noise_2 < -0.86 then
ent[#ent + 1] = {name = 'uranium-ore', position = position, amount = 1 + 1000 * abs(noise_2 * 2)}
ent[#ent + 1] = { name = 'uranium-ore', position = position, amount = 1 + 1000 * abs(noise_2 * 2) }
return ('grass-' .. i)
end
if random(1, 3) ~= 1 then
ent[#ent + 1] = {name = rock_raffle[random(1, #rock_raffle)], position = position}
ent[#ent + 1] = { name = rock_raffle[random(1, #rock_raffle)], position = position }
end
return ('grass-' .. i)
end
@ -141,14 +141,14 @@ local function plankton_territory(position, seed, ent)
local i = floor(noise * 32) % 4 + 1
--surface.set_tiles({{name = "grass-" .. i, position = position}}, true)
if random(1, 5) == 1 then
ent[#ent + 1] = {name = rock_raffle[random(1, #rock_raffle)], position = position}
ent[#ent + 1] = { name = rock_raffle[random(1, #rock_raffle)], position = position }
end
return ('grass-' .. i)
end
--surface.set_tiles({{name = "water", position = position}}, true)
if random(1, 128) == 1 then
ent[#ent + 1] = {name = 'fish', position = position}
ent[#ent + 1] = { name = 'fish', position = position }
end
return 'water'
@ -185,20 +185,20 @@ function Public.make_chunk(event)
for x = x1, x2 do
for y = y1, y2 do
local pos = {x = x, y = y}
local pos = { x = x, y = y }
local new = get_pos(x, y)
local ore = get_random_ore(pos)
if new and type(new) == 'string' then
if new == 'lab-dark-2' then
ent[#ent + 1] = {name = ore, position = pos, amount = 2500}
ent[#ent + 1] = { name = ore, position = pos, amount = 2500 }
else
tiles[#tiles + 1] = {name = new, position = pos}
tiles[#tiles + 1] = { name = new, position = pos }
end
else
local tile_to_set = plankton_territory(pos, seed, ent)
if tile_to_set then
noise[#noise + 1] = {name = tile_to_set, position = pos}
noise[#noise + 1] = { name = tile_to_set, position = pos }
end
end
end
@ -208,9 +208,9 @@ function Public.make_chunk(event)
surface.set_tiles(noise, true)
for i = 1, #ent do
if ent[i].amount then
surface.create_entity({name = ent[i].name, position = ent[i].position, amount = ent[i].amount})
surface.create_entity({ name = ent[i].name, position = ent[i].position, amount = ent[i].amount })
else
surface.create_entity({name = ent[i].name, position = ent[i].position})
surface.create_entity({ name = ent[i].name, position = ent[i].position })
end
end
end

View File

@ -2,7 +2,7 @@ local Event = require 'utils.event'
local Public = require 'maps.fish_defender_v2.table'
local random = math.random
local rock_raffle = {'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge'}
local rock_raffle = { 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local function on_entity_died(event)
local crumbly_walls_unlocked = Public.get('crumbly_walls_unlocked')
@ -19,7 +19,7 @@ local function on_entity_died(event)
if random(1, 4) == 1 then
return
end
entity.surface.create_entity({name = rock_raffle[random(1, #rock_raffle)], position = entity.position, force = 'player'})
entity.surface.create_entity({ name = rock_raffle[random(1, #rock_raffle)], position = entity.position, force = 'player' })
end
Event.add(defines.events.on_entity_died, on_entity_died)

View File

@ -11,12 +11,12 @@ local 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'
'big-sand-rock',
'big-sand-rock',
'big-rock',
'big-rock',
'big-rock',
'huge-rock'
}
local size_of_rock_raffle = #rock_raffle

View File

@ -28,7 +28,7 @@ local modifiers_diagonal = {
{ diagonal = { x = -1, y = -1 }, connection_1 = { x = -1, y = 0 }, connection_2 = { x = 0, y = -1 } }
}
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local function shuffle(tbl)
local size = #tbl
@ -60,7 +60,7 @@ local function create_shipwreck(surface, position)
{ { name = 'inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 },
{ { name = 'long-handed-inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 },
{ { name = 'fast-inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'bulk-inserter', count = math_random(2, 4) }, weight = 1, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'bulk-inserter', count = math_random(2, 4) }, weight = 1, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'stack-inserter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'small-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'medium-electric-pole', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 1 },

View File

@ -5,7 +5,7 @@ local NoiseVectors = require 'utils.functions.noise_vector_path'
local Enemies = require 'maps.island_troopers.enemies'
local ShoppingChests = require 'modules.shopping_chests'
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local function island_noise(p, seed_1, seed_2, seed_3)
local noise_1 = simplex_noise(p.x * seed_m1, p.y * seed_m1, seed_1)

View File

@ -6,7 +6,7 @@ local math_random = math.random
local math_abs = math.abs
local math_floor = math.floor
local math_sqrt = math.sqrt
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local size_of_rock_raffle = #rock_raffle
local ore_raffle = {}
for i = 1, 25, 1 do
@ -34,9 +34,9 @@ for i = 1, 5, 1 do
end
local size_of_ore_raffle_2 = #ore_raffle_2
local rock_yield = {
['rock-big'] = 1,
['rock-huge'] = 2,
['sand-rock-big'] = 1
['big-rock'] = 1,
['huge-rock'] = 2,
['big-sand-rock'] = 1
}
local solid_tiles = {
['concrete'] = true,

View File

@ -29,9 +29,9 @@ local scrap = require 'utils.tools.scrap'
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true,
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true,
['crash-site-spaceship-wreck-small-1'] = true,
['crash-site-spaceship-wreck-small-2'] = true,
['crash-site-spaceship-wreck-small-3'] = true,
@ -150,7 +150,7 @@ local function create_shipwreck(surface, position)
{ { name = 'inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 },
{ { name = 'long-handed-inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 },
{ { name = 'fast-inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'bulk-inserter', count = math_random(2, 4) }, weight = 1, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'bulk-inserter', count = math_random(2, 4) }, weight = 1, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'stack-inserter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'small-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'medium-electric-pole', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 1 },

View File

@ -5,7 +5,7 @@ local math_floor = math.floor
local Treasure = require 'maps.junkyard_pvp.treasure'
local Map_functions = require 'utils.tools.map_functions'
local simplex_noise = require 'utils.simplex_noise'.d2
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local spawner_raffle = { 'biter-spawner', 'biter-spawner', 'biter-spawner', 'spitter-spawner' }
local noises = {
['no_rocks'] = { { modifier = 0.0033, weight = 1 }, { modifier = 0.01, weight = 0.22 }, { modifier = 0.05, weight = 0.05 }, { modifier = 0.1, weight = 0.04 } },

View File

@ -96,7 +96,7 @@ local function is_chunk_allowed_to_grow(chunk_position, surface)
left_top = { x = pos_x, y = pos_y },
right_bottom = { x = pos_x + 31, y = pos_y + 31 }
}
if surface.count_entities_filtered { area = area, name = { 'sand-rock-big', 'rock-big', 'rock-huge' }, limit = 1 } == 0 then
if surface.count_entities_filtered { area = area, name = { 'big-sand-rock', 'big-rock', 'huge-rock' }, limit = 1 } == 0 then
return true
else
return false
@ -167,7 +167,7 @@ local function init_map()
game.map_settings.pollution.pollution_restored_per_tree_damage = 0
game.forces['player'].set_spawn_position({ 16, 0 }, surface)
surface.create_entity { name = 'rock-big', position = { 16, -16 } }
surface.create_entity { name = 'big-rock', position = { 16, -16 } }
this.settings.seed = seed
game.forces['player'].technologies['artillery'].enabled = false
@ -195,7 +195,7 @@ worm_raffle[7] = { 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turr
worm_raffle[8] = { 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'big-worm-turret', 'big-worm-turret' }
worm_raffle[9] = { 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret' }
worm_raffle[10] = { 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret' }
local rock_weights = { { 'sand-rock-big', 9 }, { 'rock-big', 32 }, { 'rock-huge', 1 } }
local rock_weights = { { 'big-sand-rock', 9 }, { 'big-rock', 32 }, { 'huge-rock', 1 } }
local rock_raffle = {}
for _, t in pairs(rock_weights) do
for _ = 1, t[2], 1 do
@ -1063,13 +1063,13 @@ local function on_entity_died(event)
return
end
if name == 'sand-rock-big' or name == 'rock-big' or name == 'rock-huge' then
if name == 'big-sand-rock' or name == 'big-rock' or name == 'huge-rock' then
local pos = { x = position.x, y = position.y }
if name == 'rock-huge' then
if name == 'huge-rock' then
spawn_infinity_chest(pos, surface)
elseif name == 'rock-big' then
elseif name == 'big-rock' then
treasure_chest(pos, surface)
elseif name == 'sand-rock-big' then
elseif name == 'big-sand-rock' then
local n = ore_spawn_raffle[math.random(1, #ore_spawn_raffle)]
--local amount_modifier = 1 + ((this.settings.labyrinth_size / labyrinth_difficulty_curve) * 10)
local amount_modifier = math.ceil(1 + evolution * 5)
@ -1090,7 +1090,7 @@ local function on_entity_died(event)
end
local function on_player_mined_entity(event)
if event.entity.name == 'sand-rock-big' or event.entity.name == 'rock-big' or event.entity.name == 'rock-huge' then
if event.entity.name == 'big-sand-rock' or event.entity.name == 'big-rock' or event.entity.name == 'huge-rock' then
event.entity.die()
end
end
@ -1356,7 +1356,7 @@ local function on_robot_built_entity(event)
end
local function on_entity_damaged(event)
if event.entity.name == 'rock-huge' or event.entity.name == 'rock-big' or event.entity.name == 'sand-rock-big' then
if event.entity.name == 'huge-rock' or event.entity.name == 'big-rock' or event.entity.name == 'big-sand-rock' then
if event.force.name == 'enemy' then
event.entity.health = event.entity.health + event.final_damage_amount
end

File diff suppressed because it is too large Load Diff

View File

@ -12,9 +12,9 @@ local simplex_noise = require 'utils.simplex_noise'.d2
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true,
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true,
['mineable-wreckage'] = true
}
@ -45,15 +45,15 @@ local function generate_outer_content(event)
for x = 0, 31, 1 do
for y = 0, 31, 1 do
local tile_to_insert = false
local pos = {x = left_top.x + x, y = left_top.y + y}
local pos = { x = left_top.x + x, y = left_top.y + y }
local noise = get_noise('ocean', pos)
if math.floor(noise * 8) % 2 == 1 then
surface.set_tiles({{name = 'deepwater', position = pos}})
surface.set_tiles({ { name = 'deepwater', position = pos } })
else
surface.set_tiles({{name = 'water', position = pos}})
surface.set_tiles({ { name = 'water', position = pos } })
end
if math_random(1, 256) == 1 then
surface.create_entity({name = 'fish', position = pos})
surface.create_entity({ name = 'fish', position = pos })
end
end
end
@ -65,23 +65,23 @@ local function generate_inner_content(event)
for x = 0, 31, 1 do
for y = 0, 31, 1 do
local tile_to_insert = false
local pos = {x = left_top.x + x, y = left_top.y + y}
local pos = { x = left_top.x + x, y = left_top.y + y }
if pos.x < 2 and pos.y < 2 and pos.x > -3 and pos.y > -3 then
surface.set_tiles({{name = 'grass-1', position = pos}})
surface.create_entity({name = 'stone', position = pos, amount = 999999})
surface.set_tiles({ { name = 'grass-1', position = pos } })
surface.create_entity({ name = 'stone', position = pos, amount = 999999 })
else
local noise = get_noise('ocean', pos)
if math.floor(noise * 8) % 2 == 1 then
surface.set_tiles({{name = 'deepwater', position = pos}})
surface.set_tiles({ { name = 'deepwater', position = pos } })
else
surface.set_tiles({{name = 'water', position = pos}})
surface.set_tiles({ { name = 'water', position = pos } })
end
if math_random(1, 256) == 1 then
surface.create_entity({name = 'fish', position = pos})
surface.create_entity({ name = 'fish', position = pos })
end
end
if pos.x == 0 and pos.y == 0 then
surface.create_entity({name = 'rock-big', position = pos})
surface.create_entity({ name = 'big-rock', position = pos })
end
end
end
@ -96,7 +96,7 @@ local function on_chunk_generated(event)
local tiles = {}
local entities = {}
for _, e in pairs(surface.find_entities_filtered({area = event.area})) do
for _, e in pairs(surface.find_entities_filtered({ area = event.area })) do
if e.name ~= 'character' then
e.destroy()
end
@ -116,20 +116,20 @@ local function init_map()
local map_gen_settings = {}
map_gen_settings.water = 'small'
map_gen_settings.cliff_settings = {cliff_elevation_interval = 22, cliff_elevation_0 = 22}
map_gen_settings.cliff_settings = { cliff_elevation_interval = 22, cliff_elevation_0 = 22 }
map_gen_settings.autoplace_controls = {
['coal'] = {frequency = 'none', size = 'none', richness = 'none'},
['stone'] = {frequency = 'none', size = 'none', richness = 'none'},
['copper-ore'] = {frequency = 'none', size = 'none', richness = 'none'},
['iron-ore'] = {frequency = 'none', size = 'none', richness = 'none'},
['crude-oil'] = {frequency = 'none', size = 'none', richness = 'none'},
['trees'] = {frequency = 'none', size = 'none', richness = 'none'},
['enemy-base'] = {frequency = 'none', size = 'none', richness = 'none'}
['coal'] = { frequency = 'none', size = 'none', richness = 'none' },
['stone'] = { frequency = 'none', size = 'none', richness = 'none' },
['copper-ore'] = { frequency = 'none', size = 'none', richness = 'none' },
['iron-ore'] = { frequency = 'none', size = 'none', richness = 'none' },
['crude-oil'] = { frequency = 'none', size = 'none', richness = 'none' },
['trees'] = { frequency = 'none', size = 'none', richness = 'none' },
['enemy-base'] = { frequency = 'none', size = 'none', richness = 'none' }
}
game.create_surface('lost', map_gen_settings)
game.surfaces['lost'].ticks_per_day = game.surfaces['lost'].ticks_per_day * 2
game.surfaces['lost'].request_to_generate_chunks({0, 0}, 3)
game.surfaces['lost'].request_to_generate_chunks({ 0, 0 }, 3)
game.surfaces['lost'].force_generate_chunk_requests()
game.forces.player.manual_mining_speed_modifier = 0.5
@ -142,7 +142,7 @@ local function on_player_joined_game(event)
local player = game.players[event.player_index]
if player.online_time == 0 then
player.teleport(game.surfaces['lost'].find_non_colliding_position('character', {0, 2}, 50, 0.5), 'lost')
player.teleport(game.surfaces['lost'].find_non_colliding_position('character', { 0, 2 }, 50, 0.5), 'lost')
end
end
@ -155,7 +155,7 @@ local function on_player_mined_entity(event)
return
end
if entity.position.x == 0 and entity.position.y == 0 then
entity.surface.create_entity({name = 'rock-big', position = {0, 0}})
entity.surface.create_entity({ name = 'big-rock', position = { 0, 0 } })
end
end

View File

@ -36,9 +36,9 @@ local decorative_whitelist = {
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true,
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true,
['mineable-wreckage'] = true
}
@ -92,7 +92,7 @@ local function shipwreck(position, surface)
end
local worm_raffle = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'big-worm-turret' }
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local ore_spawn_raffle = { 'iron-ore', 'iron-ore', 'iron-ore', 'copper-ore', 'copper-ore', 'copper-ore', 'coal', 'coal', 'stone', 'stone', 'uranium-ore', 'crude-oil' }
local function on_chunk_generated(event)
@ -142,9 +142,9 @@ local function on_chunk_generated(event)
if noise > 0.5 then
if math_random(1, 3) ~= 1 then
if math_random(1, 2) == 1 then
surface.create_entity({ name = 'rock-big', position = pos })
surface.create_entity({ name = 'big-rock', position = pos })
else
surface.create_entity({ name = 'rock-huge', position = pos })
surface.create_entity({ name = 'huge-rock', position = pos })
end
else
if math_random(1, 2048) == 1 then

View File

@ -26,9 +26,9 @@ local spawn_point = { x = 0, y = 2 }
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true
}
local worm_raffle_table = {
[1] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret' },
@ -42,7 +42,7 @@ local worm_raffle_table = {
[9] = { 'medium-worm-turret', 'medium-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret' },
[10] = { 'medium-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret' }
}
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local nest_raffle = { 'biter-spawner', 'biter-spawner', 'biter-spawner', 'spitter-spawner' }
local function shuffle(tbl)
@ -413,7 +413,7 @@ local function on_chunk_generated(event)
surface.create_decoratives {
check_collision = false,
decoratives = {
{ name = 'rock-medium', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) }
{ name = 'medium-rock', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) }
}
}
end
@ -421,7 +421,7 @@ local function on_chunk_generated(event)
surface.create_decoratives {
check_collision = false,
decoratives = {
{ name = 'rock-small', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) }
{ name = 'small-rock', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) }
}
}
end
@ -429,7 +429,7 @@ local function on_chunk_generated(event)
surface.create_decoratives {
check_collision = false,
decoratives = {
{ name = 'rock-tiny', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) }
{ name = 'tiny-rock', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) }
}
}
end

View File

@ -7,7 +7,7 @@ local math_random = math.random
local math_floor = math.floor
local math_abs = math.abs
local simplex_noise = require 'utils.simplex_noise'.d2
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local wagon_raffle = { 'cargo-wagon', 'cargo-wagon', 'cargo-wagon', 'locomotive', 'fluid-wagon' }
local size_of_rock_raffle = #rock_raffle
local spawner_raffle = { 'biter-spawner', 'biter-spawner', 'biter-spawner', 'spitter-spawner' }
@ -1035,7 +1035,7 @@ local function border_chunk(surface, left_top)
surface.create_decoratives {
check_collision = false,
decoratives = {
{ name = 'rock-medium', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) }
{ name = 'medium-rock', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) }
}
}
end
@ -1043,7 +1043,7 @@ local function border_chunk(surface, left_top)
surface.create_decoratives {
check_collision = false,
decoratives = {
{ name = 'rock-small', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) }
{ name = 'small-rock', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) }
}
}
end
@ -1051,7 +1051,7 @@ local function border_chunk(surface, left_top)
surface.create_decoratives {
check_collision = false,
decoratives = {
{ name = 'rock-tiny', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) }
{ name = 'tiny-rock', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) }
}
}
end

View File

@ -629,7 +629,7 @@ function Public.update_gui(player)
gui.global_pool.tooltip = ({ 'gui.global_pool_amount', floor(rpg_extra.global_pool) })
end
gui.scrap_mined.caption = ' [img=entity.tree-01][img=entity.rock-huge]: ' .. format_number(mined_scrap, true)
gui.scrap_mined.caption = ' [img=entity.tree-01][img=entity.huge-rock]: ' .. format_number(mined_scrap, true)
gui.scrap_mined.tooltip = ({ 'gui.amount_harvested' })
local pickaxe_upgrades = Public.pickaxe_upgrades

View File

@ -6,7 +6,7 @@ local GetNoise = require 'utils.get_noise'
local LootRaffle = require 'utils.functions.loot_raffle'
local wagon_raffle = { 'cargo-wagon', 'cargo-wagon', 'cargo-wagon', 'locomotive', 'fluid-wagon' }
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local function draw_border(surface, left_x, height)
local tiles = {}

View File

@ -394,9 +394,9 @@ local swampy_rivers_layers = {
type = 'LuaEntity',
name = 'rocky',
objects = {
'sand-rock-big',
'rock-big',
'rock-huge'
'big-sand-rock',
'big-rock',
'huge-rock'
},
elevation = 0.5,
resolution = 0.1,
@ -1384,9 +1384,9 @@ local valid_ents = {
['crash-site-spaceship-wreck-small-5'] = true,
['crash-site-spaceship-wreck-small-6'] = true,
['mineable-wreckage'] = true,
['sand-rock-big'] = true,
['rock-big'] = true,
['rock-huge'] = true
['big-sand-rock'] = true,
['big-rock'] = true,
['huge-rock'] = true
}
local function mined_wreckage(e)

View File

@ -98,7 +98,7 @@ local function spawn_area(event)
end
if noise < -0.75 then
if math.random(1, 16) == 1 then
event.surface.create_entity({ name = 'rock-big', position = p, force = 'neutral' })
event.surface.create_entity({ name = 'big-rock', position = p, force = 'neutral' })
end
end
end

View File

@ -16,7 +16,7 @@ local disabled_for_deconstruction = {
['fish'] = true
}
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local tile_replacements = {
['water'] = 'grass-2',

View File

@ -54,7 +54,7 @@ local function init_surface()
return surface
end
local wastes = { 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'mineable-wreckage', 'mineable-wreckage', 'mineable-wreckage', 'rock-huge' }
local wastes = { 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'mineable-wreckage', 'mineable-wreckage', 'mineable-wreckage', 'huge-rock' }
local function get_noise(name, pos)
local seed = game.surfaces[1].map_gen_settings.seed
@ -106,7 +106,7 @@ local function process_tile(surface, pos)
end
if math.random(1, 6) ~= 1 then
surface.create_entity({ name = 'rock-big', position = pos, force = 'neutral' })
surface.create_entity({ name = 'big-rock', position = pos, force = 'neutral' })
end
end
@ -131,19 +131,19 @@ local function on_chunk_generated(event)
end
for _, e in pairs(surface.find_entities_filtered({ type = 'unit-spawner', area = event.area })) do
clear_entities_around_position(surface, 7, e.position, { 'rock-big' })
clear_entities_around_position(surface, 7, e.position, { 'big-rock' })
end
for _, e in pairs(surface.find_entities_filtered({ type = 'cliff', area = event.area })) do
clear_entities_around_position(surface, 2.25, e.position, { 'rock-big' })
clear_entities_around_position(surface, 2.25, e.position, { 'big-rock' })
end
for _, e in pairs(surface.find_entities_filtered({ type = 'tree', area = event.area })) do
clear_entities_around_position(surface, 1, e.position, { 'rock-big' })
clear_entities_around_position(surface, 1, e.position, { 'big-rock' })
end
if left_top.x == 128 and left_top.y == 128 then
clear_entities_around_position(surface, 5, { x = 0, y = 0 }, { 'rock-big' })
clear_entities_around_position(surface, 5, { x = 0, y = 0 }, { 'big-rock' })
end
end

View File

@ -160,18 +160,18 @@ function Public.initialize(init)
mgs.autoplace_settings = {
entity = {
settings = {
['rock-huge'] = { frequency = 2, size = 1, richness = 1 },
['rock-big'] = { frequency = 2, size = 1, richness = 1 },
['sand-rock-big'] = { frequency = 2, size = 1, richness = 1 }
['huge-rock'] = { frequency = 2, size = 1, richness = 1 },
['big-rock'] = { frequency = 2, size = 1, richness = 1 },
['big-sand-rock'] = { frequency = 2, size = 1, richness = 1 }
}
},
decorative = {
settings = {
['rock-tiny'] = { frequency = 10, size = 'normal', richness = 'normal' },
['rock-small'] = { frequency = 5, size = 'normal', richness = 'normal' },
['rock-medium'] = { frequency = 2, size = 'normal', richness = 'normal' },
['sand-rock-small'] = { frequency = 10, size = 'normal', richness = 'normal' },
['sand-rock-medium'] = { frequency = 5, size = 'normal', richness = 'normal' }
['tiny-rock'] = { frequency = 10, size = 'normal', richness = 'normal' },
['small-rock'] = { frequency = 5, size = 'normal', richness = 'normal' },
['medium-rock'] = { frequency = 2, size = 'normal', richness = 'normal' },
['sand-small-rock'] = { frequency = 10, size = 'normal', richness = 'normal' },
['sand-medium-rock'] = { frequency = 5, size = 'normal', richness = 'normal' }
}
},
tile = {
@ -258,7 +258,7 @@ function Public.initialize(init)
surface.freeze_daytime = false
-- surface.map_gen_settings.water = 0.5
surface.clear(true)
surface.regenerate_entity({ 'rock-huge', 'rock-big', 'sand-rock-big' })
surface.regenerate_entity({ 'huge-rock', 'big-rock', 'big-sand-rock' })
surface.regenerate_decorative()
end

View File

@ -8,9 +8,9 @@ local table_shuffle = table.shuffle_table
local valid_entities = {
['rock-big'] = true,
['rock-huge'] = true,
['sand-rock-big'] = true
['big-rock'] = true,
['huge-rock'] = true,
['big-sand-rock'] = true
}
local size_raffle = {

View File

@ -22,129 +22,129 @@ local function treasure_chest(position, surface)
local math_random = math.random
local chest_raffle = {}
local chest_loot = {
{ { name = 'submachine-gun', count = math_random(1, 3) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 },
{ { name = 'slowdown-capsule', count = math_random(16, 32) }, weight = 1, evolution_min = 0.0, evolution_max = 1 },
{ { name = 'poison-capsule', count = math_random(16, 32) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 },
{ { name = 'cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.7 },
{ { name = 'explosive-uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 },
{ { name = 'explosive-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.8 },
{ { name = 'shotgun', count = 1 }, weight = 2, evolution_min = 0.0, evolution_max = 0.2 },
{ { name = 'shotgun-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.0, evolution_max = 0.2 },
{ { name = 'combat-shotgun', count = 1 }, weight = 10, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'piercing-shotgun-shell', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 1 },
{ { name = 'flamethrower', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 },
{ { name = 'flamethrower-ammo', count = math_random(16, 32) }, weight = 5, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'rocket-launcher', count = 1 }, weight = 5, evolution_min = 0.2, evolution_max = 0.6 },
{ { name = 'rocket', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'explosive-rocket', count = math_random(16, 32) }, weight = 10, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'land-mine', count = math_random(8, 16) }, weight = 10, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'grenade', count = math_random(8, 16) }, weight = 10, evolution_min = 0.0, evolution_max = 0.5 },
{ { name = 'cluster-grenade', count = math_random(8, 16) }, weight = 5, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'firearm-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0, evolution_max = 0.3 },
{ { name = 'piercing-rounds-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0.1, evolution_max = 0.8 },
{ { name = 'uranium-rounds-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'defender-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.0, evolution_max = 0.7 },
{ { name = 'distractor-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.2, evolution_max = 1 },
{ { name = 'destroyer-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'atomic-bomb', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 1 },
{ { name = 'light-armor', count = 1 }, weight = 3, evolution_min = 0, evolution_max = 0.1 },
{ { name = 'heavy-armor', count = 1 }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 },
{ { name = 'modular-armor', count = 1 }, weight = 2, evolution_min = 0.2, evolution_max = 0.6 },
{ { name = 'power-armor', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'power-armor-mk2', count = 1 }, weight = 1, evolution_min = 0.8, evolution_max = 1 },
{ { name = 'battery-equipment', count = 1 }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 },
{ { name = 'battery-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.6, evolution_max = 1 },
{ { name = 'belt-immunity-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'solar-panel-equipment', count = math_random(1, 4) }, weight = 5, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'discharge-defense-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 0.8 },
{ { name = 'energy-shield-equipment', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'energy-shield-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 },
{ { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'fusion-reactor-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'night-vision-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'personal-laser-defense-equipment', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'iron-gear-wheel', count = math_random(80, 100) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'copper-cable', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.1, evolution_max = 0.5 },
{ { name = 'electric-engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.4, evolution_max = 0.8 },
{ { name = 'battery', count = math_random(100, 200) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'advanced-circuit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'electronic-circuit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 },
{ { name = 'processing-unit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.7, evolution_max = 1 },
{ { name = 'explosives', count = math_random(25, 50) }, weight = 1, evolution_min = 0.2, evolution_max = 0.6 },
{ { name = 'lubricant-barrel', count = math_random(4, 10) }, weight = 1, evolution_min = 0.3, evolution_max = 0.5 },
{ { name = 'rocket-fuel', count = math_random(4, 10) }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 },
{ { name = 'steel-plate', count = math_random(50, 100) }, weight = 2, evolution_min = 0.1, evolution_max = 0.3 },
{ { name = 'nuclear-fuel', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 },
{ { name = 'burner-inserter', count = math_random(16, 32) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 },
{ { name = 'inserter', count = math_random(16, 32) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 },
{ { name = 'long-handed-inserter', count = math_random(16, 32) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 },
{ { name = 'fast-inserter', count = math_random(16, 32) }, weight = 3, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 1, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'stack-inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'small-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'medium-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.2, evolution_max = 1 },
{ { name = 'big-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'substation', count = math_random(4, 8) }, weight = 3, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'wooden-chest', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 },
{ { name = 'iron-chest', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 0.4 },
{ { name = 'steel-chest', count = math_random(8, 16) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'small-lamp', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 },
{ { name = 'rail', count = math_random(50, 100) }, weight = 3, evolution_min = 0.1, evolution_max = 0.6 },
{ { name = 'assembling-machine-1', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'assembling-machine-2', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.8 },
{ { name = 'assembling-machine-3', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'accumulator', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'offshore-pump', count = math_random(2, 4) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 },
{ { name = 'beacon', count = math_random(2, 4) }, weight = 3, evolution_min = 0.7, evolution_max = 1 },
{ { name = 'boiler', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'steam-engine', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.5 },
{ { name = 'steam-turbine', count = math_random(2, 4) }, weight = 2, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'nuclear-reactor', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'centrifuge', count = math_random(1, 2) }, weight = 2, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'heat-pipe', count = math_random(8, 16) }, weight = 2, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'heat-exchanger', count = math_random(4, 8) }, weight = 2, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'arithmetic-combinator', count = math_random(25, 50) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'constant-combinator', count = math_random(25, 50) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'decider-combinator', count = math_random(25, 50) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'power-switch', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'programmable-speaker', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'green-wire', count = math_random(100, 200) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'red-wire', count = math_random(100, 200) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'chemical-plant', count = math_random(2, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'burner-mining-drill', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 },
{ { name = 'electric-mining-drill', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.6 },
{ { name = 'express-transport-belt', count = math_random(50, 100) }, weight = 3, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'express-underground-belt', count = math_random(4, 16) }, weight = 3, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'express-splitter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'fast-transport-belt', count = math_random(50, 100) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'fast-underground-belt', count = math_random(4, 16) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'fast-splitter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.2, evolution_max = 0.3 },
{ { name = 'transport-belt', count = math_random(50, 100) }, weight = 3, evolution_min = 0, evolution_max = 0.3 },
{ { name = 'underground-belt', count = math_random(4, 16) }, weight = 3, evolution_min = 0, evolution_max = 0.3 },
{ { name = 'splitter', count = math_random(8, 16) }, weight = 3, evolution_min = 0, evolution_max = 0.3 },
{ { name = 'oil-refinery', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'pipe', count = math_random(40, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'pipe-to-ground', count = math_random(25, 50) }, weight = 1, evolution_min = 0.2, evolution_max = 0.5 },
{ { name = 'pumpjack', count = math_random(2, 4) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'pump', count = math_random(2, 4) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'solar-panel', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 0.9 },
{ { name = 'electric-furnace', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'steel-furnace', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'stone-furnace', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 },
{ { name = 'radar', count = math_random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 0.3 },
{ { name = 'rail-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 },
{ { name = 'rail-chain-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 },
{ { name = 'stone-wall', count = math_random(50, 100) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 },
{ { name = 'gate', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 },
{ { name = 'storage-tank', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 },
{ { name = 'train-stop', count = math_random(2, 4) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'express-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'fast-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.0, evolution_max = 0.5 },
{ { name = 'lab', count = math_random(2, 4) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }
{ { name = 'submachine-gun', count = math_random(1, 3) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 },
{ { name = 'slowdown-capsule', count = math_random(16, 32) }, weight = 1, evolution_min = 0.0, evolution_max = 1 },
{ { name = 'poison-capsule', count = math_random(16, 32) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 },
{ { name = 'cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.7 },
{ { name = 'explosive-uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 },
{ { name = 'explosive-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.8 },
{ { name = 'shotgun', count = 1 }, weight = 2, evolution_min = 0.0, evolution_max = 0.2 },
{ { name = 'shotgun-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.0, evolution_max = 0.2 },
{ { name = 'combat-shotgun', count = 1 }, weight = 10, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'piercing-shotgun-shell', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 1 },
{ { name = 'flamethrower', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 },
{ { name = 'flamethrower-ammo', count = math_random(16, 32) }, weight = 5, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'rocket-launcher', count = 1 }, weight = 5, evolution_min = 0.2, evolution_max = 0.6 },
{ { name = 'rocket', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'explosive-rocket', count = math_random(16, 32) }, weight = 10, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'land-mine', count = math_random(8, 16) }, weight = 10, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'grenade', count = math_random(8, 16) }, weight = 10, evolution_min = 0.0, evolution_max = 0.5 },
{ { name = 'cluster-grenade', count = math_random(8, 16) }, weight = 5, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'firearm-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0, evolution_max = 0.3 },
{ { name = 'piercing-rounds-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0.1, evolution_max = 0.8 },
{ { name = 'uranium-rounds-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'defender-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.0, evolution_max = 0.7 },
{ { name = 'distractor-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.2, evolution_max = 1 },
{ { name = 'destroyer-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'atomic-bomb', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 1 },
{ { name = 'light-armor', count = 1 }, weight = 3, evolution_min = 0, evolution_max = 0.1 },
{ { name = 'heavy-armor', count = 1 }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 },
{ { name = 'modular-armor', count = 1 }, weight = 2, evolution_min = 0.2, evolution_max = 0.6 },
{ { name = 'power-armor', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'power-armor-mk2', count = 1 }, weight = 1, evolution_min = 0.8, evolution_max = 1 },
{ { name = 'battery-equipment', count = 1 }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 },
{ { name = 'battery-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.6, evolution_max = 1 },
{ { name = 'belt-immunity-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'solar-panel-equipment', count = math_random(1, 4) }, weight = 5, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'discharge-defense-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 0.8 },
{ { name = 'energy-shield-equipment', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'energy-shield-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 },
{ { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'fusion-reactor-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'night-vision-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'personal-laser-defense-equipment', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'iron-gear-wheel', count = math_random(80, 100) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'copper-cable', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.1, evolution_max = 0.5 },
{ { name = 'electric-engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.4, evolution_max = 0.8 },
{ { name = 'battery', count = math_random(100, 200) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'advanced-circuit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'electronic-circuit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 },
{ { name = 'processing-unit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.7, evolution_max = 1 },
{ { name = 'explosives', count = math_random(25, 50) }, weight = 1, evolution_min = 0.2, evolution_max = 0.6 },
{ { name = 'lubricant-barrel', count = math_random(4, 10) }, weight = 1, evolution_min = 0.3, evolution_max = 0.5 },
{ { name = 'rocket-fuel', count = math_random(4, 10) }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 },
{ { name = 'steel-plate', count = math_random(50, 100) }, weight = 2, evolution_min = 0.1, evolution_max = 0.3 },
{ { name = 'nuclear-fuel', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 },
{ { name = 'burner-inserter', count = math_random(16, 32) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 },
{ { name = 'inserter', count = math_random(16, 32) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 },
{ { name = 'long-handed-inserter', count = math_random(16, 32) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 },
{ { name = 'fast-inserter', count = math_random(16, 32) }, weight = 3, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 1, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'stack-inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'small-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'medium-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.2, evolution_max = 1 },
{ { name = 'big-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'substation', count = math_random(4, 8) }, weight = 3, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'wooden-chest', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 },
{ { name = 'iron-chest', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 0.4 },
{ { name = 'steel-chest', count = math_random(8, 16) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'small-lamp', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 },
{ { name = 'rail', count = math_random(50, 100) }, weight = 3, evolution_min = 0.1, evolution_max = 0.6 },
{ { name = 'assembling-machine-1', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'assembling-machine-2', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.8 },
{ { name = 'assembling-machine-3', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'accumulator', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 1 },
{ { name = 'offshore-pump', count = math_random(2, 4) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 },
{ { name = 'beacon', count = math_random(2, 4) }, weight = 3, evolution_min = 0.7, evolution_max = 1 },
{ { name = 'boiler', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'steam-engine', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.5 },
{ { name = 'steam-turbine', count = math_random(2, 4) }, weight = 2, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'nuclear-reactor', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'centrifuge', count = math_random(1, 2) }, weight = 2, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'heat-pipe', count = math_random(8, 16) }, weight = 2, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'heat-exchanger', count = math_random(4, 8) }, weight = 2, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'arithmetic-combinator', count = math_random(25, 50) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'constant-combinator', count = math_random(25, 50) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'decider-combinator', count = math_random(25, 50) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'power-switch', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'programmable-speaker', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'green-wire', count = math_random(100, 200) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'red-wire', count = math_random(100, 200) }, weight = 1, evolution_min = 0.1, evolution_max = 1 },
{ { name = 'chemical-plant', count = math_random(2, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'burner-mining-drill', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 },
{ { name = 'electric-mining-drill', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.6 },
{ { name = 'express-transport-belt', count = math_random(50, 100) }, weight = 3, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'express-underground-belt', count = math_random(4, 16) }, weight = 3, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'express-splitter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'fast-transport-belt', count = math_random(50, 100) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'fast-underground-belt', count = math_random(4, 16) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'fast-splitter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.2, evolution_max = 0.3 },
{ { name = 'transport-belt', count = math_random(50, 100) }, weight = 3, evolution_min = 0, evolution_max = 0.3 },
{ { name = 'underground-belt', count = math_random(4, 16) }, weight = 3, evolution_min = 0, evolution_max = 0.3 },
{ { name = 'splitter', count = math_random(8, 16) }, weight = 3, evolution_min = 0, evolution_max = 0.3 },
{ { name = 'oil-refinery', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 1 },
{ { name = 'pipe', count = math_random(40, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 },
{ { name = 'pipe-to-ground', count = math_random(25, 50) }, weight = 1, evolution_min = 0.2, evolution_max = 0.5 },
{ { name = 'pumpjack', count = math_random(2, 4) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'pump', count = math_random(2, 4) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 },
{ { name = 'solar-panel', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 0.9 },
{ { name = 'electric-furnace', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'steel-furnace', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'stone-furnace', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 },
{ { name = 'radar', count = math_random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 0.3 },
{ { name = 'rail-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 },
{ { name = 'rail-chain-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 },
{ { name = 'stone-wall', count = math_random(50, 100) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 },
{ { name = 'gate', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 },
{ { name = 'storage-tank', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 },
{ { name = 'train-stop', count = math_random(2, 4) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'express-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.5, evolution_max = 1 },
{ { name = 'fast-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 },
{ { name = 'loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.0, evolution_max = 0.5 },
{ { name = 'lab', count = math_random(2, 4) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }
}
local level = storage.spiral_troopers_level / 40
@ -239,7 +239,7 @@ local function level_finished()
game.forces.player.chart(surface, { { x = -1 * radius, y = -1 * radius }, { x = radius, y = radius } })
end
local rock_raffle = { 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local ore_rotation = { 'iron-ore', 'copper-ore', 'coal', 'stone' }
local function get_furthest_chunk()

View File

@ -73,7 +73,7 @@ local biters_in_the_trees = {
[20] = { 'behemoth-biter', 'behemoth-biter', 'behemoth-biter', 'behemoth-biter', 'behemoth-spitter', 'behemoth-spitter' }
}
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local function secret_shop(pos, surface)
local secret_market_items = {
@ -610,9 +610,9 @@ end
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true,
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true,
['tree-02'] = true,
['tree-04'] = true,
['dead-tree-desert'] = true

View File

@ -24,9 +24,9 @@ local math_random = math.random
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true,
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true,
['mineable-wreckage'] = true
}
@ -39,7 +39,7 @@ map_functions = require 'utils.tools.map_functions'
grid_size = 24
--manual_mining_speed_modifier = 1
main_ground_tile = 'dirt-3'
rock_raffle = { 'rock-huge', 'rock-big', 'rock-big', 'rock-big' }
rock_raffle = { 'huge-rock', 'big-rock', 'big-rock', 'big-rock' }
tree_raffle = {
'tree-01',
'tree-02',

View File

@ -28,9 +28,9 @@ local spawn_point = { x = 0, y = 2 }
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true
}
local worm_raffle_table = {
[1] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret' },
@ -44,7 +44,7 @@ local worm_raffle_table = {
[9] = { 'medium-worm-turret', 'medium-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret' },
[10] = { 'medium-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret' }
}
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local nest_raffle = { 'biter-spawner', 'biter-spawner', 'biter-spawner', 'spitter-spawner' }
local function shuffle(tbl)

View File

@ -395,7 +395,7 @@ local function get_arena_entity(surface, pos)
local noise2 = get_noise('rocks_2', pos)
if noise > -0.1 and noise < 0.1 and noise2 > -0.3 and noise2 < 0.3 then
return { name = 'rock-big', position = pos }
return { name = 'big-rock', position = pos }
end
if random(1, 16) == 1 and noise2 > 0.78 then

View File

@ -103,19 +103,19 @@ local ore_spawn_raffle = {
'crude-oil'
}
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local rock_raffle_valid = {
['sand-rock-big'] = true,
['sand-rock-big'] = true,
['rock-big'] = true,
['rock-big'] = true,
['rock-big'] = true,
['rock-big'] = true,
['rock-big'] = true,
['rock-big'] = true,
['rock-big'] = true,
['rock-big'] = true,
['rock-huge'] = true
['big-sand-rock'] = true,
['big-sand-rock'] = true,
['big-rock'] = true,
['big-rock'] = true,
['big-rock'] = true,
['big-rock'] = true,
['big-rock'] = true,
['big-rock'] = true,
['big-rock'] = true,
['big-rock'] = true,
['huge-rock'] = true
}
local tree_raffle = {
'tree-02-red',
@ -133,45 +133,45 @@ local tree_raffle = {
local function secret_shop(pos, surface)
local secret_market_items = {
{ price = { { 'coin', math_random(75, 125) } }, offer = { type = 'give-item', item = 'combat-shotgun' } },
{ price = { { 'coin', math_random(40, 60) } }, offer = { type = 'give-item', item = 'rocket-launcher' } },
{ price = { { 'coin', math_random(1, 2) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } },
{ price = { { 'coin', math_random(3, 6) } }, offer = { type = 'give-item', item = 'uranium-rounds-magazine' } },
{ price = { { 'coin', math_random(1, 4) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } },
{ price = { { 'coin', math_random(1, 2) } }, offer = { type = 'give-item', item = 'rocket' } },
{ price = { { 'coin', math_random(2, 3) } }, offer = { type = 'give-item', item = 'explosive-rocket' } },
{ price = { { 'coin', math_random(1, 2) } }, offer = { type = 'give-item', item = 'explosive-cannon-shell' } },
{ price = { { 'coin', math_random(3, 6) } }, offer = { type = 'give-item', item = 'explosive-uranium-cannon-shell' } },
{ price = { { 'coin', math_random(4, 8) } }, offer = { type = 'give-item', item = 'cluster-grenade' } },
{ price = { { 'coin', math_random(1, 2) } }, offer = { type = 'give-item', item = 'land-mine' } },
{ price = { { 'coin', math_random(25, 50) } }, offer = { type = 'give-item', item = 'heavy-armor' } },
{ price = { { 'coin', math_random(75, 125) } }, offer = { type = 'give-item', item = 'combat-shotgun' } },
{ price = { { 'coin', math_random(40, 60) } }, offer = { type = 'give-item', item = 'rocket-launcher' } },
{ price = { { 'coin', math_random(1, 2) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } },
{ price = { { 'coin', math_random(3, 6) } }, offer = { type = 'give-item', item = 'uranium-rounds-magazine' } },
{ price = { { 'coin', math_random(1, 4) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } },
{ price = { { 'coin', math_random(1, 2) } }, offer = { type = 'give-item', item = 'rocket' } },
{ price = { { 'coin', math_random(2, 3) } }, offer = { type = 'give-item', item = 'explosive-rocket' } },
{ price = { { 'coin', math_random(1, 2) } }, offer = { type = 'give-item', item = 'explosive-cannon-shell' } },
{ price = { { 'coin', math_random(3, 6) } }, offer = { type = 'give-item', item = 'explosive-uranium-cannon-shell' } },
{ price = { { 'coin', math_random(4, 8) } }, offer = { type = 'give-item', item = 'cluster-grenade' } },
{ price = { { 'coin', math_random(1, 2) } }, offer = { type = 'give-item', item = 'land-mine' } },
{ price = { { 'coin', math_random(25, 50) } }, offer = { type = 'give-item', item = 'heavy-armor' } },
{ price = { { 'coin', math_random(125, 250) } }, offer = { type = 'give-item', item = 'modular-armor' } },
{ price = { { 'coin', math_random(300, 600) } }, offer = { type = 'give-item', item = 'power-armor' } },
{ price = { { 'coin', math_random(300, 600) } }, offer = { type = 'give-item', item = 'fusion-reactor-equipment' } },
{ price = { { 'coin', math_random(20, 40) } }, offer = { type = 'give-item', item = 'battery-equipment' } },
{ price = { { 'coin', math_random(20, 40) } }, offer = { type = 'give-item', item = 'battery-equipment' } },
{ price = { { 'coin', math_random(100, 150) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } },
{ price = { { 'coin', math_random(40, 80) } }, offer = { type = 'give-item', item = 'night-vision-equipment' } },
{ price = { { 'coin', math_random(60, 120) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } },
{ price = { { 'coin', math_random(60, 120) } }, offer = { type = 'give-item', item = 'personal-roboport-equipment' } },
{ price = { { 'coin', math_random(3, 9) } }, offer = { type = 'give-item', item = 'construction-robot' } },
{ price = { { 'coin', math_random(40, 80) } }, offer = { type = 'give-item', item = 'night-vision-equipment' } },
{ price = { { 'coin', math_random(60, 120) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } },
{ price = { { 'coin', math_random(60, 120) } }, offer = { type = 'give-item', item = 'personal-roboport-equipment' } },
{ price = { { 'coin', math_random(3, 9) } }, offer = { type = 'give-item', item = 'construction-robot' } },
{ price = { { 'coin', math_random(100, 200) } }, offer = { type = 'give-item', item = 'energy-shield-equipment' } },
{ price = { { 'coin', math_random(200, 400) } }, offer = { type = 'give-item', item = 'personal-laser-defense-equipment' } },
{ price = { { 'coin', math_random(30, 60) } }, offer = { type = 'give-item', item = 'loader' } },
{ price = { { 'coin', math_random(50, 80) } }, offer = { type = 'give-item', item = 'fast-loader' } },
{ price = { { 'coin', math_random(70, 100) } }, offer = { type = 'give-item', item = 'express-loader' } },
{ price = { { 'coin', math_random(30, 60) } }, offer = { type = 'give-item', item = 'locomotive' } },
{ price = { { 'coin', math_random(15, 35) } }, offer = { type = 'give-item', item = 'cargo-wagon' } },
{ price = { { 'coin', math_random(1, 4) } }, offer = { type = 'give-item', item = 'grenade' } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'rail', count = 4 } },
{ price = { { 'coin', 5 } }, offer = { type = 'give-item', item = 'train-stop' } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'small-lamp' } },
{ price = { { 'coin', 2 } }, offer = { type = 'give-item', item = 'firearm-magazine' } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'wood', count = math_random(25, 75) } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'iron-ore', count = math_random(25, 75) } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'copper-ore', count = math_random(25, 75) } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'stone', count = math_random(25, 75) } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'coal', count = math_random(25, 75) } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'uranium-ore', count = math_random(25, 75) } }
{ price = { { 'coin', math_random(30, 60) } }, offer = { type = 'give-item', item = 'loader' } },
{ price = { { 'coin', math_random(50, 80) } }, offer = { type = 'give-item', item = 'fast-loader' } },
{ price = { { 'coin', math_random(70, 100) } }, offer = { type = 'give-item', item = 'express-loader' } },
{ price = { { 'coin', math_random(30, 60) } }, offer = { type = 'give-item', item = 'locomotive' } },
{ price = { { 'coin', math_random(15, 35) } }, offer = { type = 'give-item', item = 'cargo-wagon' } },
{ price = { { 'coin', math_random(1, 4) } }, offer = { type = 'give-item', item = 'grenade' } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'rail', count = 4 } },
{ price = { { 'coin', 5 } }, offer = { type = 'give-item', item = 'train-stop' } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'small-lamp' } },
{ price = { { 'coin', 2 } }, offer = { type = 'give-item', item = 'firearm-magazine' } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'wood', count = math_random(25, 75) } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'iron-ore', count = math_random(25, 75) } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'copper-ore', count = math_random(25, 75) } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'stone', count = math_random(25, 75) } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'coal', count = math_random(25, 75) } },
{ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'uranium-ore', count = math_random(25, 75) } }
}
secret_market_items = shuffle(secret_market_items)
local market = surface.create_entity { name = 'market', position = pos }
@ -616,9 +616,9 @@ end
local disabled_for_deconstruction = {
['fish'] = true,
['rock-huge'] = true,
['rock-big'] = true,
['sand-rock-big'] = true,
['huge-rock'] = true,
['big-rock'] = true,
['big-sand-rock'] = true,
['tree-02'] = true,
['tree-04'] = true,
['dead-tree-desert'] = true,

View File

@ -143,9 +143,9 @@ local function place_entities(surface, position, noise_position, seed)
local random_noise = get_noise('random_things', noise_position, seed)
if random_noise > 0.5 then
if random_noise > 0.75 then
surface.create_entity({ name = 'rock-big', position = position })
surface.create_entity({ name = 'big-rock', position = position })
else
surface.create_entity({ name = 'rock-huge', position = position })
surface.create_entity({ name = 'huge-rock', position = position })
end
end
return

View File

@ -14,15 +14,15 @@ local ceil = math.ceil
local floor = math.floor
local rock_raffle = {
'sand-rock-big',
'sand-rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-big',
'rock-huge'
'big-sand-rock',
'big-sand-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'big-rock',
'huge-rock'
}
local draw_path_tile_whitelist = {

View File

@ -3,9 +3,9 @@
local Event = require 'utils.event'
local valid_entities = {
['rock-big'] = true,
['rock-huge'] = true,
['sand-rock-big'] = true
['big-rock'] = true,
['huge-rock'] = true,
['big-sand-rock'] = true
}
local function mining_speed_cooldown(p)

View File

@ -2,9 +2,9 @@
local Event = require 'utils.event'
local valid_entities = {
['rock-big'] = true,
['rock-huge'] = true,
['sand-rock-big'] = true
['big-rock'] = true,
['huge-rock'] = true,
['big-sand-rock'] = true
}
local replacement_tiles = {

View File

@ -2,9 +2,9 @@
local Event = require 'utils.event'
local entity_whitelist = {
['rock-big'] = true,
['sand-rock-big'] = true,
['rock-huge'] = true,
['big-rock'] = true,
['big-sand-rock'] = true,
['huge-rock'] = true,
['mineable-wreckage'] = true
}

View File

@ -1,16 +1,16 @@
local Event = require 'utils.event'
local coin_yield = {
['rock-big'] = 3,
['rock-huge'] = 6,
['sand-rock-big'] = 3
['big-rock'] = 3,
['huge-rock'] = 6,
['big-sand-rock'] = 3
}
local function on_player_mined_entity(event)
if coin_yield[event.entity.name] then
event.entity.surface.spill_item_stack(
event.entity.position,
{name = 'coin', count = math.random(math.ceil(coin_yield[event.entity.name] * 0.5), math.ceil(coin_yield[event.entity.name] * 2))},
{ name = 'coin', count = math.random(math.ceil(coin_yield[event.entity.name] * 0.5), math.ceil(coin_yield[event.entity.name] * 2)) },
true
)
end

View File

@ -5,9 +5,9 @@ local math_floor = math.floor
local math_sqrt = math.sqrt
local rock_yield = {
['rock-big'] = 1,
['rock-huge'] = 2,
['sand-rock-big'] = 1
['big-rock'] = 1,
['huge-rock'] = 2,
['big-sand-rock'] = 1
}
local particles = {

View File

@ -1,9 +1,9 @@
local math_random = math.random
local valid_entities = {
['rock-big'] = true,
['rock-huge'] = true,
['sand-rock-big'] = true,
['big-rock'] = true,
['huge-rock'] = true,
['big-sand-rock'] = true,
['mineable-wreckage'] = true
}

File diff suppressed because it is too large Load Diff

View File

@ -399,7 +399,7 @@ function Public.draw_random_room(surface, position, shape)
for _, tile in pairs(room.room_border_tiles) do
surface.set_tiles({ { name = 'dirt-7', position = tile.position } }, true)
if math_random(1, 2) == 1 then
surface.create_entity({ name = 'rock-big', position = tile.position })
surface.create_entity({ name = 'big-rock', position = tile.position })
end
end

View File

@ -27,7 +27,7 @@ local math_random = math.random
local math_floor = math.floor
local math_abs = math.abs
local rock_raffle = { 'sand-rock-big', 'sand-rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-big', 'rock-huge' }
local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' }
local size_of_rock_raffle = #rock_raffle
local function place_entity(surface, position)