Time Nick Message 02:38 nekobit https://github.com/minetest/minetest/blob/514e106414961784cfc9d55e375916747160e58d/src/client/game.cpp#L4452 02:38 nekobit I'm 100% dumbfounded here 02:38 nekobit How is it displaying keyboard controls? 02:39 nekobit Control text is literally just not set here..... 02:40 nekobit I only see it mentioned in the gettext files... how tf?? 02:45 nekobit If someone can explain this, quite literal, dark magic, I'd really appreciate it 02:51 nekobit Ok, figured it out. Zughy broke this in an old commit, and I was comparing Minetest 5.8.0. https://github.com/minetest/minetest/commit/c2c8d4d4100100cc5f68eabf42d431887a514571 02:54 nekobit There looks to be justification of this regarding that it's an outdated page, so I guess this could be a good opportunity to revamp controls and such anyway 04:36 nekobit https://files.catbox.moe/pxjijl.png 04:37 nekobit SO.. i got it working. However, there's an issue. I had to essentially kill any form of client security 04:37 nekobit If I don't kill client security, i can't access builtin/settingtypes.txt 04:37 nekobit I'm not sure how to approach this... 04:38 nekobit Right now, i'm just ignoring io.open whitelisting and not returning *builtin*: for the path 04:38 nekobit but what i thought of was to add an exception for io.open to parse *builtin*:somefile.txt as expected 06:33 MTDiscord why not add an API that exposes the contents of builtin/settingtypes.txt 06:34 MTDiscord (well it ideally needs mod/game settingtypes.txt too) 06:35 MTDiscord nekobit: note that the event/input handling shouldn't be reimplemented in C++, you should use the existing Lua callback and hook it up with the CSM API 06:36 nekobit grorp: I couldn't figure out how to get the Lua callbacks to work :( 06:37 nekobit luatic: I thought about that, but for now my method works, so im gonna do that until someone objects 06:39 MTDiscord I think the function is called core.register_on_formspec_input 06:40 nekobit I tried that and it didn't work. Also, the docs mention "inventory" for some reason but not sure if thats a mistake 06:40 nekobit Unless i'm doing something wrong, but I couldn't get my callbacks to come through 06:42 nekobit I'll improve things tomorrow. Got live fov changes, I'm in a "just happy to see things working but really ready to sleep now" phase of commiting so things may look ugly 06:52 MTDiscord nekobit: wouldn't it be better (or is it not possible?) to run the pause menu-related stuff in the mainmenu env? 06:56 Mantar main menu env is unloaded when the game starts, apparently 06:56 nekobit y5nw: In theory yes, in practice no 11:35 MTDiscord We could either expose that file, or perhaps have it preloaded in memory as plaintext. Then it's available later in the game Lua environment 11:37 MTDiscord I agree it would make sense for games to have their own pause sub-menu override. Something where the first few options are always the same, and one of the options is game options or something. It's good to have a consistent way to change Minetest settings, and quit the game. The rest should be left to game designers 11:56 MTDiscord But what if someone writes something rude in the file? 11:57 MTDiscord This is how I see some of the "bugs" being brought up in here 11:57 MTDiscord Now give me that game designer conf setting 11:57 MTDiscord This was my way to say I approve of that feature, thanks for listening 12:30 grorp merging #14780 in 10 min 12:30 ShadowBot https://github.com/minetest/minetest/issues/14780 -- CIrrDeviceSDL: Fix numpad key events not having correct KeyInput.Char by grorp 13:00 grorp What do we do about #14545? The straightforward solution involves the latest development version of SDL 3. Basically SDL 2 is missing a way to get a keycode that takes modifiers (e.g. shift) into account for a key event. We only get a keycode that doesn't take modifiers into account, so we can't set the correct KeyInput.Char value. 13:00 ShadowBot https://github.com/minetest/minetest/issues/14545 -- SDL: Some keybinds broken due to missing character lookup 13:01 grorp Can we work around this somehow? Obviously delaying the 5.9.0 release for SDL 3 wouldn't make any sense. Or do we change the default back to non-SDL for now? 13:03 grorp Or do we simply accept the breakage and decide that the migration to SDL is more important? 14:28 nekobit Thank you grorp for the PR suggestions 14:28 nekobit is the MT discord bot down? 14:29 nekobit rubenwardy: Think the bot is borked 14:31 rubenwardy discord staff have blocked you from IRC due to your username 14:32 rubenwardy as in staff of the mt discord 14:33 nekobit I know that, I mean vice versa 14:33 nekobit Oh, the bot just froze up, seems good now 14:35 nekobit grorp: Got the lua register_on_formspec_input working now, I guess i had to prefix the modname 14:35 nekobit Should maybe fix the client lua docs because they mention inventory for some reason 16:08 [MTMatrix] Any chance to see #14767 merged (not in this milestone) if I work on it? Or any core dev is opposed to the idea? 16:08 ShadowBot https://github.com/minetest/minetest/issues/14767 -- Provided a DEFAULT_PHYSICS value by Mahoyomu 16:08 nekobit Zughy, I wanted to ask you, was there a reason you removed the Keybind page on the pause menu? 16:10 [MTMatrix] nekobit: discussion in #13278 16:10 ShadowBot https://github.com/minetest/minetest/issues/13278 -- Don't show controls in the pause menu 16:15 MTDiscord that actually brings up that it would be nice to have some way to get the user's key binding as a human readable string for display purposes, like chat_send("press the " .. minetest.get_keybind_name("jump") .. " button to contine") sorts of things. This could be accomplished using client-side translation escaping, so it ends up with a string like @^BIND:jump@ or something, that gets applied client-side (and translated where possible) 16:15 MTDiscord and we don't necessarily have to actually send keybinding info to the server. For mobile it might just translate to something like "jump button" or "forward on the direction pad" or whatever gets the info across. 16:24 rubenwardy Yeah I support that 16:28 nekobit I may have to move the dlg_settings.lua formspec and such into its own file. Im doing some hacks to get it working 16:29 nekobit Regardless, everything (mostly) works 16:29 rubenwardy It was designed to be portable to the pause menu, only thing would be fstk in the pause menu 16:30 nekobit Well, im not using dlg. dlg causes some crashing 16:30 nekobit I'm actually turning off pkgmgr support, as for servers it wouldn't really make sense 16:30 nekobit er, the mod settings 16:32 nekobit so basically i just want to strip fstk from it 16:32 [MTMatrix] why not support mod settings when hosting a server or in singleplayer? some mod settings can be changed at runtime 16:33 nekobit I definitely could, but for one, mod settings is funky at runtime (mods are surely designed to not be changed at runtime). 16:33 [MTMatrix] but builtin settings are definitely more important 16:34 nekobit Also, if someone objects to me exposing io functions to the namespace, i'd need to cache the builtin settingtypes.txt into a string. Doing the mods as well would be tedious 16:35 sfan5 breaking the sandbox is not an option 16:35 nekobit I'm not breaking the sandbox 16:35 nekobit Im just whitelisting some io functions. IMO exposing io for client side mods shouldn't be a huge deal considering you can't download client side mods anyway 16:36 [MTMatrix] to avoid breaking the sandbox, you could simply add all the settingtypes.txt files to the virtual CSM filesystem 16:37 nekobit well, again, im not breaking it, but i thought about that whole *builtin*: thingy. But unfortunately, I couldn't get that to work, as the SecureClient didn't expose the io functions to begin with 16:37 nekobit also, *builtin*:settingtypes.txt wasn't valid 16:37 nekobit i could certainly *make* it valid, but i'd need to rewrite the safe io functions to work with client side mods as well 16:38 nekobit https://github.com/minetest/minetest/blob/b8959a0bac410cfe116ea13442248d470fac9b90/src/script/cpp_api/s_security.cpp 16:40 [MTMatrix] whether changing mod settings at runtime has an effect depends on how the mod uses the setting (whether it's cached or not, whether it's used for registration or not). 16:41 [MTMatrix] you can already change them at runtime using `/set`. if we make changing them at runtime much easier by including them in the menu, mod authors will probably adapt their mods to make it work better. 16:41 nekobit That's true. Also, changing world generation parameters on the fly would be pretty funny 16:42 sfan5 fwiw adding setting_set to CSM also breaks the sandbox 16:42 sfan5 or at least it's not a good idea 16:42 rubenwardy youll need a trusted client-side env for this reason 16:43 nekobit sandboxes are for children, real men play in the dirt 16:43 MTDiscord rubenwardy: I didn't see an issue for human-readable keybind names, so https://github.com/minetest/minetest/issues/14788 16:44 nekobit im probably just gonna add specific c++ functions for getting settingtypes.txt files so i dont need to expose io ones 16:44 [MTMatrix] sfan5: hasn't that happened long ago? https://github.com/minetest/minetest/pull/12131 16:46 [MTMatrix] this would mean the current CSM env is already the trusted one, kinda 16:46 nekobit Warr1024: you mean like how Emacs can translate "C-"? 16:50 MTDiscord I'm only thinking about single controls right now, like "sneak" or "jump" or "zoom" 16:50 MTDiscord combining controls like "sneak+drop" is an exercise for the modder 16:51 MTDiscord You'd say like "hold and press " and MT would translate that to "hold shift and press Q" 16:53 sfan5 grorp: looks read only 17:33 [MTMatrix] sfan5: tested. changing settings works, changing "secure settings" errors. 17:42 sfan5 hmm