diff --git a/exp_legacy/module/modules/gui/player-list.lua b/exp_legacy/module/modules/gui/player-list.lua index 19b81055..cc08db56 100644 --- a/exp_legacy/module/modules/gui/player-list.lua +++ b/exp_legacy/module/modules/gui/player-list.lua @@ -118,7 +118,7 @@ local add_player_base = if event.button == defines.mouse_button_type.left then -- LMB will open the map to the selected player local position = selected_player.physical_position - event.player.zoom_to_world(position, 1.75) + event.player.set_controller{ type = defines.controllers.remote, position = selected_player.physical_position, surface = selected_player.physical_surface } else -- RMB will toggle the settings local old_selected_player_name = SelectedPlayer:get(player) diff --git a/exp_legacy/module/modules/gui/rocket-info.lua b/exp_legacy/module/modules/gui/rocket-info.lua index 9e404d15..5355591e 100644 --- a/exp_legacy/module/modules/gui/rocket-info.lua +++ b/exp_legacy/module/modules/gui/rocket-info.lua @@ -127,7 +127,7 @@ local silo_cords = :on_click(function(player, element, _) local rocket_silo_name = element.parent.caption local rocket_silo = Rockets.get_silo_entity(rocket_silo_name) - player.zoom_to_world(rocket_silo.position, 2) + player.set_controller{ type = defines.controllers.remote, position = rocket_silo.position, surface = rocket_silo.surface } end) --- Base element for each rocket in the progress list diff --git a/exp_legacy/module/modules/gui/vlayer.lua b/exp_legacy/module/modules/gui/vlayer.lua index 6389947a..43304337 100644 --- a/exp_legacy/module/modules/gui/vlayer.lua +++ b/exp_legacy/module/modules/gui/vlayer.lua @@ -369,14 +369,10 @@ local vlayer_gui_control_see = if target and vlayer_control_type_list[target] and n > 0 then local i = vlayer.get_interfaces() - - if i and i[vlayer_control_type_list[target]] and i[vlayer_control_type_list[target]][n] then - local pos = i[vlayer_control_type_list[target]][n].position - - if pos then - player.zoom_to_world(pos, 2) - player.print{ "vlayer.result-interface-location", { "vlayer.control-type-" .. vlayer_control_type_list[target]:gsub("_", "-") }, pos_to_gps_string(pos) } - end + local entity = i[vlayer_control_type_list[target]][n] + if entity and entity.valid then + player.set_controller{ type = defines.controllers.remote, position = entity.position, surface = entity.surface } + player.print{ "vlayer.result-interface-location", { "vlayer.control-type-" .. vlayer_control_type_list[target]:gsub("_", "-") }, pos_to_gps_string(entity.position) } end end end) diff --git a/exp_legacy/module/modules/gui/warp-list.lua b/exp_legacy/module/modules/gui/warp-list.lua index e0bdb0d5..9872c623 100644 --- a/exp_legacy/module/modules/gui/warp-list.lua +++ b/exp_legacy/module/modules/gui/warp-list.lua @@ -230,8 +230,7 @@ local warp_label = :on_click(function(player, element, _) local warp_id = element.parent.caption local warp = Warps.get_warp(warp_id) - local position = warp.position - player.zoom_to_world(position, 1.5) + player.set_controller{ type = defines.controllers.remote, position = warp.position, surface = warp.surface } end) :static_name(Gui.unique_static_name)