- Add a "Browse..." button to the plugin menu
- Remove the "Unload All" button from the plugin menu if there are no imported plugins to unload
- Add a new search filter: random:yes
- Resolution settings now affects the results screen assets
- Pixelate more assets with lowest resolution setting
- Fix loading error message not appearing sometimes
- Remove img.css from img assets, the background selectors have been moved to assets.js
- Separate the search logic from SongSelect to its own js file
- Load all image assets with crossorigin=anonymous, this could allow making assets low resolution or programatically taking screenshots at a later time
- If EditFunction in a plugin tries to edit something that is not a function, it will give a better error message
- Disallow search engine bots from indexing images and adding a translate link, which cannot load the game
This commit is contained in:
KatieFrogs
2022-03-16 09:55:25 +03:00
parent 84b4bf00a8
commit e231ad1fcf
17 changed files with 993 additions and 755 deletions

View File

@@ -582,6 +582,12 @@ class EditFunction extends EditValue{
if(this.name){
this.original = this.name[0][this.name[1]]
}
if(typeof this.original !== "function"){
console.error(this.loadCallback)
var error = new Error()
error.stack = "Error editing the function value of " + this.getName() + ": Original value is not a function"
throw error
}
var args = plugins.argsFromFunc(this.original)
try{
var output = this.loadCallback(plugins.strFromFunc(this.original), args)
@@ -618,8 +624,13 @@ class EditFunction extends EditValue{
}
class Patch{
edits = []
addedLanguages = []
constructor(...args){
this.init(...args)
}
init(){
this.edits = []
this.addedLanguages = []
}
addEdits(...args){
args.forEach(arg => this.edits.push(arg))
}