Minetest logo

IRC log for #minetest-hub, 2017-07-12

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

All times shown according to UTC.

Time Nick Message
00:05 paramat joined #minetest-hub
00:07 octacian_ joined #minetest-hub
00:19 octacian__ joined #minetest-hub
00:45 Megaf joined #minetest-hub
00:53 JordachL joined #minetest-hub
01:17 lumidify_ joined #minetest-hub
01:25 octacian joined #minetest-hub
01:45 Megaf_ joined #minetest-hub
05:06 nerzhul joined #minetest-hub
06:21 CWz joined #minetest-hub
07:48 Raven262 joined #minetest-hub
09:08 nerzhul joined #minetest-hub
09:19 octacian_ joined #minetest-hub
09:55 Megaf joined #minetest-hub
10:07 Fixer joined #minetest-hub
10:30 sniper570 joined #minetest-hub
11:11 Megaf_ joined #minetest-hub
11:25 Megaf joined #minetest-hub
11:35 ThomasMonroe joined #minetest-hub
11:35 ThomasMonroe joined #minetest-hub
12:03 RobbieF joined #minetest-hub
12:11 lisac joined #minetest-hub
12:38 Fixer_ joined #minetest-hub
12:41 Fixer__ joined #minetest-hub
12:41 rubenwardy joined #minetest-hub
12:54 Megaf joined #minetest-hub
13:03 DS-minetest joined #minetest-hub
13:25 kaeza joined #minetest-hub
13:31 kaeza mornings
13:36 octacian joined #minetest-hub
13:36 octacian Hey kaeza :D
14:05 Megaf joined #minetest-hub
14:24 Raven262 joined #minetest-hub
14:26 lisac joined #minetest-hub
14:34 Jordach joined #minetest-hub
15:07 DS-minetest joined #minetest-hub
15:12 benrob0329 Could someone please give some extra input on #6111 ?
15:12 benrob0329 https://github.com/minetest/minetest/issues/6111
15:32 ThomasMonroe joined #minetest-hub
15:32 ThomasMonroe joined #minetest-hub
15:34 Raven262 joined #minetest-hub
15:49 sc3k joined #minetest-hub
16:19 Grandolf joined #minetest-hub
16:19 Grandolf joined #minetest-hub
16:20 Grandolf joined #minetest-hub
16:20 Grandolf joined #minetest-hub
16:22 Grandolf joined #minetest-hub
16:22 Grandolf joined #minetest-hub
16:45 Krock joined #minetest-hub
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 joined #minetest-hub
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 nerzhul joined #minetest-hub
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_mod​ding_book/chapters/itemstacks.html
18:11 rubenwardy https://rubenwardy.com/minetest_mod​ding_book/chapters/inventories.html
18:11 lisac_ joined #minetest-hub
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 ... </l/?kh=-1&uddg=https%3A%2F%2Fstackover​flow.com%2Fquestions%2F2988246%2Flua%2D​choose%2Drandom%2Ditem%2Dfrom%2Dtable>, 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:37 Fixer joined #minetest-hub
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
18:42 Fixer joined #minetest-hub
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:15 sniper338 joined #minetest-hub
19:16 sniper338 joined #minetest-hub
19:21 benrob0329 screw it, vim keys are just too powerful, and vim's config is just too nice
19:22 RobbieF left #minetest-hub
19:23 benrob0329 oops, wrong channel :-)
19:42 grandolf_ joined #minetest-hub
20:34 Fixer joined #minetest-hub
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:13 Grandolf joined #minetest-hub
21:13 Grandolf joined #minetest-hub
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
21:49 Fixer joined #minetest-hub
22:07 elinor joined #minetest-hub
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
22:27 NatedaGr8 joined #minetest-hub
22:32 sniper570 joined #minetest-hub
22:35 DI3HARD139 joined #minetest-hub
22:43 kaeza joined #minetest-hub
23:39 octacian_ joined #minetest-hub

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