Time Nick Message 13:31 kaeza mornings 13:36 octacian Hey kaeza :D 15:12 benrob0329 Could someone please give some extra input on #6111 ? 15:12 benrob0329 https://github.com/minetest/minetest/issues/6111 17:23 Krock Do we support nested texture modifiers? example: [combine:WxH:16,16=default_dirt.png^\[colorize:#000:200 17:23 Krock minetest seems to have troubles with it 17:50 IhrFussel Hi guys...how do I find out if the player inventory has AT LEAST 5 empty slots left in main? 17:52 KaadmY IhrFussel: if you just need to put items in it, you can do player:get_inventory():room_for_item(itemstack) 17:52 DS-minetest go it through in a loop and count it. if the counter gets 5, break. after the loop return if the counter is smaller than 5 17:54 IhrFussel KaadmY, I need to make sure though that there is room for 5 different items, cause what I'm implementing is some sort of loot packs players can purchase 17:54 IhrFussel Purchase with ingame currency* 17:56 IhrFussel Couldn't I just use get_size("main") ? 17:57 IhrFussel I guess that will only return the size of all slots not the ones in use 17:58 IhrFussel DS-minetest, I can't exactly follow you...loop through what exactly? 18:00 DS-minetest through the inventory 18:01 IhrFussel So loop through this variable? local pinv = getp:get_inventory() 18:01 DS-minetest like local counter = 0 for i = 1, inv:get_size() do if inv:get_stack(i):is_empty() then counter = counter + 1 if counter == 5 then break end end end if counter < 5 then return end 18:01 DS-minetest something like that 18:06 IhrFussel DS-minetest, I see... and do you happen to know what the format to add new items is? Or can I only add 1 at a time? 18:07 DS-minetest i dont know much about inventories 18:07 DS-minetest http://dev.minetest.net/InvRef 18:07 DS-minetest set_stack("listname", i, stack) 18:08 DS-minetest look into the api 18:08 IhrFussel I'm already on that page but I don't know what the format of "stack" should be...will do thanks 18:08 DS-minetest stack is an itemstack 18:09 DS-minetest http://dev.minetest.net/ItemStack 18:11 rubenwardy https://rubenwardy.com/minetest_modding_book/chapters/itemstacks.html 18:11 rubenwardy https://rubenwardy.com/minetest_modding_book/chapters/inventories.html 18:11 rubenwardy alternatively 18:12 rubenwardy oh wow, that's an old image of the creative inventory 18:15 IhrFussel So JUST local var = ItemStack(table) ? That looks weird considering almost all other API functions start with minetest. 18:15 rubenwardy it's a class 18:15 rubenwardy well, a constructor for a class 18:16 rubenwardy I mean, classes are quite inconsistent 18:16 rubenwardy ItemStack(), Vector:new(), AreaStore() 18:16 IhrFussel rubenwardy, can I do local table = {"default:apple","default:dirt"} local stack = ItemStack(table) ? 18:16 rubenwardy no 18:16 rubenwardy as a stack is by definition only one item 18:16 rubenwardy you can't have multiple items in a stack 18:17 rubenwardy you'd do inv:add_item("main", ItemStack("default:apple")) and inv:add_item("main", ItemStack("default:dirt")) instead 18:18 IhrFussel So I HAVE TO call add_item as many times as I want to add different items..okay 18:18 rubenwardy you could do ItemStack({ name = "default:dirt", count = 3 }) which is what it means when it says a table constructor 18:18 rubenwardy but yeah, you need to call multiple times 18:19 rubenwardy you could make a help function though 18:21 rubenwardy IhrFussel: https://gist.github.com/rubenwardy/42b51bcce4738c208dca83fba5553f69 18:23 rubenwardy !tell rubenwardy update your book! 18:23 ShadowBot rubenwardy: O.K. 18:23 Calinou KaadmY: you playing CS:GO it seems? you bought the game? 18:23 Calinou hi 18:24 IhrFussel rubenwardy, thank you^^ now I got one more problem: What's the best way to choose a random element from a table? Since I want loot boxes I need to choose 5 random table elements 18:24 rubenwardy !g lua choose random element in table 18:24 ShadowBot rubenwardy: Lua choose random item from table - Stack Overflow - Lua choose random item from table. ... getting random elements from the table would be faster his ... Browse other questions tagged random lua or ask your own ... , arrays - Love2d: random element from table - (7 more messages) 18:25 IhrFussel I already read that...so that seems to be the most efficient way then 18:38 KaadmY Calinou: yep 18:38 KaadmY Runs like shit though :P 18:39 KaadmY <30 fps most of the time, I can play a round or two before my laptop gets too hot and throttles to like 10 fps 18:40 Calinou KaadmY: ah :( 18:41 Calinou KaadmY: time to save for a new laptop :P 18:41 KaadmY Calinou: I have my eye on a laptop already 18:41 * KaadmY goes to PM to avoid spam 19:05 IhrFussel rubenwardy, this can't be right :/ pinv:get_stack(i):is_empty() 19:05 IhrFussel i is the loop number 19:05 rubenwardy you forget the listname 19:05 IhrFussel So get_stack("main",i) ? 19:05 rubenwardy yes 19:21 benrob0329 screw it, vim keys are just too powerful, and vim's config is just too nice 19:23 benrob0329 oops, wrong channel :-) 20:38 IhrFussel Raven262, can you verify that your brother is on my server right now? 20:39 Raven262 Yes. 20:39 IhrFussel He lost his password and joined as "hijenacvuk" correct? 20:55 Raven262 yes 20:56 Raven262 Sorry for late response, i'm quite busy in real life 20:56 Raven262 Well, not actually busy, but i forget to check the irc 21:25 IhrFussel Raven262, No problem, I just need to make sure that I don't set the password for a faker 21:32 IhrFussel Does the engine support glowing wield items now? Last time I checked it was not possible to make a meselamp glow inside your hand for example 21:33 IhrFussel in your hand* 21:35 IhrFussel Someone told me he saw servers with torches that glow while wielding ... or are those mods likely using some hacky way to make it possible? 21:40 calcul0n IhrFussel, the torches mod does that, but i had a quick look at the code and didn't get how it works :) 21:48 Raven262 I think it lags, i had it on my home server, it produced some lag 22:13 KaadmY IhrFussel: it's hacky 22:13 KaadmY It replaces the air node at your position with a custom air node that glows 22:13 KaadmY It's really inefficient 22:24 Raven262 it lags a lot