Time Nick Message 01:36 Copenhagen_Bram I wonder... how would a p2p minetest server work? 01:42 Calinou it wouldn't? :P 01:42 Calinou there would be little benefit compared to the downsides 01:42 Calinou (let alone the sheer amount of work required) 01:42 Calinou the fact the world is persistent makes that difficult in the first place 01:42 Calinou (think of a torrent, if nobody seeds it, you can't get the file at all) 01:51 Wuzzy what about a p2p server list? 02:48 scr267_ !mod blox 02:48 MinetestBot scr267_: Opposite Blocks[oblox] by StarNinjas - https://forum.minetest.net/viewtopic.php?t=20205 02:49 scr267_ Anyone having issues with the forum? 02:51 scr267_ !mod bobblocks 02:51 MinetestBot scr267_: BobBlocks [bobblocks] by RabbiBob - https://forum.minetest.net/viewtopic.php?t=1274 02:52 Sketch2 hmm, yea forum replies 502 Bad Gateway nginx/1.12.2 02:52 scr267_ Oh hum, yep FYI 502 NGINX errors 02:52 scr267_ LOL, yeah just saw that too 02:52 scr267_ Well that confirms it for me, thanks Sketch2 02:56 Corey[m] Same here 02:57 scr267_ !mod books 02:57 MinetestBot scr267_: Books plus [books_plus] by red - https://forum.minetest.net/viewtopic.php?t=12140 03:45 Quiark forum is back up so I can continue being totally unproductive 03:48 scr267_ :) 09:05 Quiark cool stuff in the screenshots thread 16:15 AkRa_ hi! 19:21 MinetestBot 02[git] 04sfan5 -> 03minetest/minetest: Optimize semaphore wait with zero timeout on POSIX 1349365b2 https://git.io/JeryS (152019-11-14T19:20:14Z) 20:02 MaybeItsMia Is it possible to "append" statements to an already existing function in Lua? 20:02 rubenwardy yes, define a new function which wraps it 20:03 rubenwardy local old = func; func = function() old(); stuff end 20:03 MaybeItsMia Would I get the new functionality by calling the old function? 20:04 rubenwardy err 20:05 rubenwardy if you called func() you would 20:05 rubenwardy however, the old function still exists the variable has just been redefined 20:07 MaybeItsMia Wait so is the function acting like a variable? 20:07 rubenwardy yes, functions are first class in lua meaning that they are stored in variables 20:09 rubenwardy well, first class actually just means that functions are values like any other value 20:12 MaybeItsMia ugh, tbh what I'm thinking about might not be the best way to do what I want. I'm working on a mod to play background music like MC, playing a random track at sunrise, sunset, and whatnot. I do have a mod that works using "register_globalstep" to check every second if it's a particular time of day, but it would be nicer to have a system where I 20:12 MaybeItsMia could define "triggers " to easily just run a function at points in the day that I determine 20:14 rubenwardy sounds like you want the observer pattern 20:14 rubenwardy !book design 20:14 MinetestBot rubenwardy: Nothing found. 20:14 rubenwardy !book clean 20:14 MinetestBot rubenwardy: Intro to Clean Architectures - https://rubenwardy.com/minetest_modding_book//en/quality/clean_arch.html 20:14 MaybeItsMia oh thanks! 20:14 Krock !book pattern 20:14 MinetestBot Krock: Nothing found. 20:15 MaybeItsMia I basically know how to code, I'm not super familiar with actual best practices, or designing code, ha ha 20:16 sfan5 well it's not like you can use this pattern without anyone giving you the event you need 20:16 sfan5 and afaik there is no way to specifically listen to changes to in-game time 20:16 rubenwardy it sounds like they are the author of the mod which checks the time of day 20:17 MaybeItsMia I mean register globastep works, I'm just concerned about how computationally intensive it might be. Also It's not super extensible 20:31 MaybeItsMia Is there more examples of the observer pattern? I'm having my trouble wrapping my head around it? 20:34 rubenwardy every where in the Lua API 20:34 rubenwardy register_globalstep is an example of the observer pattern 20:35 MaybeItsMia Implementation I mean 20:35 rubenwardy it's a fancy term for callbacks where the thing making the callback doesn't care who is listening 20:35 rubenwardy the book already contains an example 20:36 MaybeItsMia So I want to get to the point where I can say: 20:38 Sketch2 you could make it so it doens't check time absolutely ever clock-tick. just have it do it when someone speaks, or joins / parts the server 20:38 MaybeItsMia mymobs.register_on_timeofday() do stuffend) 20:39 MaybeItsMia Sketch2 I already have it running every second instead of every tick 20:39 Sketch2 ok, but my point was that you were worried about it being computationally expensive. 20:40 Sketch2 the time change you're looking for is measured in hours, not seconds 20:40 Sketch2 so you can cut back on the number of checks 20:40 Sketch2 this will save you vast amounts of processing power 20:43 MaybeItsMia I'm weirdly anal about the music starting at exactly sunset.... though I guess I could have it check every minute or so, then if it's within a minute of sunset I could have it que the music to play in the remaining time till the point I want to play it, though that might be a bit hacky, and lead to weirdness if people skip around time. 20:43 MaybeItsMia *sunrise, though it doesn't make much of a difference to my point 20:44 MaybeItsMia weirdly in minetest sunrise does not take place at exactly .25, but actually a bit before that 20:58 Krock there's some value specified in the code that defines the sunrise 21:48 AlexYst What does the v7 caverns flag do? I thought it was responsible for the larger caves, but when I turn caves off and caverns on, I get a completely-solid earth, with no air pockets in the ground.