diff --git a/map_gen/maps/danger_ores/modules/main_ores_one_direction.lua b/map_gen/maps/danger_ores/modules/main_ores_one_direction.lua index 795f232e..ee07f407 100644 --- a/map_gen/maps/danger_ores/modules/main_ores_one_direction.lua +++ b/map_gen/maps/danger_ores/modules/main_ores_one_direction.lua @@ -7,6 +7,7 @@ return function(config) local shuffle_order = config.main_ores_shuffle_order local main_ores_rotate = config.main_ores_rotate or 0 local main_ores_split_count = config.main_ores_split_count or 1 + local ore_width = config.ore_width or 32 main_ores = Helper.split_ore(main_ores, main_ores_split_count) @@ -32,7 +33,7 @@ return function(config) table.shuffle_table(shapes, random_gen) end - local ores = b.grid_y_no_repeat_weighted_pattern(shapes, 32) + local ores = b.grid_y_no_repeat_weighted_pattern(shapes, ore_width) if main_ores_rotate ~= 0 then ores = b.rotate(ores, math.rad(main_ores_rotate)) diff --git a/map_gen/maps/danger_ores/modules/map_poll.lua b/map_gen/maps/danger_ores/modules/map_poll.lua index 308326a5..2bb5a594 100644 --- a/map_gen/maps/danger_ores/modules/map_poll.lua +++ b/map_gen/maps/danger_ores/modules/map_poll.lua @@ -34,6 +34,11 @@ local maps = { mod_pack = normal_mod_pack, display_name = 'one direction (line)' }, + { + name = 'danger-ore-one-direction-wide-beltboxes-ore-only', + mod_pack = normal_mod_pack, + display_name = 'one direction wide (wider line)' + }, { name = 'danger-ore-3way-beltboxes-ore-only', mod_pack = normal_mod_pack, diff --git a/map_gen/maps/danger_ores/presets/danger_ore_one_direction.lua b/map_gen/maps/danger_ores/presets/danger_ore_one_direction.lua index ac4aae77..9e48583a 100644 --- a/map_gen/maps/danger_ores/presets/danger_ore_one_direction.lua +++ b/map_gen/maps/danger_ores/presets/danger_ore_one_direction.lua @@ -145,6 +145,7 @@ local function post_map_func(map_shape) local water_border = b.tile('water') water_border = b.choose(water_bounds, water_border, b.empty_shape) + water_border = b.fish(water_border, 0.025) return b.choose(map_bounds, map_shape, water_border) end diff --git a/map_gen/maps/danger_ores/presets/danger_ore_one_direction_beltboxes.lua b/map_gen/maps/danger_ores/presets/danger_ore_one_direction_beltboxes.lua index 65c01860..952158d3 100644 --- a/map_gen/maps/danger_ores/presets/danger_ore_one_direction_beltboxes.lua +++ b/map_gen/maps/danger_ores/presets/danger_ore_one_direction_beltboxes.lua @@ -147,6 +147,7 @@ local function post_map_func(map_shape) local water_border = b.tile('water') water_border = b.choose(water_bounds, water_border, b.empty_shape) + water_border = b.fish(water_border, 0.025) return b.choose(map_bounds, map_shape, water_border) end diff --git a/map_gen/maps/danger_ores/presets/danger_ore_one_direction_beltboxes_ore_only.lua b/map_gen/maps/danger_ores/presets/danger_ore_one_direction_beltboxes_ore_only.lua index 41d8f449..3f3ebc75 100644 --- a/map_gen/maps/danger_ores/presets/danger_ore_one_direction_beltboxes_ore_only.lua +++ b/map_gen/maps/danger_ores/presets/danger_ore_one_direction_beltboxes_ore_only.lua @@ -154,6 +154,7 @@ local function post_map_func(map_shape) local water_border = b.tile('water') water_border = b.choose(water_bounds, water_border, b.empty_shape) + water_border = b.fish(water_border, 0.025) return b.choose(map_bounds, map_shape, water_border) end diff --git a/map_gen/maps/danger_ores/presets/danger_ore_one_direction_wide_beltboxes_ore_only.lua b/map_gen/maps/danger_ores/presets/danger_ore_one_direction_wide_beltboxes_ore_only.lua new file mode 100644 index 00000000..46cfb13f --- /dev/null +++ b/map_gen/maps/danger_ores/presets/danger_ore_one_direction_wide_beltboxes_ore_only.lua @@ -0,0 +1,193 @@ +local RS = require 'map_gen.shared.redmew_surface' +local MGSP = require 'resources.map_gen_settings' +local Event = require 'utils.event' +local b = require 'map_gen.shared.builders' +local Config = require 'config' + +local ScenarioInfo = require 'features.gui.info' +ScenarioInfo.set_map_name('Danger Ore One Direction Wide Beltboxes (ore only)') +ScenarioInfo.set_map_description([[ +Clear the ore to expand the base, +focus mining efforts on specific sectors to ensure +proper material ratios, expand the map with pollution! +]]) +ScenarioInfo.add_map_extra_info([[ +This map is split in three sectors [item=iron-ore] [item=copper-ore] [item=coal]. +Each sector has a main resource and the other resources at a lower ratio. + +You may not build the factory on ore patches. Exceptions: + [item=burner-mining-drill] [item=electric-mining-drill] [item=pumpjack] [item=small-electric-pole] [item=medium-electric-pole] [item=big-electric-pole] [item=substation] [item=car] [item=tank] [item=spidertron] [item=locomotive] [item=cargo-wagon] [item=fluid-wagon] [item=artillery-wagon] + [item=transport-belt] [item=fast-transport-belt] [item=express-transport-belt] [item=underground-belt] [item=fast-underground-belt] [item=express-underground-belt] [item=rail] [item=rail-signal] [item=rail-chain-signal] [item=train-stop] + +The map size is restricted to the pollution generated. A significant amount of +pollution must affect a section of the map before it is revealed. Pollution +does not affect biter evolution.]]) + +ScenarioInfo.set_new_info([[ +2019-04-24: + - Stone ore density reduced by 1/2 + - Ore quadrants randomized + - Increased time factor of biter evolution from 5 to 7 + - Added win conditions (+5% evolution every 5 rockets until 100%, +100 rockets until biters are wiped) + +2019-03-30: + - Uranium ore patch threshold increased slightly + - Bug fix: Cars and tanks can now be placed onto ore! + - Starting minimum pollution to expand map set to 650 + View current pollution via Debug Settings [F4] show-pollution-values, + then open map and turn on pollution via the red box. + - Starting water at spawn increased from radius 8 to radius 16 circle. + +2019-03-27: + - Ore arranged into quadrants to allow for more controlled resource gathering. + +2020-09-02: + - Destroyed chests dump their content as coal ore. + +2020-12-28: + - Changed win condition. First satellite kills all biters, launch 500 to win the map. + +2021-04-06: + - Rail signals and train stations now allowed on ore. +]]) + +ScenarioInfo.add_extra_rule({'info.rules_text_danger_ore'}) + +global.config.redmew_qol.loaders = false + +local map = require 'map_gen.maps.danger_ores.modules.map' +local main_ores_config = require 'map_gen.maps.danger_ores.config.one_direction_beltboxes_ores' +-- local resource_patches = require 'map_gen.maps.danger_ores.modules.resource_patches' +-- local resource_patches_config = require 'map_gen.maps.danger_ores.config.deadlock_beltboxes_resource_patches' +-- local water = require 'map_gen.maps.danger_ores.modules.water' +local trees = require 'map_gen.maps.danger_ores.modules.trees' +local enemy = require 'map_gen.maps.danger_ores.modules.enemy' +-- local dense_patches = require 'map_gen.maps.danger_ores.modules.dense_patches' + +local banned_entities = require 'map_gen.maps.danger_ores.modules.banned_entities' +local allowed_entities = require 'map_gen.maps.danger_ores.config.deadlock_beltboxes_allowed_entities' +banned_entities(allowed_entities) + +RS.set_map_gen_settings({ + MGSP.grass_only, + MGSP.enable_water, + {terrain_segmentation = 'normal', water = 'normal'}, + MGSP.starting_area_very_low, + MGSP.ore_oil_none, + MGSP.enemy_none, + MGSP.cliff_none, + MGSP.tree_none, + {height = 32 * 10} +}) + +Config.market.enabled = false +Config.player_rewards.enabled = false +Config.player_create.starting_items = {} +Config.dump_offline_inventories = { + enabled = true, + offline_timout_mins = 30 -- time after which a player logs off that their inventory is provided to the team +} +Config.paint.enabled = false + +Event.on_init(function() + game.forces.player.technologies['mining-productivity-1'].enabled = false + game.forces.player.technologies['mining-productivity-2'].enabled = false + game.forces.player.technologies['mining-productivity-3'].enabled = false + game.forces.player.technologies['mining-productivity-4'].enabled = false + + game.difficulty_settings.technology_price_multiplier = 20 + game.forces.player.technologies.logistics.researched = true + game.forces.player.technologies.automation.researched = true + + game.map_settings.enemy_evolution.time_factor = 0.000007 -- default 0.000004 + game.map_settings.enemy_evolution.destroy_factor = 0.000010 -- default 0.002 + game.map_settings.enemy_evolution.pollution_factor = 0.000000 -- Pollution has no affect on evolution default 0.0000009 + + game.forces.player.manual_mining_speed_modifier = 1 + + RS.get_surface().always_day = true + RS.get_surface().peaceful_mode = true +end) + +local function terraforming_bounds(x, y) + return x > -64 and y > -160 and y < 160 +end + +local terraforming = require 'map_gen.maps.danger_ores.modules.terraforming' +terraforming({ + start_size = 10 * 32, + min_pollution = 450, + max_pollution = 24000, + pollution_increment = 9, + bounds = terraforming_bounds +}) + +local rocket_launched = require 'map_gen.maps.danger_ores.modules.rocket_launched_simple' +rocket_launched({win_satellite_count = 1000}) + +local restart_command = require 'map_gen.maps.danger_ores.modules.restart_command' +restart_command({scenario_name = 'danger-ore-one-direction-wide-beltboxes-ore-only'}) + +local container_dump = require 'map_gen.maps.danger_ores.modules.container_dump' +container_dump({entity_name = 'coal'}) + +local concrete_on_landfill = require 'map_gen.maps.danger_ores.modules.concrete_on_landfill' +concrete_on_landfill({tile = 'blue-refined-concrete'}) + +local remove_non_ore_stacked_recipes = require 'map_gen.maps.danger_ores.modules.remove_non_ore_stacked_recipes' +remove_non_ore_stacked_recipes() + +require 'map_gen.maps.danger_ores.modules.biter_drops' + +require 'map_gen.maps.danger_ores.modules.map_poll' + +local main_ores_builder = require 'map_gen.maps.danger_ores.modules.main_ores_one_direction' + +local function post_map_func(map_shape) + local function map_bounds(x, y) + return x > -28 and y > -144 and y < 144 + end + + local function water_bounds(x, y) + return x > -30 and y > -146 and y < 146 + end + + local water_border = b.tile('water') + water_border = b.choose(water_bounds, water_border, b.empty_shape) + water_border = b.fish(water_border, 0.025) + + return b.choose(map_bounds, map_shape, water_border) +end + +local config = { + spawn_shape = b.rectangle(40, 264), + start_ore_shape = b.rectangle(56, 280), + post_map_func = post_map_func, + main_ores_builder = main_ores_builder, + no_resource_patch_shape = b.rectangle(160), + main_ores = main_ores_config, + main_ores_shuffle_order = true, + ore_width = 96, + -- main_ores_rotate = 30, + -- resource_patches = resource_patches, + -- resource_patches_config = resource_patches_config, + -- water = water, + water_scale = 1 / 96, + water_threshold = 0.4, + deepwater_threshold = 0.45, + trees = trees, + trees_scale = 1 / 64, + trees_threshold = 0.3, + trees_chance = 0.875, + enemy = enemy, + enemy_factor = 10 / (768 * 32), + enemy_max_chance = 1 / 6, + enemy_scale_factor = 32, + fish_spawn_rate = 0.025, + -- dense_patches = dense_patches, + dense_patches_scale = 1 / 48, + dense_patches_threshold = 0.55, + dense_patches_multiplier = 25 +} + +return map(config) diff --git a/scenario_templates/danger-ore-one-direction-wide-beltboxes-ore-only/map_selection.lua b/scenario_templates/danger-ore-one-direction-wide-beltboxes-ore-only/map_selection.lua new file mode 100644 index 00000000..8bd9c702 --- /dev/null +++ b/scenario_templates/danger-ore-one-direction-wide-beltboxes-ore-only/map_selection.lua @@ -0,0 +1 @@ +return require 'map_gen.maps.danger_ores.presets.danger_ore_one_direction_wide_beltboxes_ore_only' \ No newline at end of file