Time Nick Message 05:19 nerzhul hello, merging #9733 05:19 ShadowBot https://github.com/minetest/minetest/issues/9733 -- Add server side translations capability by EvidenceBKidscode 05:37 nerzhul we have more and more PR, hard to reduce, many good PR 05:48 nerzhul merging #9726 05:48 ShadowBot https://github.com/minetest/minetest/issues/9726 -- Simplify how parseElement splits element string by pyrollo 06:15 nerzhul rubenwardy, sfan5 you last comments on #9719 are fixed, you can review again, what a long path for metrics haha 06:15 ShadowBot https://github.com/minetest/minetest/issues/9719 -- Add MetricsBackend with prometheus counter support by nerzhul 06:15 nerzhul but after that, enjoy the metrics from the core :D 07:42 nerzhul merging #9742 07:42 ShadowBot https://github.com/minetest/minetest/issues/9742 -- Fix gray screen on Lua error by pauloue 10:29 sfan5 merging #9713 in 10m 10:29 ShadowBot https://github.com/minetest/minetest/issues/9713 -- mapblock_mesh: Optimize a few things by sfan5 10:36 nerzhul sfan5 did you take a second time to review my PR on prom please ? 10:36 sfan5 yes I'll look at it later 10:39 Krock sfan5: why is Mapgen::setDefaultSettings(m_map_settings); in makeMapgenParams() not enough? 10:40 Krock checking differences... 10:41 sfan5 Krock: that would be equivalent to what we had before, still broken 10:42 sfan5 the problem is that if map_settings["mgv7_spflags"] exists, it will always overwrite user_settings["mgv7_spflags"] 10:43 Krock after some testing I found that Settings::clearDefaultsNoLock() lacks of a m_flags.clear() 10:43 Krock map_settings is map_meta.txt so that's intended 10:44 Krock default settings -> game/minetest.conf -> global minetest.conf -> map_meta.txt 10:44 sfan5 I know 10:44 sfan5 but if you put the default value into map_settings, the default will overwrite anything from user_settings 10:45 nerzhul i will publish postgres auth backend this weekend :) 10:47 Krock defaults should never overwrite regular setting values 10:47 sfan5 they don't, but they do the way it's done here 10:49 Krock sounds like a bug within Settings 10:50 sfan5 no 10:53 sfan5 Krock: this is the situation http://sprunge.us/plxE3C?c 10:54 sfan5 should be s/user_settings/map_settings/ on line 9 10:55 Krock thank you. now it makes sense 10:56 Krock I'll work on another PR though, trying to clean up the mess a bit 10:57 sfan5 Settings should have "layered" defaults that can be independently (re-)set 10:57 sfan5 this would also allow adding per-world configs 10:58 Krock I'd rather have a Settings *defaults pointer which can be used as a daisy-chain of default values 10:58 Krock that would make it layered, as you said 10:59 Krock (*defaults ptr in place of m_defaults) 10:59 sfan5 how would a remove a specific layer if I don't know how often to do g_settings->defaults->defaults->... ? 11:00 Krock it would remove the setting that is defined first 11:00 Krock go deeper if none is defined 11:01 Krock and for writing it's pretty much clear how to deal with it. core.settings is minetest.conf, game/minetest.conf is not written to, neither are the default settings 11:01 Krock and map_meta.txt is exposed using core.get_mapgen_setting 11:02 Krock assuming the defaults are always on the bottom of the chain, it'll have a write-lock for removing settings 11:03 Krock looking into implementing this 11:03 Krock unless .. are there logic errors or edge cases I missed? 11:18 sfan5 I prefer replacing "SettingEntries m_defaults" with "std::map m_defaults" 11:18 Krock rc/client/mapblock_mesh.cpp:926:6: warning: ‘waving’ may be used uninitialized 11:18 sfan5 then you can explicitly put defaultsettings into m_defaults[0], game settings into [1], world settings into [2] 11:19 sfan5 and also clear them independently when unload a game/world 11:20 Krock I see 11:21 Krock or even.. "std::map m_defaults" 11:22 Krock where all active settings are self-contained within the map 11:22 Krock could be a global map 11:23 sfan5 an entire Settings object is kinda more than what would be necessary, but they do need to get loaded from file somehow (which only `Settings` can do)... 11:23 sfan5 why global? every settings object (including g_settings) can have this priority-based layers of defaults 11:27 Krock global would ensure the priorities are always the same 11:27 sfan5 hm 11:27 Krock say, if we used a global map + enum, settings could be addressed as follows: g_settings[SETTINGS_WORLD] and modify settings there 11:27 sfan5 if MapSettingsManager were to use this system it might need different priority values 11:28 sfan5 so it would suffice to just say that g_settings always has a specific set of priorities 11:28 Krock MapSettingsManager would be the top most priority, although core.settings would only read the setting values from lower priorities 11:28 Krock *starting from lower priorities 11:29 sfan5 there's no need to modify and/or write the world settings is there? like I said before you don't really need a Settings object, SettingsEntires would be enough 11:30 Krock it would be good to have fallbacks there, and to have core.set_mapgen_setting() working 11:30 Krock or do you mean a potential world/minetest.conf ? 11:31 sfan5 yes 11:31 sfan5 you wouldn't need a "full" Settings object there, because you would never write it 11:31 sfan5 same with the game config, it's loaded once and read-only from there 11:33 Krock I'm pretty sure there will be mods that want to write to world/minetest.conf quite fast 11:34 Krock -quite fast 11:34 Krock as for default settings and game/minetest.conf - yes, those may not be written to 11:38 Wuzzy I can't seem to get minetest.get_translated_string() to work. it always returns the untranslated string, no matter what i do 11:39 Krock oh, it's merged already? 11:40 Wuzzy yes 11:40 Wuzzy but maybe its related to the fact that translations are currently broken on linux 11:40 sfan5 works for me 11:40 Wuzzy what's your OS? 11:41 sfan5 do you expect me to say "Linux" 11:41 Wuzzy I expect you to say the truth ? 11:42 sfan5 well it's Linux 11:42 sfan5 "Stroh" 11:42 sfan5 2020-04-25 13:41:58: ACTION[Server]: singleplayer executed print(dump(core.get_translated_string("de", core.registered_items["farming:straw"].description))) 11:42 Wuzzy I type in '/lua minetest.get_translated_string("de", "Dirt")' but get "Dirt" ? 11:42 Wuzzy ohhhh 11:43 Wuzzy does this function expect me to input the S()'ed string??? 11:43 sfan5 of course 11:43 Wuzzy that's a surprise 11:43 sfan5 how else would it know what "Dirt" means? 11:43 Krock well, it could add S() automatically 11:43 sfan5 no 11:43 Wuzzy because of the context, i guess 11:43 sfan5 it doesn't know the textdomain you want 11:43 Wuzzy i see 11:44 Krock ESC(t@textdomain) or something like that. indeed, S() also contains the textdomain info :3 11:44 Wuzzy i see 11:44 sfan5 the documentation could be improved, I guess 11:44 Wuzzy okay, but this is definitely a stumbling stone for modders, as you can clearly see 11:45 Wuzzy aha! I got it 11:45 Wuzzy it works now. cool 11:46 Wuzzy so it boils down to modder error, lol. and bad docs ? 11:46 sfan5 I wonder, does it also remove coloring sequences? 11:46 Wuzzy thanks 11:46 sfan5 that could be considered a feature, or a bug 11:46 Wuzzy good question ? 11:46 Wuzzy well we do have an utility function to remove color codes 11:46 Krock that would break languages that are based on colors rather than words /s 11:46 sfan5 do we? 11:46 Krock separate in Lua and C++, yes 11:47 Krock unescape_enriched 11:47 sfan5 ah yes minetest.strip_colors 11:47 sfan5 didn't save me from writing this code though https://github.com/Uberi/Minetest-WorldEdit/blob/master/worldedit_commands/init.lua#L127 11:49 Wuzzy sfan5: I never pass color codes into S(). I apply colorization *after* translation 11:49 Wuzzy works 100% 11:49 sfan5 the other way around would be wrong, yes 11:57 Krock would be great to forbid string concat or string.format within S()... that's also common modder errors 11:57 Krock although concat is needed to break lines too 12:01 sfan5 pushing http://sprunge.us/oR18yo?diff in 5m 12:39 sfan5 Wuzzy: if you start with "minetest --verbose" what does the log say about gettext or locales? 12:41 Wuzzy 2020-04-25 14:40:53: INFO[Main]: Message locale is now set to: LC_CTYPE=de_DE.UTF-8;LC_NUMERIC=C;LC_TIME=de_DE.UTF-8;LC_COLLATE=de_DE.UTF-8;LC_MONETARY=de_DE.UTF-8;LC_MESSAGES=de_DE.UTF-8;LC_PAPER=de_DE.UTF-8;LC_NAME=de_DE.UTF-8;LC_ADDRESS=de_DE.UTF-8;LC_TELEPHONE=de_DE.UTF-8;LC_MEASUREME 12:41 Wuzzy 2020-04-25 14:40:53: INFO[Main]: NT=de_DE.UTF-8;LC_IDENTIFICATION=de_DE.UTF-8 12:42 sfan5 anything else? 12:42 Wuzzy 2020-04-25 14:40:53: INFO[Main]: USE_GETTEXT=1 12:42 Wuzzy I can't find any other info. too verbose ? 12:43 Wuzzy What do I have to look for? 12:44 sfan5 an error message maybe, but there isn't one 12:44 Wuzzy there's also 2020-04-25 14:44:27: INFO[Main]: Using in-place locale directory /home/wuzzy/src/minetest/git-master/bin/../locale even though a static one was provided (RUN_IN_PLACE or CUSTOM_LOCALEDIR). 12:45 Wuzzy but I always had this (and locales worked back then), shouldnt be a problem 12:48 sfan5 Wuzzy: run "strace -o trace.txt -e open,openat ./bin/minetest", exit from the mainmenu again 12:48 sfan5 then open trace.txt and search the output for minetest.mo 12:53 Wuzzy ah 12:53 Wuzzy openat(AT_FDCWD, "/usr/local/share/locale/de_DE.UTF-8/LC_MESSAGES/minetest.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) 12:53 Wuzzy openat(AT_FDCWD, "/usr/local/share/locale/de_DE.utf8/LC_MESSAGES/minetest.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) 12:53 Wuzzy openat(AT_FDCWD, "/usr/local/share/locale/de_DE/LC_MESSAGES/minetest.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) 12:53 Wuzzy openat(AT_FDCWD, "/usr/local/share/locale/de.UTF-8/LC_MESSAGES/minetest.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) 12:53 Wuzzy openat(AT_FDCWD, "/usr/local/share/locale/de.utf8/LC_MESSAGES/minetest.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) 12:53 Wuzzy openat(AT_FDCWD, "/usr/local/share/locale/de/LC_MESSAGES/minetest.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) 12:53 Wuzzy looks into /usr/local/share ... 12:54 Wuzzy but in 5.2.0 (the working version), it looks into my local src directory, where the file is found 12:55 sfan5 why would it look there when the log message says that it found an in-place directory? 12:57 Wuzzy i have no idea 12:58 Wuzzy RUN_IN_PLACE=0 btw 12:58 Wuzzy but the weird thing is. it worked with RUN_IN_PLACE=0 in 5.2.0 for some reason o_O 12:59 sfan5 https://github.com/minetest/minetest/blob/master/src/porting.cpp#L601 12:59 sfan5 it makes sense that this is broken now, but it should be printing "Using locale directory ...", not the other message 13:01 Wuzzy bad/confusing log message? 13:01 Wuzzy this explains stuff 13:04 sfan5 what is STATIC_LOCALEDIR in your cmake_config.h? 13:04 Wuzzy sfan5: does 8b45f6a5f3eac7030cdc12d729066ccef4794502 fix hudbars as well? or is this unrelated? 13:05 sfan5 I don't know what's wrong with hudbars in the first place so I can't answer that 13:05 Wuzzy "/usr/local/share/locale" 13:06 sfan5 yeah, then the code should be printing "Using locale directory /usr/local/share/locale" and will use that directory (as you can see in strace output) 13:06 sfan5 but if it prints "Using in-place locale directory ..." that means it should work correctly 13:46 sfan5 Wuzzy: https://github.com/minetest/minetest/pull/9749 13:47 Wuzzy thanks, testing now... 14:12 Wuzzy sfan5: your PR works for me. ? 14:45 Krock will merge #9724 in 10 minutes 14:45 ShadowBot https://github.com/minetest/minetest/issues/9724 -- FormSpec: Add `animated_image` to clickthrough elements by v-rob 14:55 Krock merging 19:23 Zughy hey there, a question about collisions: I was having a look at Irrlicht and I seem to understand it manages collisions by default. So I was wondering, why exactly Minetest doesn't? I mean, in Lua, particles aside 19:24 rubenwardy Minetest handles collisions itself 19:25 Zughy I'm talking about something like "player.is_colliding" 19:26 rubenwardy Irrlicht doesn't know how to do it well with voxel geometry 19:26 rubenwardy player collision is client-side not server-side, but the server can recalculate it 19:26 rubenwardy in 5.3.0-dev, entity collisions will be exposed to Lua 19:27 Zughy so we will be able to actually check them somehow? 19:28 nephele rubenwardy, also entity physics? :) 19:34 Krock Zughy: the server also doesn't know when free_move is enabled, or noclip