Time Nick Message 11:20 jas_ !mod 11:20 MinetestBot jas_: EarthCraft by FlameFireling - https://forum.minetest.net/viewtopic.php?t=21447 14:13 MTDiscord <08f​reshreplicant> This is the code I'm looking at adapting - in testing I got it to work for anything called 'sword' with my own sounds. But there' so many if statements, that set up the ability to toggle sound on and off, that I'm not sure where to put in extra if else statements, e.g. to detect if something fleshy is being hit, an object, or nothing. 14:13 MTDiscord <08f​reshreplicant> https://github.com/sirken/laser_mod/blob/master/init.lua 14:20 Krock for _, player in ipairs(minetest.get_connected_players()) do 14:20 Krock a bit faster than callbacks on join/leave plus manual list 14:21 Krock > , e.g. to detect if something fleshy is being hit, 14:23 Krock weird. I thought there was some builtin code to damage swords when entities are hit 14:25 MTDiscord <08f​reshreplicant> I think I'll strip out the toggling sound part, because if the mod will be primarily sound based at first, there's no point if people can toggle it off. 17:20 dievri Good evening! Today i'm testing NPC framework. I set walk position, the NPC is going to this point, and then returning. Why it can be? 17:24 MTDiscord <08f​reshreplicant> It has achieved conciousness. 17:24 MTDiscord <08f​reshreplicant> The singularity. 17:44 Nicomem141 Hello Guys, 17:44 Nicomem141 Where are the user passwords stored? 17:45 pyrollo Hi, Depends on the auth backend 17:45 pyrollo Either in a text file or a sqlite db 17:46 Krock just browser your world's directory 17:47 pyrollo Hi Krock 17:47 Krock hi pyrollo 18:09 uhrenmacher Hello People! 18:11 jas_ hi 18:11 uhrenmacher I just began to play this game 18:11 uhrenmacher hello 18:11 jas_ you like it? 18:11 uhrenmacher yeah, it is awesome. the amount of mods really suprised me 18:12 uhrenmacher tbh the greatest motivation to play this game was that it is completely open source 18:12 jas_ yeah that's great 18:12 jas_ lots of content, fun to mod 18:13 uhrenmacher How yeah, normally I do not play that much games, but this is really good...and the IRC is not that incative as well 18:13 uhrenmacher I am glad to see someone on the IRC 18:14 jas_ they linked it to a discord i guess 18:14 jas_ and some servers are also linked to irc 18:14 MTDiscord <12a​ndysphinx> hello from the discord! I am also new 18:14 jas_ the forum is nice, and github repo has a lot of activity 18:15 jas_ also minetest.reddit.com if you like that 18:15 jas_ !server 18:15 MinetestBot jas_: SharpNet.Cz | 37.143.112.79:3000 | Clients: 0/99, 0/0 | Version: 5.4.0-6dcc9e633 / minetest | Ping: 25ms 18:15 jas_ nice 18:15 uhrenmacher I am not on reddit, at least I do not have an account there, but the Discord is good 18:18 jas_ i heard a lot of good things about nodecore, did you play it? 18:18 uhrenmacher actually not 18:19 jas_ hm, i need to learn blender :'( 18:19 jas_ !mod nodecore 18:19 MinetestBot jas_: NodeCore by Warr1024 - https://forum.minetest.net/viewtopic.php?t=24857 - https://gitlab.com/sztest/nodecore 18:58 jas_ !title https://youtube.com/watch?v=QlGaV4b9cAw 18:58 MinetestBot No title found. 19:15 specing Does anyone know if there is a keybind that drops only one item from a stack? q drops the whole stack 19:15 specing or is there a way to rebind q to only drop one item? 19:16 heavygale hold shit? or control? while dropping,… 19:16 heavygale can'T say for sure which it is 19:16 heavygale maybe alt? :D 19:16 heavygale *shit=shift :D :D 19:17 specing heavygale: ah indeed that works, thanks 19:23 Krock Alt+F4 19:40 MTDiscord <04L​one_Wolf> Ctrl+Alt+f4 on Linux 19:42 MTDiscord <11G​reenXenith> Its Alt+F4 on all systems 19:43 Krock even those with altered hotkeys 19:50 MTDiscord <11G​reenXenith> Is there a callback for when the server itself is loaded? on_mods_loaded is called before the server is loaded, and it seems that is the case for the minetest.after queue as well 19:50 MTDiscord <11G​reenXenith> Or at least some event that cant/doesnt happen until the server is up 19:53 Krock minetest.after is triggered by globalstep 19:53 MTDiscord <11G​reenXenith> Which is why I thought it would work 19:53 Krock on_mods_loaded comes before the content is initialized 19:53 MTDiscord <11G​reenXenith> right 19:54 MTDiscord <11G​reenXenith> and I want a hook for after content is initialized 19:54 MTDiscord <11G​reenXenith> I thought that the server step process didnt start until after the server was loaded and content was initialized 19:55 Krock callback is run here: https://github.com/minetest/minetest/blob/master/src/server.cpp#L410 19:56 MTDiscord <11G​reenXenith> The server environment doesnt initialize until after media is cached 19:56 Krock which makes sense 19:56 MTDiscord <11G​reenXenith> therefore globalsteps and .after shouldnt run until after media is cached 19:56 MTDiscord <11G​reenXenith> Unless media caching is sync 19:56 MTDiscord <11G​reenXenith> async* 19:57 Krock single-threaded until everything's set up 19:57 MTDiscord <11G​reenXenith> Well I am not experiencing this behavior I am seeing 19:58 MTDiscord <11G​reenXenith> I am writing some media in a mod and then removing it in a .after hook to load the media and then remove it, and the client media loading hangs if the .after delay is too low 19:58 Krock how do you remove media? 19:59 MTDiscord <11G​reenXenith> Just removing the files using os.remove .. in theory it should already be cached 19:59 Krock the texture name is cached and its hash value 19:59 Krock but the file contents aren't 20:00 MTDiscord <11G​reenXenith> Are they cached once read? 20:00 Krock probably, but better don't rely on that so that unused media can unloaded by the client somewhen 20:00 Krock to truely remove media once it's no longer needed in the game session 20:01 MTDiscord <11G​reenXenith> Makes sense .. that means I should either do it in an on_shutdown hook or dynamically make a worldmod 20:01 dievri hello. Is there any function like minetest.register_globalstep, but which is called not so often, perhaps 3-5 seconds 20:01 dievri ? 20:01 MTDiscord <11G​reenXenith> the worldmod method may be better that way the mod wont have conflicts if used by two servers simultaneously 20:02 MTDiscord <11G​reenXenith> dieveri: You can use a globalstep and only call your desired code every 3-5 seconds by using a timer variable incremented with the globalstep dtime 20:03 MTDiscord <11G​reenXenith> If you dont want to register a globalstep, you can use a recursive minetest.after function which will add to the already-existing minetest.after queue 20:03 MTDiscord <11G​reenXenith> dievri* 20:03 Krock which causes a stack overflow after some thousands of years of server uptime 20:03 Krock or no 20:04 MTDiscord <11G​reenXenith> It shouldn't 20:04 Krock it's not recursive, so that won't happen 20:04 MTDiscord <11G​reenXenith> its only "recursive" 20:04 MTDiscord <11G​reenXenith> (emphasis on the quotes) 20:06 dievri minetest.after called just once? 20:06 MTDiscord <11G​reenXenith> Correct, inside your "recursive" function 20:07 MTDiscord <11G​reenXenith> something like local function yourfunction() --[[do stuff]]-- minetest.after(3, yourfunction) end yourfunction() 20:07 dievri sounds good, I will try this 20:10 dievri cool, this is exactly what I needed. thank you 20:42 MTDiscord <13G​enshin> Howdy