]> git.lizzy.rs Git - are_we_minecraft_yet.git/commitdiff
Move call to strip_colors
authorLizzy Fleckenstein <eliasfleckenstein@web.de>
Fri, 21 Apr 2023 21:11:24 +0000 (23:11 +0200)
committerLizzy Fleckenstein <eliasfleckenstein@web.de>
Fri, 21 Apr 2023 21:11:24 +0000 (23:11 +0200)
mod/init.lua

index 6006e2dd7f75e851d72a347d4b4b98e0070f5248..a7a89f9ee8420c866f47495259b95a60b1cab722 100644 (file)
@@ -4,11 +4,8 @@ minetest.after(3, function()
 
        for name, def in pairs(minetest.registered_items) do
                if def.description and not def.groups.not_in_creative_inventory then
-                       local t = minetest.get_translated_string("", def.description)
+                       local t = minetest.strip_colors(minetest.get_translated_string("", def.description))
                        local idx = t:find("\n")
-
-                       t = minetest.strip_colors(t)
-
                        if idx then
                                t = t:sub(1, idx-1)
                        end