This commit is contained in:
2024-12-30 16:30:41 +09:00
parent 80cd1245e5
commit 596ea47082
2 changed files with 2 additions and 4 deletions

View File

@@ -117,8 +117,7 @@ local add_player_base =
local selected_player = game.players[selected_player_name] local selected_player = game.players[selected_player_name]
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 event.player.set_controller{ type = defines.controllers.remote, position = selected_player.physical_position, surface = selected_player.physical_surface }
event.player.zoom_to_world(position, 1.75)
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)

View File

@@ -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)