diff --git a/map_gen/maps/crash_site/presets/logistic_network_embargo.lua b/map_gen/maps/crash_site/presets/logistic_network_embargo.lua new file mode 100644 index 00000000..b845c962 --- /dev/null +++ b/map_gen/maps/crash_site/presets/logistic_network_embargo.lua @@ -0,0 +1,45 @@ +local MGSP = require 'resources.map_gen_settings' +local ScenarioInfo = require 'features.gui.info' +local Event = require 'utils.event' + +local config = { + scenario_name = 'crashsite-logistic-network-embargo', + map_gen_settings = { + MGSP.grass_only, + MGSP.enable_water, + { + terrain_segmentation = 6, + water = 0.25 + }, + MGSP.starting_area_very_low, + MGSP.ore_oil_none, + MGSP.enemy_none, + MGSP.cliff_none + } +} + +local Scenario = require 'map_gen.maps.crash_site.scenario' +ScenarioInfo.set_map_name('Crashsite - Logistic Network Embargo') +ScenarioInfo.set_map_description('Capture outposts and defend against the biters.') +ScenarioInfo.add_map_extra_info( + [[ + - Outposts have enemy turrets defending them. + - Outposts have loot and provide a steady stream of resources. + - Outpost markets to purchase items and outpost upgrades. + - Capturing outposts increases evolution. + - Reduced damage by all player weapons, turrets, and ammo. + - Biters have more health and deal more damage. + - Biters and spitters spawn on death of entities. + - Active provider, buffer and requester chests are not avaliable. + ]] +) + +local active_outpost_types = Scenario.all_outpost_types_active +active_outpost_types['mini_t1_robotics_factory'] = false +config.active_outpost_types = active_outpost_types + +Event.on_init(function() + game.forces.player.technologies['logistic-system'].enabled = false +end) + +return Scenario.init(config) diff --git a/map_gen/maps/crash_site/presets/no_bots.lua b/map_gen/maps/crash_site/presets/no_bots.lua new file mode 100644 index 00000000..802e4dfc --- /dev/null +++ b/map_gen/maps/crash_site/presets/no_bots.lua @@ -0,0 +1,57 @@ +local MGSP = require 'resources.map_gen_settings' +local ScenarioInfo = require 'features.gui.info' +local Event = require 'utils.event' + +local config = { + scenario_name = 'crashsite-nobots', + map_gen_settings = { + MGSP.grass_only, + MGSP.enable_water, + { + terrain_segmentation = 6, + water = 0.25 + }, + MGSP.starting_area_very_low, + MGSP.ore_oil_none, + MGSP.enemy_none, + MGSP.cliff_none + } +} + +local Scenario = require 'map_gen.maps.crash_site.scenario' +ScenarioInfo.set_map_name('Crashsite - No Bots') +ScenarioInfo.set_map_description('Capture outposts and defend against the biters.') +ScenarioInfo.add_map_extra_info( + [[ + - Outposts have enemy turrets defending them. + - Outposts have loot and provide a steady stream of resources. + - Outpost markets to purchase items and outpost upgrades. + - Capturing outposts increases evolution.\n- Reduced damage by all player weapons, turrets, and ammo. + - Biters have more health and deal more damage. + - Biters and spitters spawn on death of entities. + - Construction and logistic bots are disabled on this map. + ]] +) + +local active_outpost_types = Scenario.all_outpost_types_active +active_outpost_types['mini_t1_robotics_factory'] = false +config.active_outpost_types = active_outpost_types + +Event.on_init(function() + game.forces.player.technologies['construction-robotics'].enabled = false + game.forces.player.technologies['logistic-robotics'].enabled = false + game.forces.player.technologies['logistic-system'].enabled = false + game.forces.player.technologies['personal-roboport-equipment'].enabled = false + game.forces.player.technologies['personal-roboport-mk2-equipment'].enabled = false + game.forces.player.technologies['worker-robots-storage-1'].enabled = false + game.forces.player.technologies['worker-robots-storage-2'].enabled = false + game.forces.player.technologies['worker-robots-storage-3'].enabled = false + game.forces.player.technologies['worker-robots-speed-1'].enabled = false + game.forces.player.technologies['worker-robots-speed-2'].enabled = false + game.forces.player.technologies['worker-robots-speed-3'].enabled = false + game.forces.player.technologies['worker-robots-speed-4'].enabled = false + game.forces.player.technologies['worker-robots-speed-5'].enabled = false + game.forces.player.technologies['worker-robots-speed-6'].enabled = false +end) + +return Scenario.init(config) diff --git a/map_gen/maps/crash_site/presets/only_construction_bots.lua b/map_gen/maps/crash_site/presets/only_construction_bots.lua new file mode 100644 index 00000000..142add48 --- /dev/null +++ b/map_gen/maps/crash_site/presets/only_construction_bots.lua @@ -0,0 +1,46 @@ +local MGSP = require 'resources.map_gen_settings' +local ScenarioInfo = require 'features.gui.info' +local Event = require 'utils.event' + +local config = { + scenario_name = 'crashsite-only-construction-bots', + map_gen_settings = { + MGSP.grass_only, + MGSP.enable_water, + { + terrain_segmentation = 6, + water = 0.25 + }, + MGSP.starting_area_very_low, + MGSP.ore_oil_none, + MGSP.enemy_none, + MGSP.cliff_none + } +} + +local Scenario = require 'map_gen.maps.crash_site.scenario' +ScenarioInfo.set_map_name('Crashsite - Only Construction Bots') +ScenarioInfo.set_map_description('Capture outposts and defend against the biters.') +ScenarioInfo.add_map_extra_info( + [[ + - Outposts have enemy turrets defending them. + - Outposts have loot and provide a steady stream of resources. + - Outpost markets to purchase items and outpost upgrades. + - Capturing outposts increases evolution. + - Reduced damage by all player weapons, turrets, and ammo. + - Biters have more health and deal more damage. + - Biters and spitters spawn on death of entities. + - Only construction bots are available on this map. + ]] +) + +local active_outpost_types = Scenario.all_outpost_types_active +active_outpost_types['mini_t1_robotics_factory'] = false +config.active_outpost_types = active_outpost_types + +Event.on_init(function() + game.forces.player.technologies['logistic-robotics'].enabled = false + game.forces.player.technologies['logistic-system'].enabled = false +end) + +return Scenario.init(config) diff --git a/map_gen/maps/crash_site/presets/only_personal_bots.lua b/map_gen/maps/crash_site/presets/only_personal_bots.lua new file mode 100644 index 00000000..7b290c79 --- /dev/null +++ b/map_gen/maps/crash_site/presets/only_personal_bots.lua @@ -0,0 +1,58 @@ +local MGSP = require 'resources.map_gen_settings' +local ScenarioInfo = require 'features.gui.info' +local Event = require 'utils.event' + +local config = { + scenario_name = 'crashsite-only-personal-bots', + map_gen_settings = { + MGSP.grass_only, + MGSP.enable_water, + { + terrain_segmentation = 6, + water = 0.25 + }, + MGSP.starting_area_very_low, + MGSP.ore_oil_none, + MGSP.enemy_none, + MGSP.cliff_none + } +} + +local Scenario = require 'map_gen.maps.crash_site.scenario' +ScenarioInfo.set_map_name('Crashsite - Only Personal Construction Bots') +ScenarioInfo.set_map_description('Capture outposts and defend against the biters.') +ScenarioInfo.add_map_extra_info( + [[ + - Outposts have enemy turrets defending them. + - Outposts have loot and provide a steady stream of resources. + - Outpost markets to purchase items and outpost upgrades. + - Capturing outposts increases evolution. + - Reduced damage by all player weapons, turrets, and ammo. + - Biters have more health and deal more damage. + - Biters and spitters spawn on death of entities. + - Only personal construction bots are available on this map. + - Roboport, passive provider chest and storage chest do NOT unlock. + ]] +) + +local active_outpost_types = Scenario.all_outpost_types_active +active_outpost_types['mini_t1_robotics_factory'] = false +config.active_outpost_types = active_outpost_types + +Event.on_init(function() + game.forces.player.technologies['logistic-robotics'].enabled = false + game.forces.player.technologies['logistic-system'].enabled = false +end) + +Event.add(defines.events.on_research_finished, + function(event) + if event.research.name ~= 'construction-robotics' then + return + end + game.forces.player.recipes['roboport'].enabled = false + game.forces.player.recipes['logistic-chest-passive-provider'].enabled = false + game.forces.player.recipes['logistic-chest-storage'].enabled = false + end +) + +return Scenario.init(config) diff --git a/map_gen/maps/crash_site/presets/raining_bullets.lua b/map_gen/maps/crash_site/presets/raining_bullets.lua new file mode 100644 index 00000000..7dd450e9 --- /dev/null +++ b/map_gen/maps/crash_site/presets/raining_bullets.lua @@ -0,0 +1,70 @@ +local MGSP = require 'resources.map_gen_settings' +local ScenarioInfo = require 'features.gui.info' +local Event = require 'utils.event' + +local config = { + scenario_name = 'crashsite-raining-bullets', + map_gen_settings = { + MGSP.grass_only, + MGSP.enable_water, + { + terrain_segmentation = 6, + water = 0.25 + }, + MGSP.starting_area_very_low, + MGSP.ore_oil_none, + MGSP.enemy_none, + MGSP.cliff_none + } +} + +local Scenario = require 'map_gen.maps.crash_site.scenario' +ScenarioInfo.set_map_name('Crashsite - Raining Bullets') +ScenarioInfo.set_map_description('Capture outposts and defend against the biters.') +ScenarioInfo.add_map_extra_info( + [[ + - Outposts have enemy turrets defending them. + - Outposts have loot and provide a steady stream of resources. + - Outpost markets to purchase items and outpost upgrades. + - Capturing outposts increases evolution. + - Reduced damage by all player weapons, turrets, and ammo. + - Biters have more health and deal more damage. + - Biters and spitters spawn on death of entities. + - Laser and other energy based weapon technology has been disabled. + ]] +) + +Event.on_init(function() + game.forces.player.technologies['laser'].enabled = false + game.forces.player.technologies['personal-laser-defense-equipment'].enabled = false + game.forces.player.technologies['discharge-defense-equipment'].enabled = false + game.forces.player.technologies['laser-turret'].enabled = false + game.forces.player.technologies['laser-shooting-speed-1'].enabled = false + game.forces.player.technologies['laser-shooting-speed-2'].enabled = false + game.forces.player.technologies['laser-shooting-speed-3'].enabled = false + game.forces.player.technologies['laser-shooting-speed-4'].enabled = false + game.forces.player.technologies['laser-shooting-speed-5'].enabled = false + game.forces.player.technologies['laser-shooting-speed-6'].enabled = false + game.forces.player.technologies['laser-shooting-speed-7'].enabled = false + game.forces.player.technologies['energy-weapons-damage-1'].enabled = false + game.forces.player.technologies['energy-weapons-damage-2'].enabled = false + game.forces.player.technologies['energy-weapons-damage-3'].enabled = false + game.forces.player.technologies['energy-weapons-damage-4'].enabled = false + game.forces.player.technologies['energy-weapons-damage-5'].enabled = false + game.forces.player.technologies['energy-weapons-damage-6'].enabled = false + game.forces.player.technologies['energy-weapons-damage-7'].enabled = false + game.forces.player.technologies['distractor'].enabled = false + game.forces.player.technologies['destroyer'].enabled = false +end) + +local RestrictEntities = require 'map_gen.shared.entity_placement_restriction' +RestrictEntities.add_banned({'laser-turret'}) +local function on_destroy(event) + local p = event.player + if p and p.valid then + p.print('This preset does not allow placing [item=laser-turret].') + end +end +Event.add(RestrictEntities.events.on_restricted_entity_destroyed, on_destroy) + +return Scenario.init(config) diff --git a/map_gen/maps/crash_site/presets/steam_all_the_way.lua b/map_gen/maps/crash_site/presets/steam_all_the_way.lua new file mode 100644 index 00000000..8c97d7d2 --- /dev/null +++ b/map_gen/maps/crash_site/presets/steam_all_the_way.lua @@ -0,0 +1,68 @@ +local MGSP = require 'resources.map_gen_settings' +local ScenarioInfo = require 'features.gui.info' +local Event = require 'utils.event' + +local config = { + scenario_name = 'crashsite-steam-all-the-way', + map_gen_settings = { + MGSP.grass_only, + MGSP.enable_water, + { + terrain_segmentation = 6, + water = 0.25 + }, + MGSP.starting_area_very_low, + MGSP.ore_oil_none, + MGSP.enemy_none, + MGSP.cliff_none + } +} + +local Scenario = require 'map_gen.maps.crash_site.scenario' +ScenarioInfo.set_map_name('Crashsite - Steam all the way') +ScenarioInfo.set_map_description('Capture outposts and defend against the biters.') +ScenarioInfo.add_map_extra_info( + [[ + - Outposts have enemy turrets defending them. + - Outposts have loot and provide a steady stream of resources. + - Outpost markets to purchase items and outpost upgrades. + - Capturing outposts increases evolution. + - Reduced damage by all player weapons, turrets, and ammo. + - Biters have more health and deal more damage. + - Biters and spitters spawn on death of entities. + - Nuclear power is completely disabled. + - Accumulators and Solar Panels cannot be placed but are still available for other recipes. + ]] +) + +local active_outpost_types = Scenario.all_outpost_types_active +active_outpost_types['mini_t2_energy_factory'] = false +active_outpost_types['medium_power_factory'] = false +active_outpost_types['big_power_factory'] = false +config.active_outpost_types = active_outpost_types + +Event.on_init(function() + game.forces.player.technologies['nuclear-power'].enabled = false + game.forces.player.technologies['nuclear-fuel-reprocessing'].enabled = false +end) + +Event.add(defines.events.on_research_finished, + function(event) + if event.research.name ~= 'uranium-processing' then + return + end + game.forces.player.recipes['uranium-fuel-cell'].enabled = false + end +) + +local RestrictEntities = require 'map_gen.shared.entity_placement_restriction' +RestrictEntities.add_banned({'solar-panel', 'accumulator'}) +local function on_destroy(event) + local p = event.player + if p and p.valid then + p.print('This preset does not allow placing [item=accumulator] or [item=solar-panel].') + end +end +Event.add(RestrictEntities.events.on_restricted_entity_destroyed, on_destroy) + +return Scenario.init(config) diff --git a/scenario_templates/crashsite-logistic-network-embargo/map_selection.lua b/scenario_templates/crashsite-logistic-network-embargo/map_selection.lua new file mode 100644 index 00000000..e810ae2a --- /dev/null +++ b/scenario_templates/crashsite-logistic-network-embargo/map_selection.lua @@ -0,0 +1 @@ +return require 'map_gen.maps.crash_site.presets.logistic_network_embargo' \ No newline at end of file diff --git a/scenario_templates/crashsite-nobots/map_selection.lua b/scenario_templates/crashsite-nobots/map_selection.lua new file mode 100644 index 00000000..16489bfe --- /dev/null +++ b/scenario_templates/crashsite-nobots/map_selection.lua @@ -0,0 +1 @@ +return require 'map_gen.maps.crash_site.presets.no_bots' \ No newline at end of file diff --git a/scenario_templates/crashsite-only-construction-bots/map_selection.lua b/scenario_templates/crashsite-only-construction-bots/map_selection.lua new file mode 100644 index 00000000..9f0a20bd --- /dev/null +++ b/scenario_templates/crashsite-only-construction-bots/map_selection.lua @@ -0,0 +1 @@ +return require 'map_gen.maps.crash_site.presets.only_construction_bots' \ No newline at end of file diff --git a/scenario_templates/crashsite-only-personal-bots/map_selection.lua b/scenario_templates/crashsite-only-personal-bots/map_selection.lua new file mode 100644 index 00000000..7538c21a --- /dev/null +++ b/scenario_templates/crashsite-only-personal-bots/map_selection.lua @@ -0,0 +1 @@ +return require 'map_gen.maps.crash_site.presets.only_personal_bots' \ No newline at end of file diff --git a/scenario_templates/crashsite-raining-bullets/map_selection.lua b/scenario_templates/crashsite-raining-bullets/map_selection.lua new file mode 100644 index 00000000..af71af05 --- /dev/null +++ b/scenario_templates/crashsite-raining-bullets/map_selection.lua @@ -0,0 +1 @@ +return require 'map_gen.maps.crash_site.presets.raining_bullets' \ No newline at end of file diff --git a/scenario_templates/crashsite-steam-all-the-way/map_selection.lua b/scenario_templates/crashsite-steam-all-the-way/map_selection.lua new file mode 100644 index 00000000..579a7bbd --- /dev/null +++ b/scenario_templates/crashsite-steam-all-the-way/map_selection.lua @@ -0,0 +1 @@ +return require 'map_gen.maps.crash_site.presets.steam_all_the_way' \ No newline at end of file