mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-09-28 15:08:47 +00:00
Update paintutils.lua
This commit is contained in:
parent
af847818d2
commit
f785b0a488
@ -37,14 +37,9 @@ function loadImage( sPath )
|
|||||||
if fs.exists( sPath ) then
|
if fs.exists( sPath ) then
|
||||||
local tImage = {}
|
local tImage = {}
|
||||||
local file = io.open( sPath, "r" )
|
local file = io.open( sPath, "r" )
|
||||||
local sLine = file:read()
|
local sContent = file:readAll()
|
||||||
local sContent = ""
|
|
||||||
while sLine do
|
|
||||||
sContent = sContent .. "\n" .. sLine
|
|
||||||
sLine = file:read()
|
|
||||||
end
|
|
||||||
file:close()
|
file:close()
|
||||||
return parseImage( sContent:sub(2) ) -- remove first newline and delegate image parse to parseImage
|
return parseImage( sContent ) -- delegate image parse to parseImage
|
||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user