mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-03-17 20:58:13 +02:00
less cliffs, tiles underneath silo, tweaks
This commit is contained in:
parent
11ee35092a
commit
07516cb0f6
@ -14,7 +14,7 @@ local function init_surface()
|
||||
map_gen_settings.water = math.random(30, 40) * 0.01
|
||||
map_gen_settings.starting_area = 2.5
|
||||
map_gen_settings.terrain_segmentation = math.random(30, 40) * 0.1
|
||||
map_gen_settings.cliff_settings = {cliff_elevation_interval = math.random(8, 48), cliff_elevation_0 = math.random(8, 48)}
|
||||
map_gen_settings.cliff_settings = {cliff_elevation_interval = math.random(16, 48), cliff_elevation_0 = math.random(16, 48)}
|
||||
map_gen_settings.autoplace_controls = {
|
||||
["coal"] = {frequency = math.random(10, 30) * 0.1, size = math.random(5, 15) * 0.1, richness = math.random(5, 15) * 0.1},
|
||||
["stone"] = {frequency = math.random(10, 30) * 0.1, size = math.random(5, 15) * 0.1, richness = math.random(5, 15) * 0.1},
|
||||
|
@ -14,7 +14,7 @@ bb_config = {
|
||||
["blueprint_string_importing"] = false, --Allow the importing of blueprints via blueprint strings?
|
||||
|
||||
--MAP PREGENERATION--
|
||||
["map_pregeneration_radius"] = 32, --Radius in chunks to pregenerate at the start of the map.
|
||||
["map_pregeneration_radius"] = 38, --Radius in chunks to pregenerate at the start of the map.
|
||||
["fast_pregen"] = false, --Force fast pregeneration.
|
||||
|
||||
--TERRAIN OPTIONS--
|
||||
|
@ -16,7 +16,9 @@ end
|
||||
|
||||
local function create_victory_gui(player)
|
||||
local values = gui_values[global.bb_game_won_by_team]
|
||||
local frame = player.gui.left.add {type = "frame", name = "bb_victory_gui", direction = "vertical", caption = values.c1 .. " team has won!" }
|
||||
local c = values.c1
|
||||
if global.tm_custom_name[global.bb_game_won_by_team] then c = global.tm_custom_name[global.bb_game_won_by_team] end
|
||||
local frame = player.gui.left.add {type = "frame", name = "bb_victory_gui", direction = "vertical", caption = c .. " team has won!" }
|
||||
frame.style.font = "heading-1"
|
||||
frame.style.font_color = values.color1
|
||||
|
||||
@ -341,7 +343,10 @@ local function on_entity_died(event)
|
||||
global.spy_fish_timeout["south"] = game.tick + 999999
|
||||
global.server_restart_timer = 180
|
||||
|
||||
server_commands.to_discord_embed(gui_values[global.bb_game_won_by_team].c1 .. " team has won!")
|
||||
local c = gui_values[global.bb_game_won_by_team].c1
|
||||
if global.tm_custom_name[global.bb_game_won_by_team] then c = global.tm_custom_name[global.bb_game_won_by_team] end
|
||||
|
||||
server_commands.to_discord_embed(c .. " has won!")
|
||||
server_commands.to_discord_embed(global.victory_time)
|
||||
|
||||
fireworks(event.entity.surface)
|
||||
|
@ -252,7 +252,9 @@ function join_team(player, force_name, forced_join)
|
||||
player.character.destructible = true
|
||||
game.permissions.get_group("Default").add_player(player)
|
||||
if not forced_join then
|
||||
game.print(player.name .. " has joined team " .. player.force.name .. "!", {r = 0.98, g = 0.66, b = 0.22})
|
||||
local c = player.force.name
|
||||
if global.tm_custom_name[player.force.name] then c = global.tm_custom_name[player.force.name] end
|
||||
game.print(player.name .. " has joined team " .. c .. "!", {r = 0.98, g = 0.66, b = 0.22})
|
||||
end
|
||||
local i = player.get_inventory(defines.inventory.character_main)
|
||||
i.clear()
|
||||
|
@ -80,4 +80,4 @@ local function on_tick(event)
|
||||
restart_idle_map()
|
||||
end
|
||||
|
||||
event.add(defines.events.on_tick, on_tick)
|
||||
event.add(defines.events.on_tick, on_tick)
|
@ -135,7 +135,7 @@ local function generate_circle_spawn(event)
|
||||
if global.bb_circle_spawn_generated then return end
|
||||
|
||||
local surface = event.surface
|
||||
if surface.is_chunk_generated({6, 6}) then global.bb_circle_spawn_generated = true end
|
||||
if surface.is_chunk_generated({-8, -8}) then global.bb_circle_spawn_generated = true end
|
||||
local left_top_x = event.area.left_top.x
|
||||
local left_top_y = event.area.left_top.y
|
||||
local r = 101
|
||||
@ -212,8 +212,13 @@ local function generate_silos(event)
|
||||
global.bb_silos_generated = true
|
||||
|
||||
local surface = event.surface
|
||||
local pos = surface.find_non_colliding_position("rocket-silo", {x = -16 + math.random(0, 24), y = -64 + math.random(0, 16)}, 20, 1)
|
||||
if not pos then pos = {0,-64} end
|
||||
|
||||
local pos = {x = -12 + math.random(0, 24), y = -64 + math.random(0, 16)}
|
||||
|
||||
for _, t in pairs(surface.find_tiles_filtered({area = {{pos.x - 6, pos.y - 6},{pos.x + 6, pos.y + 6}}, name = {"water", "deepwater"}})) do
|
||||
surface.set_tiles({{name = get_replacement_tile(surface, t.position), position = t.position}})
|
||||
end
|
||||
|
||||
global.rocket_silo["north"] = surface.create_entity({
|
||||
name = "rocket-silo",
|
||||
position = pos,
|
||||
|
@ -4,7 +4,9 @@ local radius = 6
|
||||
local targets = {}
|
||||
local acid_splashes = {
|
||||
["big-biter"] = "acid-stream-worm-medium",
|
||||
["behemoth-biter"] = "acid-stream-worm-big"
|
||||
["behemoth-biter"] = "acid-stream-worm-big",
|
||||
["big-spitter"] = "acid-stream-worm-medium",
|
||||
["behemoth-spitter"] = "acid-stream-worm-big"
|
||||
}
|
||||
local acid_lines = {
|
||||
["big-spitter"] = "acid-stream-spitter-medium",
|
||||
@ -19,7 +21,7 @@ for x = radius * -1, radius, 1 do
|
||||
end
|
||||
|
||||
local function acid_nova(event)
|
||||
for _ = 1, math.random(20, 40) do
|
||||
for _ = 1, math.random(16, 32) do
|
||||
local i = math.random(1, #targets)
|
||||
event.entity.surface.create_entity({
|
||||
name = acid_splashes[event.entity.name],
|
||||
@ -42,14 +44,14 @@ end
|
||||
local function acid_line(surface, name, source, target)
|
||||
local distance = math.sqrt((source.x - target.x) ^ 2 + (source.y - target.y) ^ 2)
|
||||
|
||||
if distance > 16 then return end
|
||||
if distance > 16 then return false end
|
||||
|
||||
local modifier = {(target.x - source.x) / distance, (target.y - source.y) / distance}
|
||||
|
||||
local position = {source.x, source.y}
|
||||
|
||||
for i = 1, distance + 2, 1 do
|
||||
if math_random(1,3) ~= 1 then
|
||||
for i = 1, distance + 4, 1 do
|
||||
if math_random(1,3) == 1 then
|
||||
surface.create_entity({
|
||||
name = name,
|
||||
position = source,
|
||||
@ -63,14 +65,17 @@ local function acid_line(surface, name, source, target)
|
||||
position = {position[1] + modifier[1], position[2] + modifier[2]}
|
||||
end
|
||||
|
||||
global.acid_lines_delay[event.cause.unit_number] = game.tick + 180
|
||||
return true
|
||||
end
|
||||
|
||||
boss_biter.damaged_entity = function(event)
|
||||
if acid_lines[event.cause.name] then
|
||||
if not global.acid_lines_delay[event.cause.unit_number] then global.acid_lines_delay[event.cause.unit_number] = 0 end
|
||||
|
||||
if global.acid_lines_delay[event.cause.unit_number] < game.tick then
|
||||
acid_line(event.cause.surface, acid_lines[event.cause.name], event.cause.position, event.entity.position)
|
||||
if acid_line(event.cause.surface, acid_lines[event.cause.name], event.cause.position, event.entity.position) then
|
||||
global.acid_lines_delay[event.cause.unit_number] = game.tick + 180
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user