mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-12-22 16:10:18 +01:00
Fix inverted conditional.
Also document function return value. It's kinda misleading, my bad.
This commit is contained in:
parent
8c2ee97b8f
commit
a963352793
@ -62,6 +62,7 @@ local charwidth = { }
|
||||
-- File to cache the font size to.
|
||||
local CHARDB_FILE = minetest.get_worldpath().."/homedecor_chardb"
|
||||
|
||||
-- Returns true if any file differs from cached one.
|
||||
local function check_random_chars()
|
||||
for i = 1, 5 do
|
||||
local c = math.random(32, 126)
|
||||
@ -120,7 +121,7 @@ local function build_char_db()
|
||||
-- Check some random characters to see if the file on disk differs
|
||||
-- from the cached one. If so, then ditch cached data and rebuild
|
||||
-- (font probably was changed).
|
||||
if not check_random_chars() then
|
||||
if check_random_chars() then
|
||||
LINE_HEIGHT = nil
|
||||
minetest.log("info", "[homedecor] "
|
||||
..S("Font seems to have changed. Rebuilding cache.")
|
||||
|
Loading…
Reference in New Issue
Block a user