1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-04 00:15:45 +02:00

fixes and updates

This commit is contained in:
MewMew 2020-09-13 10:06:15 +02:00
parent f4c5ea7703
commit f0adbf7b02
6 changed files with 21 additions and 24 deletions

View File

@ -85,26 +85,27 @@ require 'modules.autostash'
--require 'maps.mountain_fortress_v3.main'
--require 'maps.mountain_fortress_v2.main'
--require 'maps.lumberjack.main'
--require 'maps.choppy'
--require 'maps.choppy_dx'
--require 'maps.dungeons.main'
--require 'maps.dungeons.tiered_dungeon'
--require 'maps.choppy_dx'
--require 'maps.island_troopers.main'
--require 'maps.biter_hatchery.main'
--require 'maps.junkyard_pvp.main'
--require 'maps.cave_choppy.cave_miner'
--require 'maps.wave_of_death.WoD'
--require 'maps.planet_prison'
--require 'maps.stone_maze.main'
--require 'maps.choppy'
--require 'maps.desert_oasis'
--require 'maps.overgrowth'
--require 'maps.quarters'
--require 'maps.railway_troopers_v2.main'
--require 'maps.railway_troopers.main'
--require 'maps.tetris.main'
--require 'maps.maze_challenge'
--require 'maps.cave_miner'
--require 'maps.cave_choppy.cave_miner'
--require 'maps.expanse.main'
--require 'maps.labyrinth'
--require 'maps.junkyard'
--require 'maps.junkyard_pvp.main'
--require 'maps.hedge_maze'
--require 'maps.spooky_forest'
--require 'maps.mixed_railworld'
@ -116,28 +117,26 @@ require 'modules.autostash'
--require 'maps.fish_defender_v1.fish_defender'
--require 'maps.mountain_fortress'
--require 'maps.rocky_waste'
--require 'maps.nightfall'
--require 'maps.lost'
--require 'maps.rivers'
--require 'maps.atoll'
--require 'maps.cratewood_forest'
--require 'maps.maze_challenge'
--require 'maps.tank_battles'
--require 'maps.spiral_troopers'
--require 'maps.refactor-io'
--require 'maps.desert_oasis'
--require 'maps.lost_desert'
--require 'maps.stoneblock'
--require 'maps.expanse.main'
--require 'maps.wave_defense'
--require 'maps.crossing'
--require 'maps.anarchy'
--require 'maps.spaghettorio'
--require 'maps.blue_beach'
--require 'maps.nightfall'
--require 'maps.deep_jungle'
--require 'maps.rainbow_road'
--require 'maps.pitch_black.main'
--require 'maps.cube'
--require 'maps.forest_circle'
-----------------------------
---- more modules here ----

View File

@ -74,12 +74,12 @@ function Public.reset_nauvis(hatchery)
surface.delete_chunk({chunk.x, chunk.y})
end
hatchery.gamestate = "prepare_east"
game.print("preparing east", {150, 150, 150})
print(hatchery.gamestate)
end
function Public.prepare_east(hatchery)
if game.tick % 90 ~= 0 then return end
game.print("preparing east", {150, 150, 150})
if game.tick % 90 ~= 0 then return end
local surface = game.surfaces.nauvis
surface.request_to_generate_chunks({hatchery_position.x, 0}, 7)
@ -100,18 +100,19 @@ function Public.prepare_east(hatchery)
end
draw_spawn_ore(surface, {x = 240, y = 0})
hatchery.gamestate = "clear_west"
game.print("clearing west chunks", {150, 150, 150})
print(hatchery.gamestate)
end
function Public.clear_west(hatchery)
if game.tick % 90 ~= 0 then return end
game.print("clearing west chunks", {150, 150, 150})
if game.tick % 90 ~= 0 then return end
local surface = game.surfaces.nauvis
for chunk in surface.get_chunks() do
if chunk.x < 0 then surface.delete_chunk({chunk.x, chunk.y}) end
end
hatchery.mirror_queue = {}
hatchery.gamestate = "prepare_west"
game.print("preparing west chunks", {150, 150, 150})
print(hatchery.gamestate)
end
@ -120,7 +121,6 @@ function Public.prepare_west(hatchery)
local surface = game.surfaces.nauvis
surface.request_to_generate_chunks({hatchery_position.x * -1, 0}, 7)
surface.force_generate_chunk_requests()
game.print("preparing west chunks " .. table_size(hatchery.mirror_queue), {150, 150, 150})
if hatchery.mirror_queue[1] then return end
hatchery.gamestate = "draw_team_nests"
print(hatchery.gamestate)

