diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-07-20 05:17:47 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-20 05:17:47 +1000 |
commit | 42c8933f554501932b648c7fbb086b75b9d4199c (patch) | |
tree | 96f9f993fcf50cd3cdb0f5ea4c02cab808ac053e | |
parent | 369dcb63d15d0e5d359ee1d530a385254552520e (diff) | |
parent | 74ea816f8ad328860fdedc39391c45741db30846 (diff) |
Merge pull request #86 from OpenStarbound/SilverSokolova-patch-1
postload: upscale all HD cursors
-rw-r--r-- | assets/opensb/cursors/inspect.cursor.patch | 3 | ||||
-rw-r--r-- | assets/opensb/cursors/link.cursor.patch | 3 | ||||
-rw-r--r-- | assets/opensb/cursors/pointer.cursor.patch | 3 | ||||
-rw-r--r-- | assets/opensb/scripts/opensb/assets/postload.lua | 11 |
4 files changed, 10 insertions, 10 deletions
diff --git a/assets/opensb/cursors/inspect.cursor.patch b/assets/opensb/cursors/inspect.cursor.patch deleted file mode 100644 index 7ca7bef..0000000 --- a/assets/opensb/cursors/inspect.cursor.patch +++ /dev/null @@ -1,3 +0,0 @@ -{ - "scale" : 1 -}
\ No newline at end of file diff --git a/assets/opensb/cursors/link.cursor.patch b/assets/opensb/cursors/link.cursor.patch deleted file mode 100644 index 7ca7bef..0000000 --- a/assets/opensb/cursors/link.cursor.patch +++ /dev/null @@ -1,3 +0,0 @@ -{ - "scale" : 1 -}
\ No newline at end of file diff --git a/assets/opensb/cursors/pointer.cursor.patch b/assets/opensb/cursors/pointer.cursor.patch deleted file mode 100644 index 7ca7bef..0000000 --- a/assets/opensb/cursors/pointer.cursor.patch +++ /dev/null @@ -1,3 +0,0 @@ -{ - "scale" : 1 -}
\ No newline at end of file diff --git a/assets/opensb/scripts/opensb/assets/postload.lua b/assets/opensb/scripts/opensb/assets/postload.lua index d84dd75..baf3081 100644 --- a/assets/opensb/scripts/opensb/assets/postload.lua +++ b/assets/opensb/scripts/opensb/assets/postload.lua @@ -1,4 +1,5 @@ -- 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 local path = "/cursors/opensb/revert.cursor.patch" 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" assets.add(path, '{"frameGrid":{"size":[16,16]}}') 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 -- Add object patches @@ -15,4 +24,4 @@ local objects = assets.byExtension("object") local path = "/objects/opensb/object.patch.lua" for i = 1, #objects do assets.patch(objects[i], path) -end
\ No newline at end of file +end |