This commit is contained in:
flux
2022-06-19 15:26:05 -07:00
parent 31f7d56a33
commit 5990d7c6a4
20 changed files with 617 additions and 144 deletions

View File

@ -67,5 +67,18 @@ stairsplus.util = {
end
end
return f
end
end,
get_location_string = function(inv)
local location = inv:get_location()
if location.type == "node" then
return ("nodemeta:%i,%i,%i"):format(location.pos.x, location.pos.y, location.pos.z)
elseif location.type == "player" then
return ("player:%s"):format(location.name)
elseif location.type == "detached" then
return ("detached:%s"):format(location.name)
else
error(("unexpected location? %s"):format(dump(location)))
end
end,
}