mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-03-17 20:58:13 +02:00
fix: structure generation issue on swamp
This commit is contained in:
parent
35ed73bf54
commit
acdc7369b3
@ -1,6 +1,6 @@
|
||||
require 'utils.data_stages'
|
||||
_LIFECYCLE = _STAGE.control -- Control stage
|
||||
_DEBUG = false
|
||||
_DEBUG = true
|
||||
_DUMP_ENV = false
|
||||
|
||||
require 'utils.server'
|
||||
@ -112,7 +112,7 @@ require 'utils.freeplay'
|
||||
--require 'maps.chronosphere.main'
|
||||
|
||||
--![[Adventure as a crew of pirates]]--
|
||||
--require 'maps.pirates.main'
|
||||
require 'maps.pirates.main'
|
||||
|
||||
--![[Launch rockets in increasingly harder getting worlds.]]--
|
||||
--require 'maps.journey.main'
|
||||
|
@ -804,6 +804,28 @@ if _DEBUG then
|
||||
end
|
||||
end)
|
||||
|
||||
commands.add_command(
|
||||
'1/4',
|
||||
'is a dev command.',
|
||||
function(cmd)
|
||||
local param = tostring(cmd.parameter)
|
||||
if check_admin(cmd) then
|
||||
local player = game.players[cmd.player_index]
|
||||
game.speed = 0.5
|
||||
end
|
||||
end)
|
||||
|
||||
commands.add_command(
|
||||
'1/2',
|
||||
'is a dev command.',
|
||||
function(cmd)
|
||||
local param = tostring(cmd.parameter)
|
||||
if check_admin(cmd) then
|
||||
local player = game.players[cmd.player_index]
|
||||
game.speed = 0.5
|
||||
end
|
||||
end)
|
||||
|
||||
commands.add_command(
|
||||
'1',
|
||||
'is a dev command.',
|
||||
|
@ -449,6 +449,11 @@ function Public.place_cached_structures(tickinterval)
|
||||
|
||||
if (not destination.dynamic_data) or (not destination.dynamic_data.structures_waiting_to_be_placed) or (not surface_name) or (not game.surfaces[surface_name]) or (not game.surfaces[surface_name].valid) then return end
|
||||
|
||||
if not (memory.boat and memory.boat.surface_name and memory.boat.surface_name == surface_name) then
|
||||
return --We only want to generate structures once the players arrive on the island. Otherwise, the following issue happens. 2x2 structures force-generate nearby chunks. But if the island has many structures, that could cause a domino effect of chunk-generation, lagging the game.
|
||||
-- Since this change, this function has little conceptual reason to be an on_tick function, but it makes sense to run it a few ticks after you teleport to the island, so it can stay one for now.
|
||||
end
|
||||
|
||||
local surface = game.surfaces[surface_name]
|
||||
|
||||
local structures = destination.dynamic_data.structures_waiting_to_be_placed
|
||||
|
Loading…
x
Reference in New Issue
Block a user