mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 23:33:12 +09:00
Let a syncing spectator look around
Review asked for the spectator to move freely while it waits. Only a jump of more than 16 tiles from where it was last seen, or to another surface, counts as a teleport and moves the restore location. The body place names from #1156 become restore_location, keep_restore_location and controller_taken. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2fcf3f10c7
commit
1c804b05b7
3 files changed
+59
-50
No files matched your search
@@ -131,14 +131,14 @@ dialog_failed_download.events = {
|
||||
local player_sync = get_script_data()
|
||||
player.gui.screen.dialog_failed_download.destroy()
|
||||
local player_record = player_sync.players[player.name]
|
||||
if player_record.body_place then
|
||||
restore_position(player, player_record.body_place)
|
||||
if player_record.restore_location then
|
||||
restore_position(player, player_record.restore_location)
|
||||
end
|
||||
player_record.dirty = true
|
||||
player_record.sync = false
|
||||
player_record.sync_in_progress = false
|
||||
player_record.local_controller = nil
|
||||
player_record.body_place = nil
|
||||
player_record.restore_location = nil
|
||||
|
||||
elseif event.element.name == "player_sync_failed_download_retry" then
|
||||
-- Retry acquiring the player from the controller
|
||||
|
||||
Reference in new issue
Block a user