-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Entry point
löve has its own functions love.filedropped or respectively love.directorydropped that can be used as entry points for a drag+drag file operations.
In compliance with the existing 3rd party mod manager the respective directory/archive should only contain the following directories:
- characters
- stages
- themes
- panels
Overall mimicking the directory structure of the panel attack appdata folder with subfolders for each individual mod.
Mechanism
The respective file/folder can be read/mounted. Löve automatically unpackages zips so that no additional effort is necessary to read through the folders and files inside a zip file (treat them like a normal folder). The mod folder is then recreated in the corresponding location inside the PA appdata folder through iteration and methods of the love.filesystem namespace.
Environment
Drag & Drop should either only work in the main menu or on a separate page that can be accessed through the main menu.
It should be checked whether the imported mods already exist. If so, a choice should be given between not updating, overwriting the old version after creating a backup of the previous version (for example by renaming the folder to __%originalname%backupyyyMMdd) or overwriting without a backup.
After importing the mods, mods should get reloaded (see beginning of fmainloop in mainloop.lua). If possible, mod loading should be extracted into its own function.