mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-03-17 20:58:13 +02:00
mirror fix, voting fix
This commit is contained in:
parent
5841e787eb
commit
0c166a5268
@ -19,7 +19,7 @@ bb_config = {
|
||||
["fast_pregen"] = false, --Force fast pregeneration.
|
||||
|
||||
--TERRAIN OPTIONS--
|
||||
["border_river_width"] = 25, --Approximate width of the horizontal impassable river seperating the teams. (values up to 100)
|
||||
["border_river_width"] = 27, --Approximate width of the horizontal impassable river seperating the teams. (values up to 100)
|
||||
["builders_area"] = true, --Grant each side a peaceful direction with no nests and biters?
|
||||
["random_scrap"] = true, --Generate harvestable scrap around worms randomly?
|
||||
|
||||
|
@ -116,12 +116,13 @@ local function on_gui_click(event)
|
||||
end
|
||||
if event.element.type ~= "button" then return end
|
||||
if event.element.parent.name ~= "difficulty_poll" then return end
|
||||
if event.element.name == "close" then event.element.parent.destroy() return end
|
||||
local i = tonumber(event.element.name)
|
||||
if event.element.name == "close" then event.element.parent.destroy() return end
|
||||
if game.tick > timeout then event.element.parent.destroy() return end
|
||||
local i = tonumber(event.element.name)
|
||||
game.print(player.name .. " has voted for " .. difficulties[i].name .. " difficulty!", difficulties[i].print_color)
|
||||
global.difficulty_player_votes[player.name] = i
|
||||
set_difficulty()
|
||||
difficulty_gui()
|
||||
difficulty_gui()
|
||||
event.element.parent.destroy()
|
||||
end
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
require 'utils.table'
|
||||
require "on_tick_schedule"
|
||||
require "maps.biter_battles_v2.config"
|
||||
require "modules.dynamic_landfill"
|
||||
require "modules.spawners_contain_biters"
|
||||
require "modules.mineable_wreckage_yields_scrap"
|
||||
|
||||
|
@ -50,6 +50,7 @@ local valid_types = {
|
||||
}
|
||||
|
||||
local function process_entity(surface, entity)
|
||||
if not entity.valid then return end
|
||||
if not valid_types[entity.type] then return end
|
||||
local new_pos = {x = entity.position.x * -1, y = entity.position.y * -1}
|
||||
if entity.type == "tree" then
|
||||
|
@ -124,7 +124,8 @@ local function on_gui_click(event)
|
||||
end
|
||||
if event.element.type ~= "button" then return end
|
||||
if event.element.parent.name ~= "difficulty_poll" then return end
|
||||
if event.element.name == "close" then event.element.parent.destroy() return end
|
||||
if event.element.name == "close" then event.element.parent.destroy() return end
|
||||
if game.tick > global.difficulty_poll_closing_timeout then event.element.parent.destroy() return end
|
||||
local i = tonumber(event.element.name)
|
||||
game.print(player.name .. " has voted for " .. difficulties[i].name .. " difficulty!", difficulties[i].print_color)
|
||||
global.difficulty_player_votes[player.name] = i
|
||||
|
Loading…
x
Reference in New Issue
Block a user