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:
parent
04856c9ffe
commit
2181981215
37
map_gen/maps/danger_ores/modules/map_poll.lua
Normal file
37
map_gen/maps/danger_ores/modules/map_poll.lua
Normal 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)
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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),
|
||||
|
@ -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 = {
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user