mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Remove Zoom to World (#339)
* Update player-list.lua * Update warp-list.lua * Fix remaining cases of zoom_to_world * Fix lint --------- Co-authored-by: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com>
This commit is contained in:
@@ -118,7 +118,7 @@ local add_player_base =
|
|||||||
if event.button == defines.mouse_button_type.left then
|
if event.button == defines.mouse_button_type.left then
|
||||||
-- LMB will open the map to the selected player
|
-- LMB will open the map to the selected player
|
||||||
local position = selected_player.physical_position
|
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
|
else
|
||||||
-- RMB will toggle the settings
|
-- RMB will toggle the settings
|
||||||
local old_selected_player_name = SelectedPlayer:get(player)
|
local old_selected_player_name = SelectedPlayer:get(player)
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ local silo_cords =
|
|||||||
:on_click(function(player, element, _)
|
:on_click(function(player, element, _)
|
||||||
local rocket_silo_name = element.parent.caption
|
local rocket_silo_name = element.parent.caption
|
||||||
local rocket_silo = Rockets.get_silo_entity(rocket_silo_name)
|
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)
|
end)
|
||||||
|
|
||||||
--- Base element for each rocket in the progress list
|
--- Base element for each rocket in the progress list
|
||||||
|
|||||||
@@ -369,14 +369,10 @@ local vlayer_gui_control_see =
|
|||||||
|
|
||||||
if target and vlayer_control_type_list[target] and n > 0 then
|
if target and vlayer_control_type_list[target] and n > 0 then
|
||||||
local i = vlayer.get_interfaces()
|
local i = vlayer.get_interfaces()
|
||||||
|
local entity = i[vlayer_control_type_list[target]][n]
|
||||||
if i and i[vlayer_control_type_list[target]] and i[vlayer_control_type_list[target]][n] then
|
if entity and entity.valid then
|
||||||
local pos = i[vlayer_control_type_list[target]][n].position
|
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) }
|
||||||
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
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -230,8 +230,7 @@ local warp_label =
|
|||||||
:on_click(function(player, element, _)
|
:on_click(function(player, element, _)
|
||||||
local warp_id = element.parent.caption
|
local warp_id = element.parent.caption
|
||||||
local warp = Warps.get_warp(warp_id)
|
local warp = Warps.get_warp(warp_id)
|
||||||
local position = warp.position
|
player.set_controller{ type = defines.controllers.remote, position = warp.position, surface = warp.surface }
|
||||||
player.zoom_to_world(position, 1.5)
|
|
||||||
end)
|
end)
|
||||||
:static_name(Gui.unique_static_name)
|
:static_name(Gui.unique_static_name)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user