Luanti logo

IRC log for #minetest, 2024-02-24

| Channels | #minetest index | Today | | Google Search | Plaintext

All times shown according to UTC.

Enable nick filtering
Time Nick Message
45 more elements. Show/hide.
11:40 MinetestBot [git] sfan5 -> minetest/minetest: Fix compiler warnings 492aab2 https://github.com/minetest/minetest/commit/492aab20feb463888aa19d576d5b239868ab312e (2024-02-24T11:39:12Z)
4 more elements. Show/hide.
12:13 MinetestBot [git] grorp -> minetest/minetest: Restore pre-5.9.0-dev behavior of touch_use_crosshair=false shootline… 57de599 https://github.com/minetest/minetest/commit/57de599a292d1c7ad43dfc260d36dff2fbb61481 (2024-02-24T12:12:53Z)
27 more elements. Show/hide.
15:08 appguru alright
15:09 TenPlus1 joined #minetest
15:10 appguru hi
15:10 TenPlus1 heyas
15:10 appguru note that when putting texture modifiers in a quoted lua string, you need to escape the backslashes, unless you use `[[...]]` (which I like to use for texmods for this reason)
15:10 appguru you wrote 'the texture string I end up with for my test is "[combine:145x96:54,0=signs_lib_font_15px_54.png^[colorize:#ffff00ff:64,0=signs_lib_font_15px_65.png^[colorize:#ffff00ff:73,0=signs_lib_font_15px_73.png^[colorize:#ffff00ff:81,0=signs_lib_font_15px_74.png^[colorize:#ffff00ff"', without any backslashes, is that correct?
15:10 TenPlus1 yeah
15:11 appguru yeah, then this has the issue i was expecting of carets (^) and colons (:) not being escaped as appropriate
15:11 TenPlus1 how would I fix that ?
15:11 appguru basically, the way minetest sees this is roughly ([combine:145x96:54,0=signs_lib_font_15px_54.png)^[colorize:... which is of course horribly broken
15:12 appguru TenPlus1: as said, if you're inside [combine, you need to escape ^ -> \^ and : -> \:
15:12 appguru so something like "[combine:145x96:54,0=signs_lib_font_15px_54.png\^[colorize\:#ffff00ff:64,0=signs_lib_font_15px_65.png\^[colorize\:#ffff00ff"
15:12 appguru i missed a colon but you get the idea
15:13 TenPlus1 I get an invalid escape sequence near '"' doing that
15:14 appguru TenPlus1: yes, that's the lua thing i was just trying to warn you about :P
15:14 TenPlus1 lol, mt5.9 is going to make everyone work for their mods this season :) I cant figure this one out
15:14 appguru if you put a backslash in a double-quoted or single-quoted string in lua ("...", '...'), it will try to interpret it as a lua escape sequence, and you'll get a syntax error if it can't
15:15 TenPlus1 and we cant be flooding logs with all these warnings in the process
15:15 appguru the solution is to either escape backslashes with another backslash if you want to keep using quoted strings, or to use a long string
15:16 appguru with a quoted string: `"[combine:145x96:54,0=signs_lib_font_15px_54.png\\^[colorize\\:#ffff00ff"`
15:16 TenPlus1 once it builds the texture we end up with a long assed string getting passed to the sign entity
15:16 appguru or with a "long" / bracketed string: `[[[combine:145x96:54,0=signs_lib_font_15px_54.png\^[colorize\:#ffff00ff]]` (note that bracketed strings don't interpret escape sequences)
15:17 appguru TenPlus1: yes, but that's not new, is it?
15:18 TenPlus1 christ it works
15:18 TenPlus1 !!!!! o.O
15:18 TenPlus1 using double \\'s
15:18 SFENCE joined #minetest
15:19 TenPlus1 wait, let me try a huge string of text with separation and colours
15:20 TenPlus1 jimminey crickets! thanks appguru, I think we just fixed signs_lib, no warnings at all now
15:20 appguru np, great that you fixed it!
15:20 appguru i wrote some better docs for texmods a while ago. they're a bit outdated now, but they still cover [combine decently well.
15:20 TenPlus1 no way I was updating Xanadu to 5.9 when the time comes with a borked mod
15:21 appguru you can take a look at https://github.com/minetest/minetest_docs/blob/master/doc/texture_modifiers.adoc if you're interested
15:21 TenPlus1 the '\\' part is an important inclusion for this
15:21 TenPlus1 has VanessaE even been on irc lately ?
15:22 appguru TenPlus1: it is mentioned in the "string notations" section, see https://github.com/minetest/minetest_docs/blob/master/doc/texture_modifiers.adoc#string-notations
15:22 appguru TenPlus1: I think VanessaE isn't active anymore, the mod has been handed to mt-mods for maintenance
15:22 TenPlus1 ah, so I'm going to have to download the latest mt-mods release and edit that to work and add a pull request
15:23 TenPlus1 gotcha!
15:23 appguru yep
15:23 TenPlus1 question is, will the double \\'s work with all 5.x and above clients ?
15:23 TenPlus1 I know some features are version specific
15:24 appguru the double \\'s is a lua thing, it will work on all servers. only a single slash is sent to the client.
15:24 appguru so yes, this should work with all clients :)
15:24 TenPlus1 w00t! good to know :)
15:25 TenPlus1 thanks again, am gonna go tweak some code :) laters all o/
15:25 appguru \o
10 more elements. Show/hide.
19:13 MinetestBot [git] rubenwardy -> minetest/minetest: Add support for translating content titles and descriptions (#12208) b4be483 https://github.com/minetest/minetest/commit/b4be483d3ecb08234685f9a071fd71946d041494 (2024-02-24T19:13:07Z)
22 more elements. Show/hide.

| Channels | #minetest index | Today | | Google Search | Plaintext