View File

@ -1,7 +1,6 @@
--choppy-- mewmew made this --
--neko barons attempt to mix up map gen--
require 'modules.dynamic_landfill'
require 'modules.satellite_score'
require 'modules.spawners_contain_biters'
require 'functions.create_entity_chain'
@ -10,7 +9,6 @@ require 'tools.map_functions'
require 'modules.surrounded_by_worms'
require 'modules.biter_noms_you'
--require "maps.choppy_map_intro"
local Map = require 'modules.map_info'
local unearthing_worm = require 'functions.unearthing_worm'

View File

@ -11,7 +11,7 @@ local math_abs = math.abs
local string_sub = string.sub
local oasis_start = 0.50
local water_start = 0.78
local water_start = 0.81
local sand_damage = oasis_start * 100 + 16
local trees = {"tree-01", "tree-04", "tree-06", "tree-08-red", "tree-08", "tree-09",}
@ -186,7 +186,7 @@ local function on_init()
for _ = 1, 1024 ^ 2, 1 do
seed = math_random(1, 999999999)
noise = get_noise("oasis", position, seed)
if noise > water_start + 0.02 then
if noise > 0.76 then
global.desert_oasis_seed = seed
break
end
@ -295,7 +295,7 @@ local function on_player_joined_game(event)
end
if game.tick > 0 then return end
local p = game.surfaces["desert_oasis"].find_non_colliding_position("stone", {52, 52}, 50, 0.5)
local p = game.surfaces["desert_oasis"].find_non_colliding_position("stone", {80, 80}, 50, 0.5)
if not p then return end
local e = game.surfaces.desert_oasis.create_entity({name = "crash-site-spaceship", position = p, force = "player", create_build_effect_smoke = false})
e.insert({name = "computer", count = 1})

View File

@ -129,7 +129,7 @@ local function get_noise(name, pos)
seed = seed + noise_seed_add
if name == 1 then
local noise = {}
noise[1] = simplex_noise(pos.x * 0.001, pos.y * 0.001, seed)
noise[1] = simplex_noise(pos.x * 0.002, pos.y * 0.002, seed)
local noise = noise[1]
return noise
end
@ -319,9 +319,9 @@ local function draw_ores(surface, position)
for x = 0, labyrinth_cell_size - 1, 1 do
for y = 0, labyrinth_cell_size - 1, 1 do
local pos = {x = position.x + x, y = position.y + y}
local amount = 500 + math.sqrt(pos.x^2 + pos.y^2)
local amount = 250 + math.sqrt(pos.x^2 + pos.y^2) * 0.5
if ore == "crude-oil" then
if math_random(1, 32) == 1 and surface.can_place_entity({name = ore, position = pos, amount = amount * 100}) then surface.create_entity({name = ore, position = pos, amount = amount * 100}) end
if math_random(1, 32) == 1 and surface.can_place_entity({name = ore, position = pos, amount = amount * 200}) then surface.create_entity({name = ore, position = pos, amount = amount * 200}) end
else
surface.create_entity({name = ore, position = pos, amount = amount})
end
@ -401,7 +401,7 @@ local function process_chunk_charted_cell(surface, pos)
else
local distance_to_center = math.sqrt(pos.x^2 + pos.y^2)
if distance_to_center > 196 then
if math_random(1, 4) == 1 then
if math_random(1, 3) == 1 then
draw_water(surface, pos)
else
draw_enemies(surface, pos)

View File

@ -257,7 +257,7 @@ function Public.create_room_surface(icw, unit_number)
["decorative"] = {treat_missing_as_default = false},
},
}
local surface = game.create_surface(unit_number, map_gen_settings)
local surface = game.create_surface(tostring(unit_number), map_gen_settings)
surface.freeze_daytime = true
surface.daytime = 0.1
surface.request_to_generate_chunks({16, 16}, 2)