Time Nick Message 15:47 deltasquared another daft question time: how do I make it so that an entity does not have a selection hitbox, but still has a collision box? 15:48 deltasquared would that be the physical attribute (but I still need it to collide with other entities) 15:51 deltasquared essentially a player is attached to it and the collision box has to include their head, but I wish for players to be able to point at things outside of it in any direction 15:51 deltasquared in other words, it shouldn't really be selectable 15:52 deltasquared I'm not sure from the manual's wording which attribute this would be 15:52 deltasquared physical = false seems like it would do it, but apparently then other objects don't collide with it from the comment on collide_with_objects 15:55 deltasquared wait scratch that, physical isn't what I'm after 15:55 deltasquared hmmm 15:56 deltasquared ... ah, is_visible does it 15:56 deltasquared but then one will not know it's there. guess I'll have to use a nametag instead 15:58 deltasquared oh great, but then the player becomes invisible as well 16:06 paramat maybe a selectionbox of size 0,0,0? 16:07 deltasquared paramat: you can set cbox and sbox independently? 16:07 deltasquared if you can, it's not documented 16:07 paramat i think so 16:08 deltasquared ok, where do I go in the source code to see where it reads the object property table 16:08 deltasquared actually, let's try grep -FR collisionbox and see what comes up 16:08 paramat https://github.com/minetest/minetest/blob/6bd4cb9f7e83afaf16c11a1b5451753144c6521c/doc/lua_api.txt#L5214 16:09 paramat the 2 boxes have been independent for years 16:09 deltasquared paramat: oh, I see it there, is that in stable though 16:09 deltasquared hmmm 16:09 deltasquared pointable = false, that looks handy 16:09 paramat oh, maybe 'pointable = false'? 16:10 paramat in stable yes 16:12 deltasquared paramat: I've just tried both properties on 0.4.17. no dice 16:16 deltasquared ah, there is a feature flag, let's have a look at that... minetest.features.object_independent_selectionbox 16:17 deltasquared nope, flag not there on .17 16:17 deltasquared welp, that's going to be annoying 16:18 deltasquared why do such useful core features always seem out of reach... 16:20 Krock deltasquared: update to 5.0-dev 16:21 deltasquared Krock: kinda hard to tell a server to do that ;) 16:21 Krock yes, because the server won't listen to anyone 16:21 deltasquared besides, it's called -dev for a reason surely 16:23 deltasquared Krock: alas, try persuading BillyS to do that. I think that argument would be shot down with two words: android users 16:24 Krock I know that argument. Servers would be empty without android players because they seem unable to install a development apk 16:24 deltasquared too much of a hassle to ask the average user, apparently... 16:25 deltasquared if the majority of clients won't do it, the servers won't do it, and that leaves me without a target audience for mods, at which point there's no cause for me to do anything at all 16:25 deltasquared so I have to stick to stable >_> 16:25 Krock brb 16:26 paramat hm ok i thought pointable = false for entities wasn't a new feature 16:27 deltasquared paramat: I would have thought that for many things which would seem obvious to have from the very beginning, but alas no. 16:29 deltasquared huh, there was one thing that came to mind... I've forgotten it now. I retract that statement until I can recall the example 16:48 paramat well :) all good ideas seem obvious to have from the beginning, it just takes time to add them 16:49 deltasquared it's not like the entity is cripplingly broken without it, just that players won't be able to interact with things while attached 16:50 deltasquared for reference, it's a physics entity of sorts, meant to allow players to be thrown about 16:50 deltasquared anyway afk dinner 17:37 Krock paramat: right, "pointable" is also a 5.0-dev feature, but was added quite early after 0.4.16 17:38 Krock deltasquared: if it's just about making them not pointable, then attach the object to another 17:38 Krock and also add pointable = false to make it work with 5.0-dev 17:39 deltasquared Krock: but then, the other entity would have to possess an appropriate cbox. back to square one 17:39 deltasquared due to what I'm doing, I can't use offsets and such 19:35 Alexand{er|ra} The people in #Lua aren't very helpful, so I guess I'll ask here too. Is there an easy way to find the intersection of two patterns? 19:35 Alexand{er|ra} I'm trying to find what drop combinations are possible using the tool-dependent pattern matching. 19:41 sfan5 what is a "pattern" in this case 19:43 Krock string.find/match probably 19:47 Alexand{er|ra} sfan5: It's used by string.find(). Specifically, it's this feature: . 19:58 deltasquared Alexand{er|ra}: intersection... is that which matches both patterns? 19:59 deltasquared or specifically the subset of a string matching both... that would be beyond my knowledge of regexes 20:04 Alexand{er|ra} deltasquared: Yes and no. I only need to know if there *is* an intersection, as well as if there is a diversion between the two. I don't neen to know the exact intersection. But yeah, it seems rather complicated. 20:09 deltasquared Alexand{er|ra}: if there is only one match in the string, it would be easy, test both patterns, then see if the ranges overlap 20:10 deltasquared I think 20:10 deltasquared not too sure 20:10 deltasquared if there are multiple matches, you'd potentially have to test each range of one with every other range in the other 20:10 deltasquared O(m*n). oof 20:11 deltasquared Alexand{er|ra}: at this point I have to enquire what it is you're trying to achieve to wind up with such an arcane task heh 20:13 Alexand{er|ra} deltasquared: I'm trying to predict what drops are possible, then use those drops for gathering digging stats. I recently found out about this tool-specific matching in Minetest, so now I need to update my minestats mod to account for it. 20:14 deltasquared hmm, beyond my head right now then 20:15 Alexand{er|ra} Yeah, unfortunately beyond mine as well. 20:16 deltasquared I wouldn't mind investigating further but currently my head is full of haskell 20:16 Krock maybe try finding an easier/KISS approach? 20:17 Alexand{er|ra} Krock: What easier approach will result in the correct answer every time? 20:17 Alexand{er|ra} I've got a simpler solution, but it gets the wrong answer at times. 20:28 Alexand{er|ra} Hmm. Maybe I need to break complex patterns into multiple simpler patterns, such that if something matches any of the simpler patterns, it necessarily matches the original pattern, and if something does not match the original pattern, it necessarily doesn't match any of the simpler patterns. 20:29 Alexand{er|ra} If I do that in such a way that I eliminate certain regexp characters, it might make finding pattern overlap easier. 20:35 Alexand{er|ra} Oh, lovely. Lua has locale-dependant modifiers in its regexp syntax. I don't think I have any way to account for that. 20:38 Alexand{er|ra} Actually ... I think Minetest would protect me from most questionable characters. Only certain characters are even allowed in item names. Unless the ": 20:38 Alexand{er|ra} Actually ... I think Minetest would protect me from most questionable characters. Only certain characters are even allowed in item names. Unless the ":" syntax overrides the check. I think it might. 20:54 Alexand{er|ra} Actually, breaking patterns up won't work either, now that I think about it. I'd hoped to eliminate things such as character classes, but with the "*" modifier, I can't break character classes down into something finite. 23:30 MinetestBot 02[git] 04paramat -> 03minetest/minetest: texture_packs.txt: Add information for leaves texturing (#7637) 1303f89e8 https://git.io/fNb39 (152018-08-13T23:30:13Z)