Skip to content

Instantly share code, notes, and snippets.

@seriallos
Created January 3, 2014 03:12
Show Gist options
  • Save seriallos/8231976 to your computer and use it in GitHub Desktop.
Save seriallos/8231976 to your computer and use it in GitHub Desktop.
Starbound UUID Logging
{
"__merge": [],
"baseParameters": {
"scripts": [ "/scripts/uuidlog.lua" ]
}
}
function init()
if (math['uuids'] == nil) then
math['uuids'] = {}
end
local playerIds = world.playerQuery( entity.position(), 100 )
for _, playerId in pairs(playerIds) do
local playerName = world.entityName( playerId )
local playerUuid = world.entityUuid( playerId )
if( math['uuids'][ playerName ] == nil ) then
world.logInfo( "UUID Log: <"..playerName.."> ("..playerUuid..")" )
math['uuids'][ playerName ] = playerUuid
end
end
end
function main()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment