mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-12 10:04:40 +02:00
Merge pull request #1205 from grilledham/danger_ore_split_ore
Danger ore split
This commit is contained in:
commit
77ffcd626c
@ -2,7 +2,8 @@ local b = require 'map_gen.shared.builders'
|
||||
local value = b.euclidean_value
|
||||
|
||||
return {
|
||||
['iron-ore'] = {
|
||||
{
|
||||
name = 'iron-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2',
|
||||
@ -31,7 +32,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['copper-ore'] = {
|
||||
{
|
||||
name = 'copper-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'red-desert-0',
|
||||
[2] = 'red-desert-1',
|
||||
@ -60,7 +62,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['coal'] = {
|
||||
{
|
||||
name = 'coal',
|
||||
['tiles'] = {
|
||||
[1] = 'dirt-1',
|
||||
[2] = 'dirt-2',
|
||||
@ -92,7 +95,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['stone'] = {
|
||||
{
|
||||
name = 'stone',
|
||||
['tiles'] = {
|
||||
[1] = 'sand-1',
|
||||
[2] = 'sand-2',
|
||||
@ -120,7 +124,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['bauxite-ore'] = {
|
||||
{
|
||||
name = 'bauxite-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2',
|
||||
@ -149,7 +154,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['cobalt-ore'] = {
|
||||
{
|
||||
name = 'cobalt-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'red-desert-0',
|
||||
[2] = 'red-desert-1',
|
||||
@ -178,7 +184,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['gem-ore'] = {
|
||||
{
|
||||
name = 'gem-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'dirt-1',
|
||||
[2] = 'dirt-2',
|
||||
@ -210,7 +217,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['gold-ore'] = {
|
||||
{
|
||||
name = 'gold-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'sand-1',
|
||||
[2] = 'sand-2',
|
||||
@ -238,7 +246,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['lead-ore'] = {
|
||||
{
|
||||
name = 'lead-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2',
|
||||
@ -267,7 +276,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['nickel-ore'] = {
|
||||
{
|
||||
name = 'nickel-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'red-desert-0',
|
||||
[2] = 'red-desert-1',
|
||||
@ -296,7 +306,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['quartz'] = {
|
||||
{
|
||||
name = 'quartz',
|
||||
['tiles'] = {
|
||||
[1] = 'dirt-1',
|
||||
[2] = 'dirt-2',
|
||||
@ -328,7 +339,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['rutile-ore'] = {
|
||||
{
|
||||
name = 'rutile-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'sand-1',
|
||||
[2] = 'sand-2',
|
||||
@ -356,7 +368,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['silver-ore'] = {
|
||||
{
|
||||
name = 'silver-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2',
|
||||
@ -385,7 +398,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['sulfur'] = {
|
||||
{
|
||||
name = 'sulfur',
|
||||
['tiles'] = {
|
||||
[1] = 'red-desert-0',
|
||||
[2] = 'red-desert-1',
|
||||
@ -414,7 +428,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['tin-ore'] = {
|
||||
{
|
||||
name = 'tin-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'dirt-1',
|
||||
[2] = 'dirt-2',
|
||||
@ -446,7 +461,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['tungsten-ore'] = {
|
||||
{
|
||||
name = 'tungsten-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'sand-1',
|
||||
[2] = 'sand-2',
|
||||
@ -474,7 +490,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'zinc-ore', value(0, 0.5)), weight = 3}
|
||||
}
|
||||
},
|
||||
['zinc-ore'] = {
|
||||
{
|
||||
name = 'zinc-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2',
|
||||
|
@ -2,7 +2,8 @@ local b = require 'map_gen.shared.builders'
|
||||
local value = b.euclidean_value
|
||||
|
||||
return {
|
||||
['iron-ore'] = {
|
||||
{
|
||||
name = 'iron-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2',
|
||||
@ -15,7 +16,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'iron-ore', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['copper-ore'] = {
|
||||
{
|
||||
name = 'copper-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'red-desert-0',
|
||||
[2] = 'red-desert-1',
|
||||
@ -28,7 +30,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'copper-ore', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['coal'] = {
|
||||
{
|
||||
name = 'coal',
|
||||
['tiles'] = {
|
||||
[1] = 'dirt-1',
|
||||
[2] = 'dirt-2',
|
||||
@ -44,7 +47,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'coal', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['stone'] = {
|
||||
{
|
||||
name = 'stone',
|
||||
['tiles'] = {
|
||||
[1] = 'sand-1',
|
||||
[2] = 'sand-2',
|
||||
@ -56,7 +60,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'stone', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['bauxite-ore'] = {
|
||||
{
|
||||
name ='bauxite-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2',
|
||||
@ -69,7 +74,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'bauxite-ore', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['cobalt-ore'] = {
|
||||
{
|
||||
name = 'cobalt-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'red-desert-0',
|
||||
[2] = 'red-desert-1',
|
||||
@ -82,7 +88,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'cobalt-ore', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['gem-ore'] = {
|
||||
{
|
||||
name = 'gem-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'dirt-1',
|
||||
[2] = 'dirt-2',
|
||||
@ -98,7 +105,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'gem-ore', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['gold-ore'] = {
|
||||
{
|
||||
name = 'gold-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'sand-1',
|
||||
[2] = 'sand-2',
|
||||
@ -110,7 +118,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'gold-ore', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['lead-ore'] = {
|
||||
{
|
||||
name = 'lead-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2',
|
||||
@ -123,7 +132,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'lead-ore', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['nickel-ore'] = {
|
||||
{
|
||||
name = 'nickel-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'red-desert-0',
|
||||
[2] = 'red-desert-1',
|
||||
@ -136,7 +146,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'nickel-ore', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['quartz'] = {
|
||||
{
|
||||
name = 'quartz',
|
||||
['tiles'] = {
|
||||
[1] = 'dirt-1',
|
||||
[2] = 'dirt-2',
|
||||
@ -152,7 +163,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'quartz', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['rutile-ore'] = {
|
||||
{
|
||||
name = 'rutile-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'sand-1',
|
||||
[2] = 'sand-2',
|
||||
@ -164,7 +176,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'rutile-ore', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['silver-ore'] = {
|
||||
{
|
||||
name = 'silver-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2',
|
||||
@ -177,7 +190,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'silver-ore', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['sulfur'] = {
|
||||
{
|
||||
name = 'sulfur',
|
||||
['tiles'] = {
|
||||
[1] = 'red-desert-0',
|
||||
[2] = 'red-desert-1',
|
||||
@ -190,7 +204,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'sulfur', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['tin-ore'] = {
|
||||
{
|
||||
name = 'tin-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'dirt-1',
|
||||
[2] = 'dirt-2',
|
||||
@ -206,7 +221,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'tin-ore', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['tungsten-ore'] = {
|
||||
{
|
||||
name = 'tungsten-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'sand-1',
|
||||
[2] = 'sand-2',
|
||||
@ -218,7 +234,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'tungsten-ore', value(0, 0.5)), weight = 120}
|
||||
}
|
||||
},
|
||||
['zinc-ore'] = {
|
||||
{
|
||||
name = 'zinc-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2',
|
||||
|
@ -5,8 +5,9 @@ local ratio_mixed = 80 -- % purity in the ore
|
||||
local main_value = value(0, 0.5)
|
||||
|
||||
local ores = {
|
||||
['angels-ore1'] = {
|
||||
{
|
||||
-- Saphirite
|
||||
name = 'angels-ore1',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2',
|
||||
@ -17,8 +18,9 @@ local ores = {
|
||||
['weight'] = 15,
|
||||
['ratios'] = {}
|
||||
},
|
||||
['angels-ore2'] = {
|
||||
{
|
||||
-- Jivolite
|
||||
name = 'angels-ore2',
|
||||
['tiles'] = {
|
||||
[1] = 'dirt-1',
|
||||
[2] = 'dirt-2',
|
||||
@ -28,8 +30,9 @@ local ores = {
|
||||
['weight'] = 10,
|
||||
['ratios'] = {}
|
||||
},
|
||||
['angels-ore3'] = {
|
||||
{
|
||||
-- Stiratite
|
||||
name = 'angels-ore3',
|
||||
['tiles'] = {
|
||||
[1] = 'red-desert-0',
|
||||
[2] = 'red-desert-1',
|
||||
@ -40,8 +43,9 @@ local ores = {
|
||||
['weight'] = 10,
|
||||
['ratios'] = {}
|
||||
},
|
||||
['angels-ore4'] = {
|
||||
{
|
||||
-- crotinnium
|
||||
name = 'angels-ore4',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-3',
|
||||
[2] = 'grass-4'
|
||||
@ -50,8 +54,9 @@ local ores = {
|
||||
['weight'] = 10,
|
||||
['ratios'] = {}
|
||||
},
|
||||
['angels-ore5'] = {
|
||||
{
|
||||
-- rubyte
|
||||
name = 'angels-ore5',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2'
|
||||
@ -60,8 +65,9 @@ local ores = {
|
||||
['weight'] = 10,
|
||||
['ratios'] = {}
|
||||
},
|
||||
['angels-ore6'] = {
|
||||
{
|
||||
-- bobmonium-ore
|
||||
name = 'angels-ore6',
|
||||
['tiles'] = {
|
||||
[1] = 'sand-1',
|
||||
[2] = 'sand-2',
|
||||
@ -71,7 +77,8 @@ local ores = {
|
||||
['weight'] = 10,
|
||||
['ratios'] = {}
|
||||
},
|
||||
['coal'] = {
|
||||
{
|
||||
name = 'coal',
|
||||
['tiles'] = {
|
||||
[1] = 'dirt-5',
|
||||
[2] = 'dirt-6',
|
||||
@ -83,7 +90,8 @@ local ores = {
|
||||
}
|
||||
}
|
||||
|
||||
for ore_name, ore_data in pairs(ores) do
|
||||
for _, ore_data in pairs(ores) do
|
||||
local ore_name = ore_data.ore_name
|
||||
local ratios = {
|
||||
{resource = b.resource(b.full_shape, ore_name, main_value), weight = ratio_mixed}
|
||||
}
|
||||
|
@ -2,8 +2,9 @@ local b = require 'map_gen.shared.builders'
|
||||
local value = b.euclidean_value
|
||||
|
||||
return {
|
||||
['angels-ore1'] = {
|
||||
{
|
||||
-- Saphirite
|
||||
name = 'angels-ore1',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2',
|
||||
@ -16,8 +17,9 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'angels-ore1', value(0, 0.5)), weight = 1}
|
||||
}
|
||||
},
|
||||
['angels-ore2'] = {
|
||||
{
|
||||
-- Jivolite
|
||||
name = 'angels-ore2',
|
||||
['tiles'] = {
|
||||
[1] = 'dirt-1',
|
||||
[2] = 'dirt-2',
|
||||
@ -29,8 +31,9 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'angels-ore2', value(0, 0.5)), weight = 1}
|
||||
}
|
||||
},
|
||||
['angels-ore3'] = {
|
||||
{
|
||||
-- Stiratite
|
||||
name = 'angels-ore3',
|
||||
['tiles'] = {
|
||||
[1] = 'red-desert-0',
|
||||
[2] = 'red-desert-1',
|
||||
@ -43,8 +46,9 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'angels-ore3', value(0, 0.5)), weight = 1}
|
||||
}
|
||||
},
|
||||
['angels-ore4'] = {
|
||||
{
|
||||
-- crotinnium
|
||||
name = 'angels-ore4',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-3',
|
||||
[2] = 'grass-4'
|
||||
@ -55,8 +59,9 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'angels-ore4', value(0, 0.5)), weight = 1}
|
||||
}
|
||||
},
|
||||
['angels-ore5'] = {
|
||||
{
|
||||
-- rubyte
|
||||
name = 'angels-ore5',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2'
|
||||
@ -67,8 +72,9 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'angels-ore5', value(0, 0.5)), weight = 1}
|
||||
}
|
||||
},
|
||||
['angels-ore6'] = {
|
||||
{
|
||||
-- bobmonium-ore
|
||||
name = 'angels-ore6',
|
||||
['tiles'] = {
|
||||
[1] = 'sand-1',
|
||||
[2] = 'sand-2',
|
||||
@ -80,7 +86,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'angels-ore6', value(0, 0.5)), weight = 1}
|
||||
}
|
||||
},
|
||||
['coal'] = {
|
||||
{
|
||||
name = 'coal',
|
||||
['tiles'] = {
|
||||
[1] = 'dirt-5',
|
||||
[2] = 'dirt-6',
|
||||
|
@ -2,7 +2,8 @@ local b = require 'map_gen.shared.builders'
|
||||
|
||||
local value = b.euclidean_value
|
||||
return {
|
||||
['iron-ore'] = {
|
||||
{
|
||||
name = 'iron-ore',
|
||||
tiles = {'grass-1', 'grass-2', 'grass-3', 'grass-4'},
|
||||
start = value(50, 0),
|
||||
shape = b.resource(b.full_shape, 'iron-ore', value(0, 0.75)),
|
||||
@ -10,7 +11,8 @@ return {
|
||||
return 4 * (v ^ 4) + 0.25
|
||||
end
|
||||
},
|
||||
['copper-ore'] = {
|
||||
{
|
||||
name = 'copper-ore',
|
||||
tiles = {'red-desert-0', 'red-desert-1', 'red-desert-2', 'red-desert-3'},
|
||||
start = value(50, 0),
|
||||
shape = b.resource(b.full_shape, 'copper-ore', value(0, 0.75)),
|
||||
@ -18,7 +20,8 @@ return {
|
||||
return 3 * (v ^ 4) + 0.2
|
||||
end
|
||||
},
|
||||
['coal'] = {
|
||||
{
|
||||
name = 'coal',
|
||||
tiles = {'dirt-1', 'dirt-2', 'dirt-3', 'dirt-4', 'dirt-5', 'dirt-6', 'dirt-7'},
|
||||
start = value(50, 0),
|
||||
shape = b.resource(b.full_shape, 'coal', value(0, 0.75)),
|
||||
@ -26,7 +29,8 @@ return {
|
||||
return 2.5 * (v ^ 6) + 0.2
|
||||
end
|
||||
},
|
||||
['stone'] = {
|
||||
{
|
||||
name = 'stone',
|
||||
tiles = {'sand-1', 'sand-2', 'sand-3'},
|
||||
start = value(50, 0),
|
||||
shape = b.resource(b.full_shape, 'stone', value(0, 0.75)),
|
||||
|
@ -1,44 +0,0 @@
|
||||
local b = require 'map_gen.shared.builders'
|
||||
local value = b.euclidean_value
|
||||
|
||||
return {
|
||||
['copper-ore'] = {
|
||||
['tiles'] = {
|
||||
[1] = 'landfill'
|
||||
},
|
||||
['start'] = value(50, 0),
|
||||
['weight'] = 1,
|
||||
['ratios'] = {
|
||||
{resource = b.resource(b.full_shape, 'iron-ore', value(0, 0.75)), weight = 15},
|
||||
{resource = b.resource(b.full_shape, 'copper-ore', value(0, 0.75)), weight = 72},
|
||||
{resource = b.resource(b.full_shape, 'stone', value(0, 0.75)), weight = 6},
|
||||
{resource = b.resource(b.full_shape, 'coal', value(0, 0.75)), weight = 7}
|
||||
}
|
||||
},
|
||||
['coal'] = {
|
||||
['tiles'] = {
|
||||
[1] = 'landfill'
|
||||
},
|
||||
['start'] = value(50, 0),
|
||||
['weight'] = 1,
|
||||
['ratios'] = {
|
||||
{resource = b.resource(b.full_shape, 'iron-ore', value(0, 0.75)), weight = 21},
|
||||
{resource = b.resource(b.full_shape, 'copper-ore', value(0, 0.75)), weight = 8},
|
||||
{resource = b.resource(b.full_shape, 'stone', value(0, 0.75)), weight = 6},
|
||||
{resource = b.resource(b.full_shape, 'coal', value(0, 0.75)), weight = 65}
|
||||
}
|
||||
},
|
||||
['iron-ore'] = {
|
||||
['tiles'] = {
|
||||
[1] = 'landfill'
|
||||
},
|
||||
['start'] = value(50, 0),
|
||||
['weight'] = 1,
|
||||
['ratios'] = {
|
||||
{resource = b.resource(b.full_shape, 'iron-ore', value(0, 0.75)), weight = 72},
|
||||
{resource = b.resource(b.full_shape, 'copper-ore', value(0, 0.75)), weight = 15},
|
||||
{resource = b.resource(b.full_shape, 'stone', value(0, 0.75)), weight = 6},
|
||||
{resource = b.resource(b.full_shape, 'coal', value(0, 0.75)), weight = 7}
|
||||
}
|
||||
}
|
||||
}
|
@ -2,7 +2,8 @@ local b = require 'map_gen.shared.builders'
|
||||
local value = b.euclidean_value
|
||||
|
||||
return {
|
||||
['copper-ore'] = {
|
||||
{
|
||||
name = 'copper-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'red-desert-0',
|
||||
[2] = 'red-desert-1',
|
||||
@ -18,7 +19,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'coal', value(0, 0.75)), weight = 7}
|
||||
}
|
||||
},
|
||||
['coal'] = {
|
||||
{
|
||||
name = 'coal',
|
||||
['tiles'] = {
|
||||
[1] = 'dirt-1',
|
||||
[2] = 'dirt-2',
|
||||
@ -37,7 +39,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'coal', value(0, 0.75)), weight = 65}
|
||||
}
|
||||
},
|
||||
['iron-ore'] = {
|
||||
{
|
||||
name = 'iron-ore',
|
||||
['tiles'] = {
|
||||
[1] = 'grass-1',
|
||||
[2] = 'grass-2',
|
||||
@ -53,7 +56,8 @@ return {
|
||||
{resource = b.resource(b.full_shape, 'coal', value(0, 0.75)), weight = 7}
|
||||
}
|
||||
},
|
||||
--[[ ['stone'] = {
|
||||
--[[ {
|
||||
name = 'stone',
|
||||
['tiles'] = {
|
||||
[1] = 'sand-1',
|
||||
[2] = 'sand-2',
|
||||
|
14
map_gen/maps/danger_ores/modules/helper.lua
Normal file
14
map_gen/maps/danger_ores/modules/helper.lua
Normal file
@ -0,0 +1,14 @@
|
||||
local Public = {}
|
||||
|
||||
function Public.split_ore(ores, split_count)
|
||||
local new_ores = {}
|
||||
for _ = 1, split_count do
|
||||
for _, ore in pairs(ores) do
|
||||
new_ores[#new_ores + 1] = ore
|
||||
end
|
||||
end
|
||||
|
||||
return new_ores
|
||||
end
|
||||
|
||||
return Public
|
@ -1,3 +1,4 @@
|
||||
local Helper = require 'map_gen.maps.danger_ores.modules.helper'
|
||||
local b = require 'map_gen.shared.builders'
|
||||
local table = require 'utils.table'
|
||||
|
||||
@ -5,11 +6,15 @@ return function(config)
|
||||
local main_ores = config.main_ores
|
||||
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
|
||||
|
||||
main_ores = Helper.split_ore(main_ores, main_ores_split_count)
|
||||
|
||||
return function(tile_builder, ore_builder, spawn_shape, water_shape, random_gen)
|
||||
local shapes = {}
|
||||
|
||||
for ore_name, ore_data in pairs(main_ores) do
|
||||
for _, ore_data in pairs(main_ores) do
|
||||
local ore_name = ore_data.name
|
||||
local tiles = ore_data.tiles
|
||||
local land = tile_builder(tiles)
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
local Helper = require 'map_gen.maps.danger_ores.modules.helper'
|
||||
local b = require 'map_gen.shared.builders'
|
||||
local table = require 'utils.table'
|
||||
|
||||
@ -10,6 +11,9 @@ return function(config)
|
||||
local main_ores_rotate = config.main_ores_rotate or 0
|
||||
local resource_patches = (config.resource_patches or no_op)(config) or b.empty_shape
|
||||
local dense_patches = (config.dense_patches or no_op)(config) or no_op
|
||||
local main_ores_split_count = config.main_ores_split_count or 1
|
||||
|
||||
main_ores = Helper.split_ore(main_ores, main_ores_split_count)
|
||||
|
||||
local start_ore_shape = config.start_ore_shape or b.circle(68)
|
||||
|
||||
@ -26,22 +30,16 @@ return function(config)
|
||||
end
|
||||
|
||||
return function(tile_builder, _, spawn_shape, water_shape, random_gen)
|
||||
local pattern = {}
|
||||
for ore_name, data in pairs(main_ores) do
|
||||
pattern[#pattern + 1] = {ore_name = ore_name, data = data}
|
||||
end
|
||||
|
||||
if shuffle_order then
|
||||
table.shuffle_table(pattern, random_gen)
|
||||
table.shuffle_table(main_ores, random_gen)
|
||||
end
|
||||
|
||||
local start_ore_shapes = {}
|
||||
local ore_pattern = {}
|
||||
for _, value in pairs(pattern) do
|
||||
local ore_name = value.ore_name
|
||||
local data = value.data
|
||||
start_ore_shapes[#start_ore_shapes + 1] = b.resource(b.full_shape, ore_name, data.start)
|
||||
ore_pattern[#ore_pattern + 1] = data
|
||||
for _, ore_data in pairs(main_ores) do
|
||||
local ore_name = ore_data.name
|
||||
start_ore_shapes[#start_ore_shapes + 1] = b.resource(b.full_shape, ore_name, ore_data.start)
|
||||
ore_pattern[#ore_pattern + 1] = ore_data
|
||||
end
|
||||
|
||||
local land = tile_builder({'grass-1', 'grass-2', 'grass-3', 'grass-4'})
|
||||
|
@ -1,3 +1,4 @@
|
||||
local Helper = require 'map_gen.maps.danger_ores.modules.helper'
|
||||
local b = require 'map_gen.shared.builders'
|
||||
local table = require 'utils.table'
|
||||
|
||||
@ -5,11 +6,15 @@ return function(config)
|
||||
local main_ores = config.main_ores
|
||||
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
|
||||
|
||||
main_ores = Helper.split_ore(main_ores, main_ores_split_count)
|
||||
|
||||
return function(tile_builder, ore_builder, spawn_shape, water_shape, random_gen)
|
||||
local shapes = {}
|
||||
|
||||
for ore_name, ore_data in pairs(main_ores) do
|
||||
for _, ore_data in pairs(main_ores) do
|
||||
local ore_name = ore_data.name
|
||||
local tiles = ore_data.tiles
|
||||
local land = tile_builder(tiles)
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
local Helper = require 'map_gen.maps.danger_ores.modules.helper'
|
||||
local b = require 'map_gen.shared.builders'
|
||||
local table = require 'utils.table'
|
||||
|
||||
@ -5,11 +6,15 @@ return function(config)
|
||||
local main_ores = config.main_ores
|
||||
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
|
||||
|
||||
main_ores = Helper.split_ore(main_ores, main_ores_split_count)
|
||||
|
||||
return function(tile_builder, ore_builder, spawn_shape, water_shape, random_gen)
|
||||
local shapes = {}
|
||||
|
||||
for ore_name, ore_data in pairs(main_ores) do
|
||||
for _, ore_data in pairs(main_ores) do
|
||||
local ore_name = ore_data.name
|
||||
local tiles = ore_data.tiles
|
||||
local land = tile_builder(tiles)
|
||||
|
||||
|
@ -52,7 +52,7 @@ ScenarioInfo.set_new_info([[
|
||||
]])
|
||||
|
||||
local map = require 'map_gen.maps.danger_ores.modules.map'
|
||||
local main_ores_config = require 'map_gen.maps.danger_ores.config.vanilla_ore_landfill'
|
||||
local main_ores_config = require 'map_gen.maps.danger_ores.config.vanilla_ore'
|
||||
local resource_patches = require 'map_gen.maps.danger_ores.modules.resource_patches'
|
||||
local resource_patches_config = require 'map_gen.maps.danger_ores.config.vanilla_resource_patches'
|
||||
local trees = require 'map_gen.maps.danger_ores.modules.trees'
|
||||
|
@ -52,7 +52,7 @@ ScenarioInfo.set_new_info([[
|
||||
]])
|
||||
|
||||
local map = require 'map_gen.maps.danger_ores.modules.map'
|
||||
local main_ores_config = require 'map_gen.maps.danger_ores.config.vanilla_ore_landfill'
|
||||
local main_ores_config = require 'map_gen.maps.danger_ores.config.vanilla_ores'
|
||||
local resource_patches = require 'map_gen.maps.danger_ores.modules.resource_patches'
|
||||
local resource_patches_config = require 'map_gen.maps.danger_ores.config.vanilla_resource_patches'
|
||||
local trees = require 'map_gen.maps.danger_ores.modules.trees'
|
||||
|
144
map_gen/maps/danger_ores/presets/danger_ore_split.lua
Normal file
144
map_gen/maps/danger_ores/presets/danger_ore_split.lua
Normal file
@ -0,0 +1,144 @@
|
||||
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 Split')
|
||||
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 multiple 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.
|
||||
]])
|
||||
|
||||
local map = require 'map_gen.maps.danger_ores.modules.map'
|
||||
local main_ores_config = require 'map_gen.maps.danger_ores.config.vanilla_ores'
|
||||
local resource_patches = require 'map_gen.maps.danger_ores.modules.resource_patches'
|
||||
local resource_patches_config = require 'map_gen.maps.danger_ores.config.vanilla_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.vanilla_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
|
||||
})
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
Event.on_init(function()
|
||||
game.draw_resource_selection = false
|
||||
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 = 25
|
||||
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
|
||||
|
||||
RS.get_surface().always_day = true
|
||||
end)
|
||||
|
||||
local terraforming = require 'map_gen.maps.danger_ores.modules.terraforming'
|
||||
terraforming({start_size = 8 * 32, min_pollution = 400, max_pollution = 16000, pollution_increment = 4})
|
||||
|
||||
local rocket_launched = require 'map_gen.maps.danger_ores.modules.rocket_launched_simple'
|
||||
rocket_launched({win_satellite_count = 500})
|
||||
|
||||
local restart_command = require 'map_gen.maps.danger_ores.modules.restart_command'
|
||||
restart_command({scenario_name = 'danger-ore-next'})
|
||||
|
||||
local container_dump = require 'map_gen.maps.danger_ores.modules.container_dump'
|
||||
container_dump({entity_name = 'coal'})
|
||||
|
||||
local config = {
|
||||
spawn_shape = b.circle(64),
|
||||
start_ore_shape = b.circle(68),
|
||||
main_ores = main_ores_config,
|
||||
main_ores_shuffle_order = false,
|
||||
main_ores_rotate = 0,
|
||||
main_ores_split_count = 4,
|
||||
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.4,
|
||||
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)
|
@ -80,7 +80,7 @@ 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
|
||||
offline_timout_mins = 30 -- time after which a player logs off that their inventory is provided to the team
|
||||
}
|
||||
|
||||
Event.on_init(function()
|
||||
|
@ -1 +1 @@
|
||||
return require 'map_gen.maps.danger_ores.presets.danger_ore_normal_science'
|
||||
return require 'map_gen.maps.danger_ores.presets.danger_ore_split'
|
1
scenario_templates/danger-ore-split/map_selection.lua
Normal file
1
scenario_templates/danger-ore-split/map_selection.lua
Normal file
@ -0,0 +1 @@
|
||||
return require 'map_gen.maps.danger_ores.presets.danger_ore_split'
|
Loading…
Reference in New Issue
Block a user