Skip to content

Commit 98e4fc5

Browse files
authored
Add Danger Ore Extra. (#1253)
1 parent 155b116 commit 98e4fc5

2 files changed

Lines changed: 152 additions & 0 deletions

File tree

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
local RS = require 'map_gen.shared.redmew_surface'
2+
local MGSP = require 'resources.map_gen_settings'
3+
local Event = require 'utils.event'
4+
local b = require 'map_gen.shared.builders'
5+
local Config = require 'config'
6+
7+
local ScenarioInfo = require 'features.gui.info'
8+
ScenarioInfo.set_map_name('Danger Ore Extra')
9+
ScenarioInfo.set_map_description([[
10+
Clear the ore to expand the base,
11+
focus mining efforts on specific sectors to ensure
12+
proper material ratios, expand the map with pollution!
13+
]])
14+
ScenarioInfo.add_map_extra_info([[
15+
This map is split in three sectors [item=iron-ore] [item=copper-ore] [item=coal].
16+
Each sector has a main resource and the other resources at a lower ratio.
17+
18+
You may not build the factory on ore patches. Exceptions:
19+
[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]
20+
[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]
21+
22+
The map size is restricted to the pollution generated. A significant amount of
23+
pollution must affect a section of the map before it is revealed. Pollution
24+
does not affect biter evolution.]])
25+
26+
ScenarioInfo.set_new_info([[
27+
2019-04-24:
28+
- Stone ore density reduced by 1/2
29+
- Ore quadrants randomized
30+
- Increased time factor of biter evolution from 5 to 7
31+
- Added win conditions (+5% evolution every 5 rockets until 100%, +100 rockets until biters are wiped)
32+
33+
2019-03-30:
34+
- Uranium ore patch threshold increased slightly
35+
- Bug fix: Cars and tanks can now be placed onto ore!
36+
- Starting minimum pollution to expand map set to 650
37+
View current pollution via Debug Settings [F4] show-pollution-values,
38+
then open map and turn on pollution via the red box.
39+
- Starting water at spawn increased from radius 8 to radius 16 circle.
40+
41+
2019-03-27:
42+
- Ore arranged into quadrants to allow for more controlled resource gathering.
43+
44+
2020-09-02:
45+
- Destroyed chests dump their content as coal ore.
46+
47+
2020-12-28:
48+
- Changed win condition. First satellite kills all biters, launch 500 to win the map.
49+
50+
2021-04-06:
51+
- Rail signals and train stations now allowed on ore.
52+
]])
53+
54+
local map = require 'map_gen.maps.danger_ores.modules.map'
55+
local main_ores_config = require 'map_gen.maps.danger_ores.config.vanilla_ores'
56+
local resource_patches = require 'map_gen.maps.danger_ores.modules.resource_patches'
57+
local resource_patches_config = require 'map_gen.maps.danger_ores.config.vanilla_resource_patches'
58+
local water = require 'map_gen.maps.danger_ores.modules.water'
59+
local trees = require 'map_gen.maps.danger_ores.modules.trees'
60+
local enemy = require 'map_gen.maps.danger_ores.modules.enemy'
61+
--local dense_patches = require 'map_gen.maps.danger_ores.modules.dense_patches'
62+
63+
local banned_entities = require 'map_gen.maps.danger_ores.modules.banned_entities'
64+
local allowed_entities = require 'map_gen.maps.danger_ores.config.vanilla_allowed_entities'
65+
banned_entities(allowed_entities)
66+
67+
RS.set_map_gen_settings({
68+
MGSP.grass_only,
69+
MGSP.enable_water,
70+
{terrain_segmentation = 'normal', water = 'normal'},
71+
MGSP.starting_area_very_low,
72+
MGSP.ore_oil_none,
73+
MGSP.enemy_none,
74+
MGSP.cliff_none,
75+
MGSP.tree_none
76+
})
77+
78+
Config.market.enabled = false
79+
Config.player_rewards.enabled = false
80+
Config.player_create.starting_items = {}
81+
Config.dump_offline_inventories = {
82+
enabled = true,
83+
offline_timout_mins = 30 -- time after which a player logs off that their inventory is provided to the team
84+
}
85+
Config.paint.enabled = false
86+
87+
Event.on_init(function()
88+
game.draw_resource_selection = false
89+
game.forces.player.technologies['mining-productivity-1'].enabled = false
90+
game.forces.player.technologies['mining-productivity-2'].enabled = false
91+
game.forces.player.technologies['mining-productivity-3'].enabled = false
92+
game.forces.player.technologies['mining-productivity-4'].enabled = false
93+
94+
game.difficulty_settings.technology_price_multiplier = 33
95+
game.forces.player.technologies.logistics.researched = true
96+
game.forces.player.technologies.automation.researched = true
97+
98+
game.map_settings.enemy_evolution.time_factor = 0.000007 -- default 0.000004
99+
game.map_settings.enemy_evolution.destroy_factor = 0.000010 -- default 0.002
100+
game.map_settings.enemy_evolution.pollution_factor = 0.000000 -- Pollution has no affect on evolution default 0.0000009
101+
102+
game.forces.player.manual_mining_speed_modifier = 1
103+
104+
RS.get_surface().always_day = true
105+
RS.get_surface().peaceful_mode = true
106+
end)
107+
108+
local terraforming = require 'map_gen.maps.danger_ores.modules.terraforming'
109+
terraforming({start_size = 8 * 32, min_pollution = 400, max_pollution = 16000, pollution_increment = 4})
110+
111+
local rocket_launched = require 'map_gen.maps.danger_ores.modules.rocket_launched_simple'
112+
rocket_launched({win_satellite_count = 750})
113+
114+
local restart_command = require 'map_gen.maps.danger_ores.modules.restart_command'
115+
restart_command({scenario_name = 'danger-ore-extra'})
116+
117+
local container_dump = require 'map_gen.maps.danger_ores.modules.container_dump'
118+
container_dump({entity_name = 'coal'})
119+
120+
local concrete_on_landfill = require 'map_gen.maps.danger_ores.modules.concrete_on_landfill'
121+
concrete_on_landfill({tile = 'blue-refined-concrete'})
122+
123+
local config = {
124+
spawn_shape = b.circle(36),
125+
start_ore_shape = b.circle(44),
126+
no_resource_patch_shape = b.circle(80),
127+
main_ores = main_ores_config,
128+
main_ores_shuffle_order = true,
129+
main_ores_rotate = 30,
130+
resource_patches = resource_patches,
131+
resource_patches_config = resource_patches_config,
132+
water = water,
133+
water_scale = 1 / 96,
134+
water_threshold = 0.4,
135+
deepwater_threshold = 0.45,
136+
trees = trees,
137+
trees_scale = 1 / 64,
138+
trees_threshold = 0.4,
139+
trees_chance = 0.875,
140+
enemy = enemy,
141+
enemy_factor = 10 / (768 * 32),
142+
enemy_max_chance = 1 / 6,
143+
enemy_scale_factor = 32,
144+
fish_spawn_rate = 0.025,
145+
--dense_patches = dense_patches,
146+
dense_patches_scale = 1 / 48,
147+
dense_patches_threshold = 0.55,
148+
dense_patches_multiplier = 25
149+
}
150+
151+
return map(config)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
return require 'map_gen.maps.danger_ores.presets.danger_ore_extra'

0 commit comments

Comments
 (0)