1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-05 13:15:03 +02:00

lost_desert map

This commit is contained in:
MewMew 2018-09-23 07:40:37 +02:00
parent e8119fc741
commit 02b6c5b9fb
7 changed files with 416 additions and 119 deletions

View File

@ -43,6 +43,23 @@ local function on_console_command(event)
end
end
local function on_player_built_tile(event)
local placed_tiles = event.tiles
local player = game.players[event.player_index]
--landfill history to find griefers--
if placed_tiles[1].old_tile.name == "deepwater" or placed_tiles[1].old_tile.name == "water" or placed_tiles[1].old_tile.name == "water-green" then
if not global.landfill_history then global.landfill_history = {} end
if #global.landfill_history > 999 then global.landfill_history = {} end
local str = player.name .. " placed landfill at X:"
str = str .. placed_tiles[1].position.x
str = str .. " Y:"
str = str .. placed_tiles[1].position.y
table.insert(global.landfill_history, str)
end
end
event.add(defines.events.on_player_built_tile, on_player_built_tile)
event.add(defines.events.on_console_command, on_console_command)
event.add(defines.events.on_player_ammo_inventory_changed, on_player_ammo_inventory_changed)
event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction)

View File

@ -11,7 +11,7 @@ require "score"
--require "maps.biter_battles"
--require "maps.cave_miner"
require "maps.deep_jungle"
--require "maps.deep_jungle"
--require "maps.lost_desert"
-----------------------------

View File

@ -1046,7 +1046,7 @@ local function pre_player_mined_item(event)
player.print("You notice something " .. ore_prints[mined_loot][1] .. " underneath the rubble covered floor. It´s a " .. size[1] .. " vein of " .. ore_prints[mined_loot][2] .. "!!", { r=0.98, g=0.66, b=0.22})
tile_distance_to_center = math.sqrt(tile_distance_to_center)
local ore_entities_placed = 0
local modifier_raffle = {{0,-1},{-1,0},{0,-1},{0,1}}
local modifier_raffle = {{0,-1},{-1,0},{1,0},{0,1}}
while ore_entities_placed < math.random(size[2],size[3]) do
local a = math.ceil((math.random(tile_distance_to_center*4, tile_distance_to_center*5)) / 1 + ore_entities_placed * 0.5, 0)
for x = 1, 150, 1 do

View File

@ -19,7 +19,8 @@ local function treasure_chest(position)
table.insert(treasure_chest_loot_weights, {{name = 'stack-filter-inserter', count = math.random(2,4)},1})
table.insert(treasure_chest_loot_weights, {{name = 'stack-inserter', count = math.random(2,4)},1})
table.insert(treasure_chest_loot_weights, {{name = 'burner-inserter', count = math.random(16,32)},6})
table.insert(treasure_chest_loot_weights, {{name = 'electric-engine-unit', count = math.random(1,16)},3})
table.insert(treasure_chest_loot_weights, {{name = 'electric-engine-unit', count = math.random(1,16)},3})
table.insert(treasure_chest_loot_weights, {{name = 'engine-unit', count = math.random(1,16)},3})
table.insert(treasure_chest_loot_weights, {{name = 'rocket-fuel', count = math.random(1,5)},3})
table.insert(treasure_chest_loot_weights, {{name = 'empty-barrel', count = math.random(1,10)},7})
table.insert(treasure_chest_loot_weights, {{name = 'lubricant-barrel', count = math.random(1,10)},3})

View File

