Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into fix-gdpath-read
Browse files Browse the repository at this point in the history
  • Loading branch information
layercak3 committed Jun 15, 2022
2 parents 70b4610 + 93273c3 commit b81a785
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ HOW TO USE:
===

If the program closes as soon as you open it, that means it crashed.
A file called crash_log.txt will be created - send it to Colon and he'll hopefully get around to fixing it.
A file called crash_log.txt will be created - send it to Colon and he'll hopefully get around to fixing it.

===

Mac/Linux/non-Windows users, or if the game is installed in a nonstandard location:
Replace the directory in directory.txt with whereever the game's Resources folder is located on your system, or simply pass it as a command-line argument.
4 changes: 3 additions & 1 deletion shuffle.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ let iconRegex = /^.+?_(\d+?)_.+/
let forms = assets.forms
let sheetList = Object.keys(assets.sheets)
let glowName = sheetList.filter(x => x.startsWith('GJ_GameSheetGlow'))

// newlines/CRs are usually present in text files, strip them out so they aren't part of the pathname
let gdPath = fs.readFileSync('directory.txt', 'utf8').replace(/[\n\r]/g, '')
let gdPath = process.argv[2] ?? fs.readFileSync('directory.txt', 'utf8').replace(/[\n\r]/g, '')

if (!fs.existsSync(gdPath)) throw "Couldn't find your GD directory! Make sure to enter the correct file path in directory.txt"
let glowPlist = fs.readFileSync(`${gdPath}/${glowName[0]}.plist`, 'utf8')
let sheetNames = sheetList.filter(x => !glowName.includes(x))
Expand Down

0 comments on commit b81a785

Please sign in to comment.