Time Nick Message
01:15 ANAND Should the string passed to ObjectRef:set_texture_modifier contain a `^` at the beginning? What should be the exact format of the string passed to this method?
01:16 ANAND Documentation is oh so helpful, btw: https://github.com/minetest/minetest/blob/429a98964859b83016f2eb47a47a08ab8dc3c57e/doc/lua_api.txt#L5240
01:17 ANAND Tried a bunch of texture modifiers. It seems like set_texture_mod is broken in 5.1.0. Will confirm today, and file an issue.
01:41 tumeninodes I still think the textures section of the forum needs to be updated, sub-forums added, go through content, sort, etc.. If you want to attract artists, it would help to look like some f*s are given toward that avenue
01:42 rubenwardy celeron55 ^
01:43 VanessaE why? all you need is HDX ;)
01:43 tumeninodes ha
01:43 Jordach that's the sound of 56 users puking at exactly the same time VE
01:43 VanessaE D:
01:45 rubenwardy HDX be like https://i.kym-cdn.com/photos/images/newsfeed/001/129/475/c59.png
01:45 tumeninodes lmffao
01:46 VanessaE haha
01:47 VanessaE well I don't do mobs :P
01:47 VanessaE for just that ^ reason :)
01:47 tumeninodes at least it doesn't have huge creepy eyes
01:48 VanessaE haha
01:48 VanessaE don't like anime eyes? :P
01:49 tumeninodes about as much as I like colonoscopies
01:49 Jordach omae wa mou shinderiu
01:49 VanessaE hater :P
01:50 tumeninodes jumpin fritos... I haven't eaten yet. 10pm here brb
01:51 VanessaE get me something! :)
01:51 VanessaE (a big bag of Fritos wouldn't be rejected, now that you mention it :P )
01:51 tumeninodes one chickon wrap, hold the chickon comin up
01:51 VanessaE heh
09:47 ANAND Should the string passed to ObjectRef:set_texture_modifier contain a `^` at the beginning? What should be the exact format of the string passed to this method?
11:45 tumeninodes can anyone tell me why a sound file might play for only one cycle after swap_node? https://pastebin.com/7qv7zqf4
11:47 Calinou rubenwardy: there's
in Bulma if you want to preserve base formatting
11:47 rubenwardy Divitius
11:47 Calinou (it'll preserve some built-in styles within the tag, which is intended for generated content such as Markdown)
11:47 Calinou oh, you said it actually
11:48 tumeninodes should I not be using minetest.sound_play in the on_right_click minetest.swap_node function?
13:24 tumeninodes at line 108, can someone tell me a good argument to use in this situation? or is there another way? https://pastebin.com/QmafPaA5
13:39 calcul0n tumeninodes, i think you need the handle returned by sound_play()
14:02 tumeninodes I'm doing it dreadfully wrong. everything I try comes up "attempting to call global 'handles' a nil value" :P
14:05 tumeninodes so from an expert to a complete novice... what exactly IS "the handle" I am looking for? is it the sound file? I looked over line 423 of builtin/game/item.lua and looked for the specific problem in lua but nothing gives me a clue for this specific situation
14:17 calcul0n i'm not an expert, but a handle is generally a unique identifier for an object
14:17 calcul0n most of the time is just a number
14:18 calcul0n so minetest.sound_play() returns that, something identifying the sound itself
14:27 tumeninodes thank you. Ill give it a few more whacks with my hammer, after a quick break.
14:28 tumeninodes I usually just guess my way around this stuff.
15:21 tumeninodes Calinou if you're still around. So I did this (look to line 107) https://pastebin.com/0GXamzJr which throws this at me https://pastebin.com/ivKg6HDK
15:23 tumeninodes or anyone else who can point out what I am missing
15:26 tumeninodes perhaps on line 109, I am supposed to replace "handle" with the name of the sound file? o_O
15:28 calcul0n no, you must replace it by the handle returned by sound_play at line 31
15:28 calcul0n you could store it in the node metadata for instance
15:29 calcul0n not sure about the line numbers as there are only 81 lines in your paste :)
15:30 tumeninodes ha woops, yes I just put the bit for this particular object in the pastebin
15:31 tumeninodes so in line 76, in place of handle, I should put ("fire_small", {pos = pos, gain = 0.20, max_hear_distance = 10, loop = true}) ? entirely
15:32 tumeninodes or just ("fire_small") ? that is where I am stuck... i'm an artist Jim, not a coder! :D
15:33 calcul0n lol
15:34 calcul0n when you call sound_play, you need something like local handle = minetest.sound_play(...)
15:34 tumeninodes ohhhhh
15:34 calcul0n then minetest.get_meta(pos).set_int("sound_handle", handle)
15:34 LoneWolfHT No
15:34 tumeninodes I didn't register the local function to begin with
15:35 LoneWolfHT I think you use a `:`, not a `.`
15:35 LoneWolfHT minetest.get_meta(pos):set_int()
15:35 calcul0n ho, you're right
15:36 calcul0n then to stop it minetest.sound_stop(minetest.get_meta(pos):get_int("sound_handle"))
15:36 tumeninodes this is the instruction book that came with it... I think there's some pages missing
15:36 tumeninodes https://dev.minetest.net/minetest.sound_stop
15:37 calcul0n well, the wiki is incomplete and outdated
15:37 LoneWolfHT eh, the dev wiki can be misleading. There are functions that don't, and never did, exist in there
15:37 calcul0n you should use the lua modding book : https://rubenwardy.com/minetest_modding_book/lua_api.html
15:38 tumeninodes I know but, I was desperate
15:38 LoneWolfHT When I'm modding I have `Minetest/doc/lua_api.txt` open so I can Ctrl+F it for info
15:38 tumeninodes yep I have that, but I tend to through the manuals away
15:38 tumeninodes >throw
15:39 tumeninodes it's such a dopey little mod which I wanted to keep as simple as possible.... well... so much for that haha
15:40 tumeninodes right click, fire and cracking on.... right click again fire and crackling sound off
15:40 LoneWolfHT `local handle = minetest.sound_play("fire_small", {pos = pos, gain = 0.20, max_hear_distance = 10, loop = true})` should work
15:40 tumeninodes how couls that have possibly be turned into get_meta(pos):set_int)get a cup of coffee
15:41 tumeninodes LoneWolf has come a long way ;)
15:42 LoneWolfHT `minetest.get_meta(pos):set_int(handle)` on a new line below it
15:44 LoneWolfHT It was/is a fun climb
15:46 tumeninodes wth? o_O now get_meta wants a number too
15:46 VanessaE et_meta(pos):set_int("coffee", 12)
15:46 VanessaE m:set_meta(pos):set_int("coffee", 12)
15:46 VanessaE :)
15:47 LoneWolfHT Hah, knew there was something off
15:47 VanessaE (assuming a standard-sized coffee "pot"
15:47 VanessaE )
15:47 rubenwardy get_meta() *
15:47 VanessaE oh hell
15:47 VanessaE joke failed :P
15:48 LoneWolfHT `minetest.get_meta(pos):set_int("handle", handle)
15:48 tumeninodes har har Vanessa
15:48 LoneWolfHT grrr. I *really* miss Discord edits
15:48 tumeninodes ok rubenwardy's () worked but still sound_stop does not like the number '1'
15:49 tumeninodes wait... what's the * ?
15:51 LoneWolfHT `minetest.sound_stop(minetest.get_meta(pos):get_int("handle"))`
15:51 LoneWolfHT ?
15:54 tumeninodes is there a reason I can't use single digit numbers with sound_stop?
15:54 tumeninodes i want the sound to vut as soon as right clicked to turn off the fire and sound
15:54 tumeninodes >cut
15:55 LoneWolfHT sound_play() returns a special number linked to the sound played. You can only stop that sound with the special number it gives
15:56 LoneWolfHT `minetest.sound_stop()`
15:56 tumeninodes here's the whole mess https://pastebin.com/juyAxawW
15:56 tumeninodes well how the hell do I get this "special #"?
15:57 tumeninodes minetest.after uses # as a timed increment (how long the sound will play after I right click the object off
15:57 LoneWolfHT It's stored in `handle` when you ran sound_play()
15:57 tumeninodes -_-
16:00 tumeninodes I picked a bad time to quit chewing crayons
16:00 LoneWolfHT `on_rightclick = function(pos, node, puncher) local handle = minetest.get_meta(pos):get_int("handle") minetest.after(2, function() if handle then minetest.sound_stop(handle) minetest.get_meta(pos):set_int("handle", nil) end end) minetest.swap_node(pos, {name = "fireplace:fireplace_01", param2 = node.param2})end,`
16:00 LoneWolfHT For `fireplace_01_active` ^
16:09 tumeninodes thank you LoneWolf. Only problem still is a complaint regarding the #2
16:09 ShadowBot https://github.com/minetest/minetest/issues/2 -- Burned wood
16:10 tumeninodes shut up ShadowBot, no one's talking to you
16:13 calcul0n minetest.after(10, function(pos) minetest.sound_stop(minetest.get_meta(pos):get_int("handle")) end, pos)
16:13 calcul0n maybe...
16:13 calcul0n not sure how to handle the pos param
16:14 LoneWolfHT I have no clue what is with the `function(pos)` thing. You can already access `pos`
16:15 calcul0n yes, probably
16:16 calcul0n so minetest.after(10, function() minetest.sound_stop(minetest.get_meta(pos):get_int("handle")) end) ?
16:16 tumeninodes its saying "2 to set int"
16:17 calcul0n ?
16:17 LoneWolfHT Full error please?
16:17 calcul0n it's get_int here, not set
16:18 tumeninodes please hold
16:19 tumeninodes https://pastebin.com/AeszVmr4
16:20 tumeninodes and here is now the current mess I made of what you told me https://pastebin.com/Vds1k5wB
16:20 tumeninodes I wish I could retain info as you guys do
16:21 calcul0n so yes, just replace set_int by get_int
16:21 calcul0n and maybe only call minetest.after if handle is not nil
16:22 calcul0n if handle then minetest.after(...) end
16:22 tumeninodes for all instances of set_int? or just for the active object
16:22 calcul0n just the one in sound_stop
16:22 tumeninodes ok
16:24 calcul0n also you could make it simpler : if handle then minetest.after(2, minetest.sound_stop, handle) end
16:28 rubenwardy https://user-images.githubusercontent.com/2122943/60197276-0241ca00-9837-11e9-810e-0a23cccb33b3.png
16:29 calcul0n tumeninodes, wait, i just didn't get what you were doing :)
16:30 calcul0n i think you must replace set_int("handle", nil) with set_int("handle", 0)
16:30 calcul0n and test if handle ~= 0 then...
16:30 calcul0n hopping 0 is not a valid handle
16:32 tumeninodes It's aliiiiiive! 0 works. Thank you everyone for all the help and patience I greatly appreciate it
16:33 tumeninodes so the first call has to set_int and second to get_int... got_int
16:34 tumeninodes "Oh no you di_int"
16:34 tumeninodes these are the jokes people...
16:51 tumeninodes is it possible, that one mod cannot have two separate nodes using (handle), using the same number? i.e. node1 uses (handle, 0) and works fine but, if node2 uses (handle, 0) when it is right clicked off, the sound continue to play without turning off
16:51 tumeninodes this is what I am running into now, testing
17:23 tumeninodes here's the goofy mod you all so kindly helped me with today. https://github.com/TumeniNodes/fireplace eventually I will clean up the code but, the only issue now is that only one fireplace sound works correctly when rightclicked off, the other just continues to play on a loop. Only way to stop it now is to exit the game and come back. Any ideas why?
17:23 tumeninodes !title
17:23 MinetestBot tumeninodes: GitHub - TumeniNodes/fireplace: A goofy and quick mod which adds 3 types of fireplaces, decorative only for now.
18:08 LoneWolfHT @tumeninodes https://github.com/TumeniNodes/fireplace/pull/1
18:09 LoneWolfHT Oh, forgot to mention I tidied up the code style a little. Not sure if it's to your tastes or not...
18:59 tumeninodes LoneWolfHT, cool thanks it looks good at quick glance, I'll look at it better later tonight. I threw it together on the fly about a year ago for something I was building and going through those sort of mods slowly to clean my HD up.
19:01 tumeninodes calcul0n, my apologies, I had been catching the "cal" of your name and thought you were Calinou XD. Thank you for the help as well.