You've already forked ComfyFactorio
mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-11-29 22:47:52 +02:00
Fix reset module
This commit is contained in:
@@ -208,7 +208,7 @@ local function clear_robots(new_surface)
|
||||
end
|
||||
end
|
||||
|
||||
function Public.soft_reset_map(old_surface, map_gen_settings, player_starting_items, small_force_chunk)
|
||||
function Public.soft_reset_map(old_surface, map_gen_settings, player_starting_items, small_force_chunk, delay)
|
||||
if not this.original_surface_name then
|
||||
this.original_surface_name = old_surface.name
|
||||
end
|
||||
@@ -220,6 +220,10 @@ function Public.soft_reset_map(old_surface, map_gen_settings, player_starting_it
|
||||
new_surface.force_generate_chunk_requests()
|
||||
end
|
||||
|
||||
if not delay then
|
||||
teleport_players(new_surface, small_force_chunk)
|
||||
end
|
||||
|
||||
reset_forces(new_surface, old_surface)
|
||||
if player_starting_items then
|
||||
equip_players(player_starting_items)
|
||||
@@ -254,7 +258,10 @@ function Public.soft_reset_map(old_surface, map_gen_settings, player_starting_it
|
||||
|
||||
game.print(message, { r = 0.98, g = 0.66, b = 0.22 })
|
||||
Server.to_discord_embed(message, true)
|
||||
teleport_players(new_surface, small_force_chunk)
|
||||
|
||||
if delay then
|
||||
teleport_players(new_surface, small_force_chunk)
|
||||
end
|
||||
|
||||
return new_surface
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user