1
0
mirror of https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git synced 2024-12-04 09:43:00 +02:00

Merge pull request #211 from Oarcinae/208-add-gps-ping-for-player-list-when-clicking-on-map-icon

208 add gps ping for player list when clicking on map icon
This commit is contained in:
Oarcinae 2024-10-23 19:28:17 -04:00 committed by GitHub
commit 0c742cc4f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 3 deletions

View File

@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 2.1.3
Date: ????
Minor Features:
- Add GPS ping for when player clicks on someone's location in the player list.
---------------------------------------------------------------------------------------------------
Version: 2.1.2
Date: 2024-10-23
Bugfixes:

View File

@ -1,6 +1,6 @@
{
"name": "oarc-mod",
"version": "2.1.2",
"version": "2.1.3",
"factorio_version": "2.0",
"title": "Oarc Multiplayer Spawn",
"author": "Oarcinae",

View File

@ -128,10 +128,15 @@ function PlayerListTabGuiClick(event)
return
end
local position, surface
if (target_player.character) then
player.set_controller{type = defines.controllers.remote, position = target_player.character.position, surface = target_player.character.surface}
position = target_player.character.position
surface = target_player.character.surface
else
player.set_controller{type = defines.controllers.remote, position = target_player.position, surface = target_player.surface}
position = target_player.position
surface = target_player.surface
end
player.set_controller{type = defines.controllers.remote, position = position, surface = surface}
player.print({"", target_player.name, ": ", GetGPStext(surface.name, position)})
end
end