-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more scripts to make editing easier
- Loading branch information
1 parent
919aaff
commit bee04b9
Showing
7 changed files
with
96 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const deepObjectDiff = require("deep-object-diff").detailedDiff; | ||
|
||
const Util = require("./Util"); | ||
const Config = require("./Config"); | ||
const {version, soundboardVersionCompared} = Config; | ||
|
||
function getFile(version) { | ||
const fileName = "./soundboards/" + version + ".yml"; | ||
|
||
if (!Util.fileExists(fileName)) { | ||
console.log("Final soundboard for version '" + version + "' does not exit."); | ||
return null; | ||
} | ||
|
||
return Util.loadYAMLasJSON(fileName); | ||
} | ||
|
||
const configFirst = getFile(version); | ||
if (!configFirst) return; | ||
const configSecond = getFile("spellSystem-Soundboard-" + soundboardVersionCompared + "-by-JasperLorelai"); | ||
if (!configSecond) return; | ||
|
||
Util.saveJSONasYAML("./soundboards/difference-" + version + "-" + soundboardVersionCompared + ".yml", deepObjectDiff(configSecond, configFirst)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
const fs = require("fs"); | ||
|
||
const path = "./soundConfig/"; | ||
let path = "./soundConfig/"; | ||
|
||
for (const file of fs.readdirSync(path)) { | ||
if (file.startsWith("final")) continue; | ||
fs.rmSync(path + file); | ||
} | ||
|
||
path = "./soundboards/"; | ||
|
||
for (const file of fs.readdirSync(path)) { | ||
if (file.startsWith("spellSystem") || file.startsWith("base")) continue; | ||
fs.rmSync(path + file); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const fs = require("fs"); | ||
const Util = require("./Util"); | ||
const Config = require("./Config"); | ||
const {version} = Config; | ||
|
||
function makeName(prefix = "") { | ||
return "./soundConfig/" + prefix + version + ".yml"; | ||
} | ||
|
||
const soundConfigFileName = makeName(); | ||
|
||
if (!Util.fileExists(soundConfigFileName)) { | ||
console.log("Sound config for version '" + version + "' does not exit."); | ||
return; | ||
} | ||
|
||
fs.copyFileSync(makeName(), makeName("copy-")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters