From 570c7a6524739ab9706b33644cae0d9988d40e07 Mon Sep 17 00:00:00 2001 From: Alexander Chibrikin Date: Wed, 18 Jan 2023 01:39:58 +0300 Subject: [PATCH] IDE hinting: add `InvRef:get_location()` --- classes/InvRef.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/classes/InvRef.lua b/classes/InvRef.lua index dbbc158..55d1d4d 100644 --- a/classes/InvRef.lua +++ b/classes/InvRef.lua @@ -71,3 +71,11 @@ function InvRef:contains_item(list_name, stack, match_meta) end --- @param stack ItemStack --- @return ItemStack function InvRef:remove_item(list_name, stack) end +--- returns a location compatible to `minetest.get_inventory(location)`. e.g. +--- * `{type="player", name="celeron55"}` +--- * `{type="node", pos={x=, y=, z=}}` +--- * `{type="detached", name="creative"}` +--- returns `{type="undefined"}` in case location is not known. +--- @see minetest.get_inventory +--- @return table +function InvRef:get_location() end