mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
.
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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