How to get owner of construction robot?
Posted: Thu Aug 23, 2018 10:28 am
Hi all! How to get the owner of the construction robot? Player index for personal roboport or nothing, if it was from standard roboport.
www.factorio.com
https://forums.factorio.com/
Code: Select all
local players = {}
for _, player in pairs(game.players) do
if player.force.name == robot.force.name then
table.insert(players, player)
end