Skip to content

Import mods through drag & drop #51

@Endaris

Description

@Endaris

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Client-sideenhancementNew feature or requestgraphicsrelated to graphicslocalizationhas localization impactpriority: 3 - wishlistIssues which are not important and/or where it's unclear whether they're feasible or even desirable.soundrelates to game sound

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions