mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-28 03:57:22 +02:00
Mtn v3 - minor changes
This commit is contained in:
parent
b5085d6ee0
commit
a74de86aa6
@ -117,7 +117,7 @@ function Public.reset_main_table()
|
||||
this.gap_between_locomotive = {
|
||||
hinders = {},
|
||||
gap = 900,
|
||||
neg_gap = -2112,
|
||||
neg_gap = -3520, -- earlier 2112 (3 zones, whereas 704 is one zone)
|
||||
highest_pos = nil
|
||||
}
|
||||
this.force_chunk = false
|
||||
|
@ -198,14 +198,11 @@ local function generate_with_tags_and_weights(variants)
|
||||
end
|
||||
end
|
||||
|
||||
:: chosen_found ::
|
||||
::chosen_found::
|
||||
|
||||
for _, variant in pairs(variants) do
|
||||
if variant.inner_weight < variant.weight then
|
||||
variant.inner_weight = math.min(
|
||||
variant.weight,
|
||||
math.floor(variant.inner_weight + variant.weight / #variants)
|
||||
)
|
||||
variant.inner_weight = math.min(variant.weight, math.floor(variant.inner_weight + variant.weight / #variants))
|
||||
end
|
||||
end
|
||||
|
||||
@ -2614,22 +2611,22 @@ local function starting_zone(x, y, data, void_or_lab, adjusted_zones)
|
||||
end
|
||||
|
||||
local zones = {
|
||||
zone_1 = { fn = zone_1, weight = 100, tags = { 'void' } },
|
||||
zone_2 = { fn = zone_2, weight = 100, tags = { 'void' } },
|
||||
zone_3 = { fn = zone_3, weight = 100, tags = { 'void' } },
|
||||
zone_4 = { fn = zone_4, weight = 100, tags = { 'void' } },
|
||||
zone_5 = { fn = zone_5, weight = 100, tags = { 'void' } },
|
||||
zone_forest_1 = { fn = zone_forest_1, weight = 100, tags = { 'forest' } },
|
||||
zone_forest_2 = { fn = zone_forest_2, weight = 100, tags = { 'forest' } },
|
||||
zone_scrap_1 = { fn = zone_scrap_1, weight = 100, tags = { 'void' } },
|
||||
zone_scrap_2 = { fn = zone_scrap_2, weight = 100, tags = { 'void' } },
|
||||
zone_7 = { fn = zone_7, weight = 100, tags = { 'void' } },
|
||||
zone_9 = { fn = zone_9, weight = 100, tags = { } },
|
||||
zone_10 = { fn = zone_10, weight = 100, tags = { } },
|
||||
zone_11 = { fn = zone_11, weight = 100, tags = { } },
|
||||
zone_12 = { fn = zone_12, weight = 100, tags = { } },
|
||||
zone_13 = { fn = zone_13, weight = 100, tags = { } },
|
||||
zone_14 = { fn = zone_14, weight = 100, tags = { } }
|
||||
zone_1 = {fn = zone_1, weight = 100, tags = {'default'}},
|
||||
zone_2 = {fn = zone_2, weight = 100, tags = {'default'}},
|
||||
zone_3 = {fn = zone_3, weight = 100, tags = {'default'}},
|
||||
zone_4 = {fn = zone_4, weight = 100, tags = {'default'}},
|
||||
zone_5 = {fn = zone_5, weight = 100, tags = {'default'}},
|
||||
zone_forest_1 = {fn = zone_forest_1, weight = 100, tags = {'forest'}},
|
||||
zone_forest_2 = {fn = zone_forest_2, weight = 100, tags = {'forest'}},
|
||||
zone_scrap_1 = {fn = zone_scrap_1, weight = 100, tags = {'scrap'}},
|
||||
zone_scrap_2 = {fn = zone_scrap_2, weight = 100, tags = {'scrap'}},
|
||||
zone_7 = {fn = zone_7, weight = 100, tags = {'default'}},
|
||||
zone_9 = {fn = zone_9, weight = 100, tags = {'default'}},
|
||||
zone_10 = {fn = zone_10, weight = 100, tags = {'forest'}},
|
||||
zone_11 = {fn = zone_11, weight = 100, tags = {'default'}},
|
||||
zone_12 = {fn = zone_12, weight = 100, tags = {'default'}},
|
||||
zone_13 = {fn = zone_13, weight = 100, tags = {'default'}},
|
||||
zone_14 = {fn = zone_14, weight = 100, tags = {'forest'}}
|
||||
}
|
||||
|
||||
local function shuffle_terrains(adjusted_zones, new_zone)
|
||||
@ -2658,11 +2655,14 @@ local function init_terrain(adjusted_zones)
|
||||
|
||||
local zones_to_generate = {}
|
||||
for zone_name, zone_data in pairs(zones) do
|
||||
table.insert(zones_to_generate, {
|
||||
value = zone_name,
|
||||
tags = zone_data.tags,
|
||||
weight = zone_data.weight
|
||||
})
|
||||
table.insert(
|
||||
zones_to_generate,
|
||||
{
|
||||
value = zone_name,
|
||||
tags = zone_data.tags,
|
||||
weight = zone_data.weight
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
local generated_zones = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user