mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-12 10:04:40 +02:00
Add no_bots preset for crashsite (#1307)
- Add no_bots preset. - Added only personal bots preset. - Added only construction bots preset. - Added logistic network embargo preset. - Added Steam all the way preset. - Added Raining Bullets preset.
This commit is contained in:
parent
4d46c67e44
commit
34b31769c2
45
map_gen/maps/crash_site/presets/logistic_network_embargo.lua
Normal file
45
map_gen/maps/crash_site/presets/logistic_network_embargo.lua
Normal file
@ -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)
|
57
map_gen/maps/crash_site/presets/no_bots.lua
Normal file
57
map_gen/maps/crash_site/presets/no_bots.lua
Normal file
@ -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)
|
46
map_gen/maps/crash_site/presets/only_construction_bots.lua
Normal file
46
map_gen/maps/crash_site/presets/only_construction_bots.lua
Normal file
@ -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)
|
58
map_gen/maps/crash_site/presets/only_personal_bots.lua
Normal file
58
map_gen/maps/crash_site/presets/only_personal_bots.lua
Normal file
@ -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)
|
70
map_gen/maps/crash_site/presets/raining_bullets.lua
Normal file
70
map_gen/maps/crash_site/presets/raining_bullets.lua
Normal file
@ -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)
|
68
map_gen/maps/crash_site/presets/steam_all_the_way.lua
Normal file
68
map_gen/maps/crash_site/presets/steam_all_the_way.lua
Normal file
@ -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)
|
@ -0,0 +1 @@
|
||||
return require 'map_gen.maps.crash_site.presets.logistic_network_embargo'
|
1
scenario_templates/crashsite-nobots/map_selection.lua
Normal file
1
scenario_templates/crashsite-nobots/map_selection.lua
Normal file
@ -0,0 +1 @@
|
||||
return require 'map_gen.maps.crash_site.presets.no_bots'
|
@ -0,0 +1 @@
|
||||
return require 'map_gen.maps.crash_site.presets.only_construction_bots'
|
@ -0,0 +1 @@
|
||||
return require 'map_gen.maps.crash_site.presets.only_personal_bots'
|
@ -0,0 +1 @@
|
||||
return require 'map_gen.maps.crash_site.presets.raining_bullets'
|
@ -0,0 +1 @@
|
||||
return require 'map_gen.maps.crash_site.presets.steam_all_the_way'
|
Loading…
Reference in New Issue
Block a user