@ -1,165 +1,350 @@
--endless desert-- mewmew made this --
--deep jungle-- mewmew made this --
local chunk_loader = require "maps.tools.lazy_chunk_loader"
local simplex_noise = require 'utils.simplex_noise'
simplex_noise = simplex_noise.d2
local event = require 'utils.event'
require "maps.tools.lazy_chunk_loader"
local function shipwreck(position, surface)
local wrecks = {"big-ship-wreck-1", "big-ship-wreck-2", "big-ship-wreck-3"}
local wreck = wrecks[math.random(1,#wrecks)]
local p = game.surfaces[1].find_non_colliding_position(wreck,position, 2,0.5)
if not p then return end
local wreck_raffle_table = {}
local wreck_loot_weights = {}
table.insert(wreck_loot_weights, {{name = 'iron-gear-wheel', count = math.random(16,48)},5})
table.insert(wreck_loot_weights, {{name = 'burner-inserter', count = math.random(16,32)},2})
table.insert(wreck_loot_weights, {{name = 'engine-unit', count = math.random(1,16)},3})
table.insert(wreck_loot_weights, {{name = 'rocket-fuel', count = math.random(1,5)},3})
table.insert(wreck_loot_weights, {{name = 'lubricant-barrel', count = math.random(1,10)},3})
table.insert(wreck_loot_weights, {{name = 'crude-oil-barrel', count = math.random(1,10)},3})
table.insert(wreck_loot_weights, {{name = "firearm-magazine", count = math.random(64,128)},8})
table.insert(wreck_loot_weights, {{name = 'grenade', count = math.random(16,32)},5})
table.insert(wreck_loot_weights, {{name = 'land-mine', count = math.random(16,32)},5})
table.insert(wreck_loot_weights, {{name = 'light-armor', count = 1},1})
table.insert(wreck_loot_weights, {{name = 'heavy-armor', count = 1},2})
table.insert(wreck_loot_weights, {{name = 'pipe', count = math.random(10,100)},3})
table.insert(wreck_loot_weights, {{name = 'rail', count = math.random(32,100)},4})
table.insert(wreck_loot_weights, {{name = 'assembling-machine-1', count = math.random(1,4)},2})
table.insert(wreck_loot_weights, {{name = 'assembling-machine-2', count = math.random(1,3)},2})
table.insert(wreck_loot_weights, {{name = 'assembling-machine-3', count = math.random(1,2)},1})
table.insert(wreck_loot_weights, {{name = 'combat-shotgun', count = 1},4})
table.insert(wreck_loot_weights, {{name = 'piercing-shotgun-shell', count = math.random(16,48)},5})
table.insert(wreck_loot_weights, {{name = 'flamethrower', count = 1},4})
table.insert(wreck_loot_weights, {{name = 'rocket-launcher', count = 1},4})
table.insert(wreck_loot_weights, {{name = 'flamethrower-ammo', count = math.random(16,48)},5})
table.insert(wreck_loot_weights, {{name = 'rocket', count = math.random(16,48)},5})
table.insert(wreck_loot_weights, {{name = 'explosive-rocket', count = math.random(16,48)},5})
table.insert(wreck_loot_weights, {{name = 'modular-armor', count = 1},3})
table.insert(wreck_loot_weights, {{name = 'power-armor', count = 1},1})
table.insert(wreck_loot_weights, {{name = 'uranium-rounds-magazine', count = math.random(16,32)},3})
table.insert(wreck_loot_weights, {{name = 'piercing-rounds-magazine', count = math.random(64,128)},5})
table.insert(wreck_loot_weights, {{name = 'railgun', count = 1},3})
table.insert(wreck_loot_weights, {{name = 'railgun-dart', count = math.random(16,48)},4})
table.insert(wreck_loot_weights, {{name = 'exoskeleton-equipment', count = 1},1})
table.insert(wreck_loot_weights, {{name = 'defender-capsule', count = math.random(8,16)},5})
table.insert(wreck_loot_weights, {{name = 'distractor-capsule', count = math.random(4,8)},4})
table.insert(wreck_loot_weights, {{name = 'destroyer-capsule', count = math.random(4,8)},3})
table.insert(wreck_loot_weights, {{name = 'atomic-bomb', count = 1},1})
for _, t in pairs (wreck_loot_weights) do
for x = 1, t[2], 1 do
table.insert(wreck_raffle_table, t[1])
end
end
local e = surface.create_entity {name=wreck, position=p, force="player"}
e.minable = false
local i = e.get_inventory(defines.inventory.chest)
for x = 1, math.random(2,3), 1 do
local loot = wreck_raffle_table[math.random(1,#wreck_raffle_table)]
i.insert(loot)
end
end
local function shuffle(tbl)
local size = #tbl
for i = size, 1, -1 do
local rand = math.random(size)
tbl[i], tbl[rand] = tbl[rand], tbl[i]
end
return tbl
end
local function create_cluster(name, pos, size, surface, spread, resource_amount)
local p = {x = pos.x, y = pos.y}
local math_random = math.random
for z = 1, size, 1 do
for x = 1, 8, 1 do
local y = 1
if spread then y = math_random(1, spread) end
local modifier_raffle = {{0,y*-1},{y*-1,0},{y,0},{0,y},{y*-1,y*-1},{y,y},{y,y*-1},{y*-1,y}}
modifier_raffle = shuffle(modifier_raffle)
local m = modifier_raffle[x]
local pos = {x = p.x + m[1], y = p.y + m[2]}
if resource_amount then
surface.create_entity {name=name, position=pos, amount=resource_amount}
p = {x = pos.x, y = pos.y}
break
else
if surface.can_place_entity({name=name, position=pos}) then
surface.create_entity {name=name, position=pos}
p = {x = pos.x, y = pos.y}
break
end
end
end
end
end
local function get_noise(name, pos)
local seed = game.surfaces[1].map_gen_settings.seed
local noise = {}
local noise_seed_add = 25000
seed = seed + noise_seed_add
if name == 1 then
local noise = {}
noise[1] = simplex_noise.d2(pos.x * 0.001, pos.y * 0.001, seed)
if name == 1 then
noise[1] = simplex_noise(pos.x * 0.001, pos.y * 0.001, seed)
seed = seed + noise_seed_add
noise[2] = simplex_noise.d2(pos.x * 0.01, pos.y * 0.01, seed)
local noise = noise[1] + noise[2] * 0.1
noise[2] = simplex_noise(pos.x * 0.01, pos.y * 0.01, seed)
seed = seed + noise_seed_add
noise[3] = simplex_noise(pos.x * 0.05, pos.y * 0.05, seed)
seed = seed + noise_seed_add
noise[4] = simplex_noise(pos.x * 0.1, pos.y * 0.1, seed)
local noise = noise[1] + noise[2] * 0.15 + noise[3] * 0.02 + noise[4] * 0.001
return noise
end
seed = seed + noise_seed_add
seed = seed + noise_seed_add
if name == 2 then
local noise = {}
noise[1] = simplex_noise.d2(pos.x * 0.01, pos.y * 0.01, seed)
seed = seed + noise_seed_add
seed = seed + noise_seed_add
if name == "rocks_1" then
noise[1] = simplex_noise(pos.x * 0.005, pos.y * 0.005, seed)
seed = seed + noise_seed_add
noise[2] = simplex_noise.d2(pos.x * 0.1, pos.y * 0.1, seed)
local noise = noise[1] + noise[2] * 0.1
noise[2] = simplex_noise(pos.x * 0.01, pos.y * 0.01, seed)
seed = seed + noise_seed_add
noise[3] = simplex_noise(pos.x * 0.1, pos.y * 0.1, seed)
local noise = noise[1] + noise[2] * 0.005 + noise[3] * 0.0002
return noise
end
seed = seed + noise_seed_add
seed = seed + noise_seed_add
if name == 3 then
local noise = {}
noise[1] = simplex_noise.d2(pos.x * 0.001, pos.y * 0.001, seed)
seed = seed + noise_seed_add
noise[2] = simplex_noise.d2(pos.x * 0.01, pos.y * 0.01, seed)
local noise = noise[1] + noise[2] * 0.1
seed = seed + noise_seed_add
if name == "deco_1" then
noise[1] = simplex_noise(pos.x * 0.01, pos.y * 0.01, seed)
local noise = noise[1]
return noise
end
seed = seed + noise_seed_add
seed = seed + noise_seed_add
if name == 4 then
local noise = {}
noise[1] = simplex_noise.d2(pos.x * 0.01, pos.y * 0.01, seed)
seed = seed + noise_seed_add
noise[2] = simplex_noise.d2(pos.x * 0.1, pos.y * 0.1, seed)
local noise = noise[1] + noise[2] * 0.2
if name == "deco_2" then
noise[1] = simplex_noise(pos.x * 0.01, pos.y * 0.01, seed)
local noise = noise[1]
return noise
end
seed = seed + noise_seed_add
if name == "dead_trees" then
noise[1] = simplex_noise(pos.x * 0.005, pos.y * 0.005, seed)
local noise = noise[1]
return noise
end
seed = seed + noise_seed_add
end
table.insert(global.generate_chunk_tiles_functions, function(chunk_piece)
local area = chunk_piece.area
local surface = game.surfaces["endless_desert"]
if chunk_piece.surface ~= surface then return end
local tiles = {}
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 ore_spawn_raffle = {"iron-ore","iron-ore","iron-ore","copper-ore","copper-ore","copper-ore","coal","coal","stone","stone","uranium-ore","crude-oil"}
chunk_loader.add(function(chunk_piece)
local surface = game.surfaces["lost_desert"]
if chunk_piece[2] ~= surface.index then return end
local chunk_piece_position = chunk_piece[1]
local chunk_pos_x = chunk_piece_position.x
local chunk_pos_y = chunk_piece_position.y
local area = {
left_top = {x = chunk_piece_position.x, y = chunk_piece_position.y},
right_bottom = {x = chunk_piece_position.x + 8, y = chunk_piece_position.y + 8}
}
local tiles = {}
local entities_to_place = {
rocks = {},
worms = {},
enemy_buildings = {},
trees = {},
fish = {},
shipwrecks = {}
}
local decoratives = {}
local math_random = math.random
local entities = surface.find_entities(area)
for _, e in pairs(entities) do
if e.type == "tree" or e.force.name == "enemy" then
e.destroy()
--e.destroy()
end
end
end
local sands = {"sand-1", "sand-2", "sand-3"}
local tile_to_insert = false
for y = 0, 7, 1 do
for x = 0, 7, 1 do
local pos_x = area.left_top.x + x
local pos_y = area.left_top.y + y
for x = 0, 7, 1 do
for y = 0, 7, 1 do
local pos_x = chunk_pos_x + x
local pos_y = chunk_pos_y + y
local pos = {x = pos_x, y = pos_y}
tile_distance_to_center = pos_x^2 + pos_y^2
tile_to_insert = false
--local noise_3 = get_noise(3, pos)
local noise_1 = get_noise(1, pos)
if noise_1 > 0.3 then
tile_to_insert = "sand-1"
local tile_distance_to_center = pos_x^2 + pos_y^2
tile_to_insert = false
local noise_1 = get_noise(1, pos)
if tile_distance_to_center > 10000 then
if noise_1 <= -0.9 then
if math_random(1,250) == 1 then table.insert(entities_to_place.shipwrecks, pos) end
end
if noise_1 <= -0.85 then
if math_random(1,16) == 1 then table.insert(entities_to_place.worms, pos) end
if math_random(1,16) == 1 then table.insert(entities_to_place.enemy_buildings, pos) end
end
end
if noise_1 < -0.3 then
tile_to_insert = "sand-2"
if noise_1 <= -0.4 then tile_to_insert = "sand-2" end
if noise_1 > -0.4 then tile_to_insert = "sand-1" end
if noise_1 > 0.4 then tile_to_insert = "sand-3" end
if noise_1 > 0.72 and noise_1 < 0.8 then if math_random(1,3) == 1 then table.insert(decoratives, {name = "garballo", position = pos, amount = math_random(1,3)}) end end
if noise_1 > 0.75 then if math_random(1,5) == 1 then table.insert(entities_to_place.trees, {"tree-05", pos}) end end
if noise_1 > 0.8 then
tile_to_insert = "water"
if math_random(1,32) == 1 then table.insert(entities_to_place.fish, pos) end
end
if noise_1 > 0.9 then tile_to_insert = "deepwater" end
if tile_to_insert ~= "deepwater" and tile_to_insert ~= "water" and noise_1 < 0.7 then
if math_random(1,10000) == 1 and noise_1 < 0.65 then
local spread = 1
local amount = math_random(math.ceil(math.sqrt(tile_distance_to_center),0),math.ceil(math.sqrt(tile_distance_to_center)*2,0))
local size = math.ceil(math.sqrt(tile_distance_to_center),0)
local ore = ore_spawn_raffle[math_random(1,#ore_spawn_raffle)]
if ore == "crude-oil" then
spread = 10
amount = 100000 + math_random(tile_distance_to_center,tile_distance_to_center*2)
size = math_random(4,16)
end
create_cluster(ore, pos, size, surface, spread, amount)
end
local noise_dead_trees = get_noise("dead_trees", pos)
local noise_rocks_1 = get_noise("rocks_1", pos)
local noise_deco_1 = get_noise("deco_1", pos)
local noise_deco_2 = get_noise("deco_2", pos)
while true do
if noise_dead_trees > 0.5 then
if math_random(1,55) == 1 then table.insert(entities_to_place.trees, {"tree-06", pos}) end
break
end
if noise_rocks_1 > 0.5 and noise_dead_trees < -0.4 then
if noise_rocks_1 > 0.55 then
if math_random(1,6) == 1 then table.insert(entities_to_place.rocks, pos) end
end
tile_to_insert = "dirt-1"
end
if noise_deco_1 > 0.75 then
if math_random(1,7) == 1 then table.insert(decoratives, {name = "brown-fluff-dry", position = pos, amount = math_random(1,3)}) end
break
end
if noise_deco_1 < -0.75 then
if math_random(1,7) == 1 then table.insert(decoratives, {name = "red-desert-bush", position = pos, amount = math_random(1,3)}) end
break
end
if noise_deco_2 > 0.75 then
if math_random(1,7) == 1 then table.insert(decoratives, {name = "white-desert-bush", position = pos, amount = math_random(1,3)}) end
break
end
if noise_deco_2 < -0.75 then
if math_random(1,7) == 1 then table.insert(decoratives, {name = "brown-asterisk", position = pos, amount = math_random(1,3)}) end
break
end
if tile_to_insert == "sand-1" then
if math_random(1,50) == 1 then table.insert(decoratives, {name = "sand-dune-decal", position = pos, amount = 1}) end
end
break
end
end
if tile_to_insert == false then
table.insert(tiles, {name = "sand-3", position = {pos_x,pos_y}})
--table.insert(tiles, {name = "sand-4", position = {pos_x,pos_y}}) tree-06
else
table.insert(tiles, {name = tile_to_insert, position = {pos_x,pos_y}})
end
end
end
end
surface.set_tiles(tiles,true)
end
)
table.insert(global.generate_chunk_entities_functions, function(chunk_piece)
local area = chunk_piece.area
local surface = game.surfaces["endless_desert"]
if chunk_piece.surface ~= surface then return end
local enemy_building_positions = {}
local enemy_worm_positions = {}
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_positions = {}
local fish_positions = {}
local rare_treasure_chest_positions = {}
local treasure_chest_positions = {}
local secret_shop_locations = {}
local tree_positions = {}
end
surface.set_tiles(tiles,true)
surface.create_decoratives{check_collision=false, decoratives=decoratives}
for y = 0, 7, 1 do
for x = 0, 7, 1 do
local pos_x = area.left_top.x + x
local pos_y = area.left_top.y + y
local pos = {x = pos_x, y = pos_y}
tile_distance_to_center = pos_x^2 + pos_y^2
--if surface.can_place_entity({name="tree-03", position=pos}) then surface.create_entity {name="tree-03", position=pos} end
local noise_1 = get_noise(1, pos)
for _, p in pairs(entities_to_place.shipwrecks) do
shipwreck(p, surface)
end
for _, p in pairs(entities_to_place.enemy_buildings) do
if math_random(1,3) == 1 then
if surface.can_place_entity({name="spitter-spawner", position=p}) then surface.create_entity {name="spitter-spawner", position=p} end
else
if surface.can_place_entity({name="biter-spawner", position=p}) then surface.create_entity {name="biter-spawner", position=p} end
end
end
for _, p in pairs(entities_to_place.worms) do
local e = worm_raffle[math.random(1,#worm_raffle)]
if surface.can_place_entity({name=e, position=p}) then surface.create_entity {name=e, position=p} end
end
for _, p in pairs(entities_to_place.rocks) do
local e = rock_raffle[math.random(1,#rock_raffle)]
surface.create_entity {name=e, position=p}
end
for _, p in pairs(entities_to_place.trees) do
if surface.can_place_entity({name=p[1], position=p[2]}) then surface.create_entity {name=p[1], position=p[2]} end
end
for _, p in pairs(entities_to_place.fish) do
surface.create_entity {name="fish",position=p}
end
return true
end
)
local function on_player_joined_game(event)
local function on_player_joined_game(event)
local player = game.players[event.player_index]
if not global.map_init_done then
local map_gen_settings = {}
map_gen_settings.water = "none"
map_gen_settings.cliff_settings = {cliff_elevation_interval = 20, cliff_elevation_0 = 5}
map_gen_settings.cliff_settings = {cliff_elevation_interval = 20, cliff_elevation_0 = 20}
map_gen_settings.autoplace_controls = {
["coal"] = {frequency = "very-low", size = "normal", richness = "normal"},
["stone"] = {frequency = "very-low", size = "normal", richness = "normal"},
["copper-ore"] = {frequency = "very-low", size = "normal", richness = "normal"},
["iron-ore"] = {frequency = "very-low", size = "normal", richness = "normal"},
["crude-oil"] = {frequency = "very-low", size = "normal", richness = "good"},
["trees"] = {frequency = "normal", size = "normal", richness = "normal"},
["enemy-base"] = {frequency = "normal", size = "normal", richness = "good"}
}
game.create_surface("endless_desert", map_gen_settings)
game.forces["player"].set_spawn_position({0,0},game.surfaces["endless_desert"])
["crude-oil"] = {frequency = "very-low", size = "normal", richness = "normal"},
["trees"] = {frequency = "none", size = "none", richness = "none"},
["enemy-base"] = {frequency = "very-low", size = "small", richness = "none"},
["grass"] = {frequency = "none", size = "none", richness = "none"},
["sand"] = {frequency = "none", size = "none", richness = "none"},
["desert"] = {frequency = "none", size = "none", richness = "none"},
["dirt"] = {frequency = "none", size = "none", richness = "none"}
}
game.map_settings.pollution.pollution_restored_per_tree_damage = 0
game.create_surface("lost_desert", map_gen_settings)
game.forces["player"].set_spawn_position({0,0},game.surfaces["lost_desert"])
local surface = game.surfaces["lost_desert"]
create_cluster("stone", {x=-30,y=30}, 1500, surface, 1, math.random(400,600))
create_cluster("copper-ore", {x=30,y=30}, 1500, surface, 1, math.random(400,600))
create_cluster("coal", {x=30,y=-30}, 1500, surface, 1, math.random(400,600))
create_cluster("iron-ore", {x=-30,y=-30}, 1500, surface, 1, math.random(400,600))
create_cluster("crude-oil", {x=0,y=0}, 5, surface, 10, math.random(300000,400000))
global.map_init_done = true
end
local surface = game.surfaces["endless_desert"]
local surface = game.surfaces["lost_desert"]
if player.online_time < 5 and surface.is_chunk_generated({0,0}) then
player.teleport(surface.find_non_colliding_position("player", {0,0}, 2, 1), "endless_desert")
player.teleport(surface.find_non_colliding_position("player", {0,0}, 2, 1), "lost_desert")
else
if player.online_time < 5 then
player.teleport({0,0}, "endless_desert")
player.teleport({0,0}, "lost_desert")
end
end
if player.online_time < 10 then
player.insert {name = 'raw-fish', count = 1}
player.insert {name = 'iron-axe', count = 1}
end
end
local function on_marked_for_deconstruction(event)
if event.entity.name == "rock-huge" or event.entity.name == "rock-big" or event.entity.name == "sand-rock-big" or event.entity.name == "fish" or event.entity.type == "tree" then
event.entity.cancel_deconstruction(game.players[event.player_index].force.name)
end
if player.online_time < 10 then
player.insert {name = 'raw-fish', count = 3}
player.insert {name = 'light-armor', count = 1}
end
end
function cheat_mode()
local cheat_mode_enabed = true
if cheat_mode_enabed == true then
local surface = game.surfaces["endless_desert"]
local surface = game.surfaces["lost_desert"]
game.player.cheat_mode=true
game.players[1].insert({name="power-armor-mk2"})
game.players[1].insert({name="fusion-reactor-equipment", count=4})
@ -170,11 +355,11 @@ function cheat_mode()
surface.daytime = 1
game.player.force.research_all_technologies()
game.forces["enemy"].evolution_factor = 0.2
local chart = 400
local surface = game.surfaces["endless_desert"]
local chart = 300
local surface = game.surfaces["lost_desert"]
game.forces["player"].chart(surface, {lefttop = {x = chart*-1, y = chart*-1}, rightbottom = {x = chart, y = chart}})
end
end
event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction)
event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction)
event.add(defines.events.on_player_joined_game, on_player_joined_game)

View File

@ -11,7 +11,7 @@ local function on_chunk_generated(event)
if not global.chunk_pieces then global.chunk_pieces = {} end
if not global.chunk_pieces_entities then global.chunk_pieces_entities = {} end
if not global.chunk_pieces_load_amount then global.chunk_pieces_load_amount = 128 end
if not global.chunk_pieces_load_speed then global.chunk_pieces_load_speed = 3 end -- how many ticks until one operation happens
if not global.chunk_pieces_load_speed then global.chunk_pieces_load_speed = 2 end -- how many ticks until one operation happens
if game.tick > 300 then global.chunk_pieces_load_amount = 1 end -- how many pieces are processed per one operation
local index = event.surface.index
for pos_y = 0, 24, 8 do

View File

@ -1,15 +1,15 @@
local playsession = {
{"mewmew", {1143298}},
{"Drezik99", {116940}},
{"mewmew", {2000402}},
{"Drezik99", {179725}},
{"Akitae", {65389}},
{"ANV1L", {930379}},
{"ANV1L", {7683469}},
{"anonieme_beer", {367781}},
{"vvictor", {542340}},
{"vvictor", {590687}},
{"opasuke", {6222}},
{"cinzhal", {101026}},
{"Itai795", {362520}},
{"Itai795", {367054}},
{"Biobuur", {1294}},
{"Catbert", {51196}},
{"Catbert", {76417}},
{"Nicky_OCD", {1202}},
{"peterputze", {123083}},
{"ajicurry", {2702}},
@ -17,8 +17,8 @@ local playsession = {
{"Fobas", {19821}},
{"Serikai", {18416}},
{"SpwnX", {321116}},
{"swake", {183186}},
{"Xonic6", {3594}},
{"swake", {189409}},
{"Xonic6", {7949}},
{"niko8", {26720}},
{"Dominoscraft", {2993}},
{"pfg", {7781}},
@ -26,14 +26,108 @@ local playsession = {
{"esquerdo21", {7707}},
{"Skanderbeg", {1815}},
{"vimp", {8087}},
{"pickles28", {18277}},
{"pickles28", {97711}},
{"MrWill", {42884}},
{"Alordex", {126145}},
{"willzcn", {56986}},
{"willzcn", {158363}},
{"cocoilove", {22271}},
{"ChaosVanguard", {156788}},
{"soni", {175545}},
{"Kissthisangel", {144622}},
{"Leahcim", {27749}}
{"ChaosVanguard", {170042}},
{"soni", {425173}},
{"Kissthisangel", {714064}},
{"Leahcim", {27749}},
{"SMikiS", {2302666}},
{"redlabel", {346428}},
{"stingerboy", {3595}},
{"ronaldoklais", {9940}},
{"kagami3287", {51967}},
{"Terarink", {5789181}},
{"blesmrt", {11426}},
{"Wizard7187", {601970}},
{"GoSeDaN", {8883}},
{"LIL254A", {837070}},
{"NekoBaron", {456694}},
{"vedolv", {345855}},
{"Bronco", {23170}},
{"CrazyBot33", {2855}},
{"lpp5", {12446}},
{"Raijin-Kizuku", {3559280}},
{"legogo29", {793465}},
{"luziferius", {6992}},
{"coucounoir", {68222}},
{"Pokka", {8144}},
{"Redstar_1776", {4306}},
{"Quadrum", {70457}},
{"TheOrangeAngle", {4353}},
{"sabreman", {5181}},
{"VincentMonster", {69483}},
{"rlidwka", {35814}},
{"waxman", {6676}},
{"Yaxley", {1267473}},
{"TheMarek", {226090}},
{"agostini01", {8753}},
{"the-trashmaster", {169466}},
{"Colecolecola", {1894}},
{"Maxi25554", {7709}},
{"yuval_kuvaev", {15302}},
{"DaBookz", {3645}},
{"Strekozeel", {637096}},
{"Redwardas", {1002408}},
{"DrunkBlood", {122087}},
{"Headscrew", {30419}},
{"Eject-Master", {84468}},
{"DARKDELTA00", {85356}},
{"Maniah", {20441}},
{"TheNilonKiller", {47532}},
{"Drlloyd1337", {14832}},
{"GeneralB.97", {142063}},
{"aliani", {110416}},
{"SimonSickBoy", {5364}},
{"Filousky", {605010}},
{"sdsfa8", {17248}},
{"sean.mccallum", {934189}},
{"Idifix", {35434}},
{"lord_kill", {2466}},
{"Iownyoujk", {34727}},
{"aledeludx", {170524}},
{"sellarsarem", {37188}},
{"fce2", {2064004}},
{"Felix61391", {15144}},
{"cko6o4ku", {262514}},
{"thediscover22450", {291473}},
{"Macikop", {3091}},
{"Gerkiz", {126489}},
{"maverick85", {13553}},
{"KingKp", {16677}},
{"hyuneru", {397815}},
{"Nexarius", {6644}},
{"ScarpaK", {9557}},
{"DJStrikerLP", {6987}},
{"Drozee", {2182}},
{"lewitz", {110938}},
{"DanVega", {810066}},
{"wengPC", {3143}},
{"GoldKettle", {8852}},
{"devin23", {785601}},
{"DB22", {785517}},
{"yayale", {112028}},
{"Meme_Lord69", {73221}},
{"shlak", {26210}},
{"CustomSocks", {5897}},
{"Cherchell", {62956}},
{"rizzanifo", {44730}},
{"edenpoi", {10121}},
{"SeaGrizzly69", {16407}},
{"untamedx2", {5089}},
{"kingbo", {173819}},
{"DraugTheWhopper", {5684}},
{"My_Name_Is_Pin", {35586}},
{"Piggy60", {6457}},
{"tommpax", {11681}},
{"testudo", {18311}},
{"thefunnykinger", {1304}},
{"derzocker35", {6471}},
{"penguincc3", {725}},
{"mgbparrot", {12108}},
{"Rick556", {8036}}
}
return playsession