mirror of
https://github.com/tburrows13/SpidertronEnhancements.git
synced 2025-09-06 13:52:36 +00:00
15 lines
470 B
Lua
15 lines
470 B
Lua
script.on_event("spidertron-enhancements-open-in-map",
|
|
function(event)
|
|
local player = game.get_player(event.player_index) ---@cast player -?
|
|
if player.spidertron_remote_selection then
|
|
local spidertron = player.spidertron_remote_selection[1]
|
|
player.set_controller{
|
|
type = defines.controllers.remote,
|
|
position = spidertron.position,
|
|
surface = spidertron.surface,
|
|
}
|
|
player.centered_on = spidertron
|
|
end
|
|
end
|
|
)
|