tiny refactor texpos methods

develop
shevernitskiy 2023-08-13 07:40:35 +03:00
parent 4bc3a9b552
commit 20460fecca
2 changed files with 2 additions and 4 deletions

@ -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)

@ -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()