diff --git a/library/lua/gui.lua b/library/lua/gui.lua index aaca5b849..d9f826cd1 100644 --- a/library/lua/gui.lua +++ b/library/lua/gui.lua @@ -915,8 +915,7 @@ local BASE_FRAME = { local function make_frame(name, double_line) local tp = function(offset) local texpos = dfhack.textures.getAsset('hack/data/art/border-'..name:lower()..'.png', offset) - if texpos == -1 then return nil end - return texpos + return texpos >= 0 and texpos or nil end local frame = copyall(BASE_FRAME) diff --git a/plugins/lua/buildingplan/pens.lua b/plugins/lua/buildingplan/pens.lua index 30ce478d8..7e9b24300 100644 --- a/plugins/lua/buildingplan/pens.lua +++ b/plugins/lua/buildingplan/pens.lua @@ -11,8 +11,7 @@ local to_pen = dfhack.pen.parse local tp = function(asset, offset) local texpos = dfhack.textures.getAsset(asset, offset) - if texpos == -1 then return nil end - return texpos + return texpos >= 0 and texpos or nil end function reload_pens()