Minetest logo

IRC log for #minetest-mods, 2013-12-28

| Channels | #minetest-mods index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:21 phantombeta joined #minetest-mods
01:18 OWNSyouAll joined #minetest-mods
01:48 phantombeta| joined #minetest-mods
07:42 phantombeta joined #minetest-mods
09:26 bas080 joined #minetest-mods
13:21 Wuzzy joined #minetest-mods
13:38 bas080 joined #minetest-mods
14:17 PilzAdam joined #minetest-mods
15:23 bas080 joined #minetest-mods
16:03 kaeza joined #minetest-mods
16:31 rubenwardy joined #minetest-mods
17:09 OWNSyouAll How do i get the items in a node's inventory. I'm calling get_inventory but that just gives me a table of userdata not items.
17:10 kaeza OWNSyouAll, local inv = get_inv_from_somewhere(); local item = inv:get_stack("main", 1)
17:10 kaeza ^ that gets you the first itemstack from the "main" list
17:12 kaeza OWNSyouAll, https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L1743
17:22 bas080 joined #minetest-mods
17:27 ShadowNinja There is no get_lists yet, but you can use get_list("main") and repeat for each list that you know of.
17:31 OWNSyouAll get_list gives me a table of userdata. What is userdata i can't find that anywhere.
17:37 kaeza OWNSyouAll, it's a list of ItemStacks
17:38 kaeza ("userdata" is the generic name Lua gives to non-Lua-native data types)
17:39 kaeza here are the methods supported by ItemStacks: https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L1765
17:42 kaeza example: http://pastebin.com/gULKnSpw
17:54 OWNSyouAll Ah ok i was attempting to call get_name while already a table down that's why it wasn't working
17:54 OWNSyouAll thanks
17:57 kaeza no problem
18:27 diemartin joined #minetest-mods
22:27 diemartin joined #minetest-mods

| Channels | #minetest-mods index | Today | | Google Search | Plaintext