From f72c0d926adccac3be5fdcae8e8894ff43de946c Mon Sep 17 00:00:00 2001 From: MekaTriK Date: Fri, 7 Jul 2017 18:59:55 +0300 Subject: [PATCH] Removed custom player.id() A better version is already a part of starbound API. --- scripts/spawnableItemPack.lua | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/scripts/spawnableItemPack.lua b/scripts/spawnableItemPack.lua index 0e8197c..368e2b5 100644 --- a/scripts/spawnableItemPack.lua +++ b/scripts/spawnableItemPack.lua @@ -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