Skip to content

Commit

Permalink
Merge pull request #22 from GTG3000/master
Browse files Browse the repository at this point in the history
Removed custom player.id()
  • Loading branch information
Silverfeelin authored Jul 9, 2017
2 parents b757a97 + f72c0d9 commit ad7a5ef
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions scripts/spawnableItemPack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -726,14 +726,3 @@ function Set (list)
for _, l in ipairs(list) do set[l] = true end
return set
end

-- Thanks to Magicks
function player.id()
local id = nil
pcall(function()
local uid = player.ownShipWorldId():match":(.+)"
local pos = world.findUniqueEntity(uid):result()
id = world.entityQuery(pos,3,{order = "nearest",includedTypes = {"player"}})[1]
end)
return id
end

0 comments on commit ad7a5ef

Please sign in to comment.