Time Nick Message 03:27 cheapie Random screenshot, techage thermal energy storage (largest size, two of them): https://cheapiesystems.com/media/images/screenshot_20241224_212222.png 03:29 cheapie Collider room in the basement of the same building: https://cheapiesystems.com/media/images/screenshot_20241224_212917.png 03:30 cheapie I don't know how much concrete I went through building that place, but I went a bit crazy with the production and still have 23025 concrete sitting in a drawer. 04:07 erle cheapie does technic etc. have flying machines? 04:07 erle cheapie also, have you ever been to an anarchy server? 04:09 cheapie I don't think technic has any (but I don't really like technic, so no idea). techage doesn't but it's often paired with digtron 04:09 cheapie And no, more or less 11:10 sfan5 !tell LandarVargan ping 11:10 MinetestBot sfan5: I'll pass that on when LandarVargan is around 11:11 sfan5 cheapie: is it possible to visit the server/place where these builds are 14:03 ireallyhateirc do entities always wiggle when rotation is set? 14:05 ireallyhateirc the process of rotating appears to be visible rather than instantenous 14:33 MTDiscord Merry Christmas everyone! Been so happy to join this community and contribute with you all 🙂 14:57 Krock Thanks. Merry X, Y and Z mas for you as well 14:59 MTDiscord ireallyhateirc: set_rotation is interpolated. you don't get control over the interpolation and it is slightly broken because it doesn't use quaternions. 15:00 ireallyhateirc hmmm it's always about them quaternions. Well at least I know I can't do anything about that 15:00 MTDiscord sadly you can 15:00 MTDiscord the bone override API has controllable interpolation 15:01 MTDiscord so you could abuse that 15:01 MTDiscord in some cases it won't even be abuse 15:01 ireallyhateirc I think it's not worth it in the end. I can live with toilets that wiggle in my shelf: https://files.catbox.moe/6frzli.mp4 15:01 MTDiscord NO NOT WIGGLING TOILETS 15:03 ireallyhateirc I'll just pretend the effect is on purpose 15:22 ireallyhateirc Ok this toilet wiggling is annoying 15:22 ireallyhateirc it also wiggles when I place an item 17:34 ireallyhateirc Is there any sane way of merging several callbacks into one? For example when there are nodedef callbacks defined by modders and my mod adds an extra callback on top. 17:34 ireallyhateirc I can imagine something that takes the old callback and calls it from the new callback 17:36 ireallyhateirc It is technically possible but the real question is: should I do that? 17:36 freq hm 17:37 ireallyhateirc something like append_callback(nodedef, "on_construct", callback_function) 17:38 ireallyhateirc The problem is when 1. order matters 2. the callback makes byproducts (like returning an itemstack with on_rightclick) 17:41 Soni has anyone made a fully functional cave world yet 17:52 Soni also can you use third-party contentdb yet 17:53 Soni you can, nice 17:55 Soni tho there are none yet 17:56 whosit ireallyhateirc: https://www.gnu.org/software/emacs/manual/html_node/elisp/Advising-Functions.html :D 18:26 cheapie sfan5: Yes - those two are on Cubika, in "building 4" in my area - -576,6,258 (not too long of a walk from the spawn) will get you close to that building, and then the collider is one floor down (floor CL) and the energy storage is 6 floors up (floor ST) from there, there are elevators and stairs in the back. 18:28 cheapie Buildings 1-3 are not open to the public, building 4 is but it's not entirely done yet 18:28 ireallyhateirc whosit, now we only need to rewrite Luanti in Elisp 19:06 MTDiscord ireallyhateirc: store the current function in a local var, then define a function with your logic that returns the orginal function at the end 19:07 ireallyhateirc that's what I did, I just try to predict any pitfalls and/or generalize this into something more reusable 19:08 MTDiscord use vargs so if more arguements are added you dont have to care. other than that, tis fine 19:11 ireallyhateirc hmmm sounds good then 19:12 whosit it can be a disaster if many mods do it or function signature changes :p 19:13 whosit we had very tricky bug because bunch of stuff was overriding functions and one didn't pass all arguments - was looking for a bug in one mod, it was completely elsewhere 19:15 ireallyhateirc I'm not making that kind of mod soup but I'm doing an API for shelves (and other item stores). You can add items to a shelf by right-clicking and such and because of that a few callbacks need to be added to the node registered as an itemstore. 19:15 ireallyhateirc So I want to preserve original callbacks rather than purge them 19:15 whosit I say local old_func = blah; blah = function() ... old_func() end --- is a sign of a lack of good API 19:16 erle has anyone made a fully functional cave world yet 19:16 erle Soni cora i think has made a mineclone cave world generator 19:16 erle it's only mineshafts and caves forever 19:16 ireallyhateirc whosit, I'm doing a shelf mod, I can't really predict whatever modders may want to do with it 19:16 ireallyhateirc so I either preserve the callbacks or purge them 19:17 erle Soni https://content.luanti.org/packages/cora/mcl_stoneblock/ 19:17 erle > The claustrophobic anti-skyblock challenge - everything is there but covered in stone, mine-to-win DO NOT USE WITH EXISTING MAPS! 19:17 ireallyhateirc I could indeed purge all callbacks that conflict with those I add with my mod and let modders deal with the mess 19:18 whosit yeah, conflicting callbacks is also confusing. I still don't know how engine decides which one to call when you click an entity with an item 19:20 whosit sorry, I may be talking past you, because I don't know what exactly you are implementing and I'm too distracted... 19:21 ireallyhateirc nah, it helps. At least I get the whole picture 19:22 Soni erle: not like that. like this: https://minecraft.wiki/w/File:Buffet_world_with_the_Caves_generator_and_checkerboard_biomes_of_size_0.png 19:23 MTDiscord ireallyhateirc: depending on which callback, there might be a global register on (callback) 19:24 ireallyhateirc I'm talking about callbacks that are registered in the nodedef, I suppose global callbacks run on top of them? 19:25 MTDiscord yeah 19:27 whosit you want it to work kinda like an item frame? 19:28 whosit place item on a shelf with a right-click? 19:30 ireallyhateirc gimmie a second, I'll upload a video 19:32 ireallyhateirc whosit, like this: https://files.catbox.moe/lmtctg.mp4 19:36 whosit nice :D 19:38 whosit you think you need to call item callback yourself? 19:38 whosit idk how it's supposed to work to be honest :p 19:39 ireallyhateirc the API takes a nodedef and adds callbacks to it, then registers the node 19:40 ireallyhateirc the question is: should it preserve original callbacks in any way? 19:40 whosit wait, is it a general "shelf api"? 19:41 ireallyhateirc it's supposed to, yes. Basically turn anything into shelf 19:41 whosit ah, I see now 19:41 ireallyhateirc I called it "itemstore_api" because in reality you'll be able to put items into any kind of node 19:42 ireallyhateirc for example on non-grid-aligned tables 19:42 ireallyhateirc or even into the toilet 19:43 ireallyhateirc but because it's supposed to be general users could want something to happen along inserting the item and such 19:43 ireallyhateirc which usually is done by callbacks 19:44 ireallyhateirc I could probably purge the original callbacks and tell users of the API to use shelf-related callbacks 19:44 whosit if it's for defining new type of "shelves", providing your own API would make sense, like "on_item_put", "on_item_take" etc 19:45 whosit and "can_take_item" ;) 19:49 ireallyhateirc sounds decent I guess 19:51 MTDiscord ireallyhateirc: this "pattern" is typically called "overriding" or "monkey-patching". it unfortunately can't be abstracted very well from within lua, so i suggest you just type it out every time. 19:51 MTDiscord it is a powertool but don't let it turn you into a powerfool ;) 19:52 MTDiscord whether a function may be overridden should be part of the API contract. there are some luanti callbacks that are to be used in this way. 19:52 whosit does not like overriding is needed? it was just me who got confused what this is about 19:53 ireallyhateirc well my intuition tells me it's a terrible idea so I'll simply purge the original callbacks and call it a day 19:53 MTDiscord i mean in the end what you'll be doing here will be similar to overriding, though overriding is sort of reserved for after-the-fact mutating of callbacks 19:53 MTDiscord ireallyhateirc: no! 19:54 MTDiscord or rather, you can do it, if you're fine with having a more restricted api; then your users will probably do the monkey-patching to break free from your chains :D 19:54 MTDiscord but really, why not delegate here? first run your logic, then run the user-provided logic, if there is one. 19:55 ireallyhateirc hmmmm I can do that but what about on_rightclick which gets an itemstack and returns an itemstack? 19:55 ireallyhateirc the shelf eats the itemstack 19:56 ireallyhateirc should I pass the original itemstack to the other callback or should I give it the leftover one? 19:58 MTDiscord depends on what kind of API you want to provide. make a decision and document it. if you want to overengineer your API, you could even have callbacks for both. 19:59 ireallyhateirc I'll think about it. Anyway, thanks for the advices, it helped me gather thoughts. 20:27 erle if it's for defining new type of "shelves", providing your own API would make sense, like "on_item_put", "on_item_take" etc 20:27 erle look at hopper too 20:28 ireallyhateirc hopper what? 20:29 erle how mineclonia handles hoppers and containers in general 21:25 ireallyhateirc In the end I decided to run the original callbacks before the shelf callbacks. Now users can implement a shelf that turns anything into asphalt 21:42 erle ireallyhateirc does your shelf work with hoppers? 21:43 cheapie I wonder if there's a mod that makes saplings make a subtle *pop* sound when growing into trees, or if I need to write that sometime... 21:45 ireallyhateirc erle, that's up to mineclonia/voxelibre/whatever to work out. 21:45 ireallyhateirc Each shelf has inventory in its meta and I provide basic API like itemstore:add_item(itemstack) 21:46 ireallyhateirc so you could technically add support for hoppers and such 21:47 ireallyhateirc The mod is here if you're curious: https://codeberg.org/perfect_city_game_studio/itemstore_api 21:47 ireallyhateirc but right now there's 1. no documentation 2. no examples 21:48 ireallyhateirc I need to add more stuff, document it and if it works well enough in Exile then I'll publish it on ContentDB 21:49 erle ireallyhateirc do you have tests? usually, unit tests can serve as both examples and documentation 21:51 ireallyhateirc right now? no. Do I plan writing that? Probably not, who knows. I'd have to install the software for unit tests on my meme distro 21:51 erle what 21:51 erle lol 21:51 erle i mean tests can simply you having a single lua file that is using that API 21:51 ireallyhateirc I'll provide example shelves later 21:51 ireallyhateirc erle, I could do that too yeah 21:52 erle ireallyhateirc like, stuff like this: https://git.minetest.land/erle/tga_encoder/src/branch/master/examples.lua 21:53 ireallyhateirc I could do that, the question is whether I'm motivated enough 21:53 erle seriously, without *using* your API or having tests, how are you confident enough in it? :D 21:53 ireallyhateirc it's primarily for my Perfect City game and Exile. If it works there then it works. 21:54 erle oh i see, you *are* using it 21:54 ireallyhateirc but since I made it I considered I could share it with the rest of the Luanti world 21:54 erle sorry for misunderstanding 21:54 ireallyhateirc erle, here's a demo: https://files.catbox.moe/lmtctg.mp4 21:55 MTDiscord yeah unit tests are great 21:55 ireallyhateirc well, I'm not crazy enough to write software I'm not going to use 21:56 erle lots of people are 21:56 erle like, i maintain an implementation of the redo build system … and it seems a lot of people write half-finished buggy implementations of it *as a toy* 21:56 MTDiscord even if you are the only user, you'll eventually find that unit tests save you from tediously repeating regression tests yourself 21:56 erle they never build software with it 21:56 ireallyhateirc people who rewrite X in Rust 21:56 erle luatic i have found that this is a wisdom that has to actually be experienced 21:57 erle luatic like LANGSEC, many people's intuition is “doing it this way, methodically, will not save me work and take much longer” 21:57 erle so you have to force people to do it 21:57 ireallyhateirc luatic, I'm aware that unit tests are great but what I work on depends priparily on my ADHD hyperfixation 21:57 erle easy out: make testing your new hyperfixation ^_^ 21:57 ireallyhateirc primarily* 21:58 erle testing is really undervalued among hobbyists 21:58 ireallyhateirc maybe I'll do some tests if I feel like it later, first I need to finish all features though 21:58 erle many regressions i have found are so simple to catch 21:59 erle campfires not burning anything in mineclonia for example 21:59 erle or the “grass below sea level” thing 21:59 erle which, by the way, will provide excellent player trails once it is fixed. you will be able to follow paths that users took into newly-generated biomes on 5.10 21:59 erle there are a bunch of other tricks 21:59 erle fortunately, griefers are mostly too stupid to use them 22:00 ireallyhateirc how do I test if a player can put an item into a shelf? Spawning a dummy player-like entity that'd punch the shelf? 22:00 erle you can use fake players *or* you can use a CSM obviously 22:00 ireallyhateirc I have no experience with writing CSMs 22:00 erle the latter is harder to automate 22:02 erle ireallyhateirc here is a funny one for you to laugh about https://repo.or.cz/waspsaliva.git/blob/HEAD:/clientmods/undying/init.lua 22:02 erle it does /sethome on taking damage and /home on death 22:03 erle and autodigs the bones 22:03 ireallyhateirc are there any tutorials/documentation for writing CSMs ? 22:03 erle voila, immortailty 22:04 erle no idea 22:04 erle this one eats when you are hungry: https://repo.or.cz/waspsaliva.git/blob/HEAD:/clientmods/autoeat/init.lua 22:08 ireallyhateirc hmmm I'm cloning that repo, some good examples are there 22:08 erle waspsaliva is coras client 22:10 erle here are some dragonfire (lizzy's client) CSMs https://github.com/orgs/dragonfireclient/repositories 22:11 erle haha there is one to aim bows at players that automatically includes gravity: https://github.com/dragonfireclient/bowaimbot 22:11 erle https://github.com/dragonfireclient/bowaimbot/blob/master/init.lua