Merge pull request #86 from OpenStarbound/SilverSokolova-patch-1
postload: upscale all HD cursors
This commit is contained in:
commit
42c8933f55
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"scale" : 1
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"scale" : 1
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"scale" : 1
|
|
||||||
}
|
|
@ -1,4 +1,5 @@
|
|||||||
-- Revert cursor frames if a mod replaced cursors.png with a SD version again
|
-- Revert cursor frames if a mod replaced cursors.png with a SD version again
|
||||||
|
-- Otherwise, scale down our HD cursors
|
||||||
if assets.image("/cursors/cursors.png"):size()[1] == 64 then
|
if assets.image("/cursors/cursors.png"):size()[1] == 64 then
|
||||||
local path = "/cursors/opensb/revert.cursor.patch"
|
local path = "/cursors/opensb/revert.cursor.patch"
|
||||||
assets.add(path, '{"scale":null}')
|
assets.add(path, '{"scale":null}')
|
||||||
@ -8,6 +9,14 @@ if assets.image("/cursors/cursors.png"):size()[1] == 64 then
|
|||||||
path = "/cursors/opensb/revert.frames.patch"
|
path = "/cursors/opensb/revert.frames.patch"
|
||||||
assets.add(path, '{"frameGrid":{"size":[16,16]}}')
|
assets.add(path, '{"frameGrid":{"size":[16,16]}}')
|
||||||
assets.patch("/cursors/cursors.frames", path)
|
assets.patch("/cursors/cursors.frames", path)
|
||||||
|
else
|
||||||
|
local cursors = assets.json("/cursors/cursors.frames:frameGrid.names")
|
||||||
|
local path = "/cursors/%s.cursor.patch"
|
||||||
|
for i = 1, #cursors do
|
||||||
|
for j = 1, #cursors[i] do
|
||||||
|
assets.add(string.format(path, cursors[i][j]), '{"scale":1}')
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Add object patches
|
-- Add object patches
|
||||||
@ -15,4 +24,4 @@ local objects = assets.byExtension("object")
|
|||||||
local path = "/objects/opensb/object.patch.lua"
|
local path = "/objects/opensb/object.patch.lua"
|
||||||
for i = 1, #objects do
|
for i = 1, #objects do
|
||||||
assets.patch(objects[i], path)
|
assets.patch(objects[i], path)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user