1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-03 22:52:13 +02:00

Add danger ore map poll. (#1286)

This commit is contained in:
grilledham 2022-01-29 16:12:49 +00:00 committed by GitHub
parent 04856c9ffe
commit 2181981215
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,37 @@
local Poll = require 'features.gui.poll'
local Global = require 'utils.global'
local Event = require 'utils.event'
local Server = require 'features.server'
local data = {created = false}
Global.register(data, function(tbl)
data = tbl
end)
Event.add(Server.events.on_server_started, function()
if data.created then
return
end
data.created = true
Poll.poll({
question = 'Next map? (Advisory only)',
duration = 0,
answers = {
'terraforming (default)',
'one direction (line)',
'3-way (T shape)',
'chessboard (random ratios)',
'chessboard uniform (fixed ratios)',
'circles (ore rings)',
'gradient (smooth ore ratios)',
'hub-spiral (with void)',
'spiral (without void)',
'landfill (all tiles)',
'patches (ore islands in coal)',
'xmas tree (triangle)'
}
})
end)

View File

@ -138,6 +138,8 @@ concrete_on_landfill({tile = 'blue-refined-concrete'})
local remove_non_ore_stacked_recipes = require 'map_gen.maps.danger_ores.modules.remove_non_ore_stacked_recipes'
remove_non_ore_stacked_recipes()
require 'map_gen.maps.danger_ores.modules.map_poll'
local main_ores_builder = require 'map_gen.maps.danger_ores.modules.main_ores_3way'
local config = {

View File

@ -125,6 +125,8 @@ concrete_on_landfill({tile = 'blue-refined-concrete'})
local remove_non_ore_stacked_recipes = require 'map_gen.maps.danger_ores.modules.remove_non_ore_stacked_recipes'
remove_non_ore_stacked_recipes()
require 'map_gen.maps.danger_ores.modules.map_poll'
local main_ores_builder = require 'map_gen.maps.danger_ores.modules.main_ores_chessboard'
local config = {

View File

@ -125,6 +125,8 @@ concrete_on_landfill({tile = 'blue-refined-concrete'})
local remove_non_ore_stacked_recipes = require 'map_gen.maps.danger_ores.modules.remove_non_ore_stacked_recipes'
remove_non_ore_stacked_recipes()
require 'map_gen.maps.danger_ores.modules.map_poll'
local main_ores_builder = require 'map_gen.maps.danger_ores.modules.main_ores_circles'
local config = {

View File

@ -127,6 +127,8 @@ concrete_on_landfill({tile = 'blue-refined-concrete'})
local remove_non_ore_stacked_recipes = require 'map_gen.maps.danger_ores.modules.remove_non_ore_stacked_recipes'
remove_non_ore_stacked_recipes()
require 'map_gen.maps.danger_ores.modules.map_poll'
local config = {
spawn_shape = b.circle(36),
start_ore_shape = b.circle(44),

View File

@ -125,6 +125,8 @@ concrete_on_landfill({tile = 'blue-refined-concrete'})
local remove_non_ore_stacked_recipes = require 'map_gen.maps.danger_ores.modules.remove_non_ore_stacked_recipes'
remove_non_ore_stacked_recipes()
require 'map_gen.maps.danger_ores.modules.map_poll'
local main_ores_builder = require 'map_gen.maps.danger_ores.modules.main_ores_gradient'
local config = {

View File

@ -132,6 +132,8 @@ concrete_on_landfill({tile = 'blue-refined-concrete'})
local remove_non_ore_stacked_recipes = require 'map_gen.maps.danger_ores.modules.remove_non_ore_stacked_recipes'
remove_non_ore_stacked_recipes()
require 'map_gen.maps.danger_ores.modules.map_poll'
local main_ores_builder = require 'map_gen.maps.danger_ores.modules.main_ores_hub_spiral'
local sqrt = math.sqrt

View File

@ -135,6 +135,8 @@ concrete_on_landfill({tile = 'blue-refined-concrete'})
local remove_non_ore_stacked_recipes = require 'map_gen.maps.danger_ores.modules.remove_non_ore_stacked_recipes'
remove_non_ore_stacked_recipes()
require 'map_gen.maps.danger_ores.modules.map_poll'
local main_ores_builder = require 'map_gen.maps.danger_ores.modules.main_ores_one_direction'
local function post_map_func(map_shape)

View File

@ -126,6 +126,8 @@ concrete_on_landfill({tile = 'blue-refined-concrete'})
local remove_non_ore_stacked_recipes = require 'map_gen.maps.danger_ores.modules.remove_non_ore_stacked_recipes'
remove_non_ore_stacked_recipes()
require 'map_gen.maps.danger_ores.modules.map_poll'
local main_ores_builder = require 'map_gen.maps.danger_ores.modules.main_ores_patches'
local config = {

View File

@ -131,6 +131,8 @@ concrete_on_landfill({tile = 'blue-refined-concrete'})
local remove_non_ore_stacked_recipes = require 'map_gen.maps.danger_ores.modules.remove_non_ore_stacked_recipes'
remove_non_ore_stacked_recipes()
require 'map_gen.maps.danger_ores.modules.map_poll'
local main_ores_builder = require 'map_gen.maps.danger_ores.modules.main_ores_spiral'
local config = {

View File

@ -136,6 +136,8 @@ concrete_on_landfill({tile = 'blue-refined-concrete'})
local remove_non_ore_stacked_recipes = require 'map_gen.maps.danger_ores.modules.remove_non_ore_stacked_recipes'
remove_non_ore_stacked_recipes()
require 'map_gen.maps.danger_ores.modules.map_poll'
local main_ores_builder = require 'map_gen.maps.danger_ores.modules.main_ores_xmas_tree'
--local sqrt = math.sqrt