delverengine icon indicating copy to clipboard operation
delverengine copied to clipboard

ModSource Design

Open joshuaskelly opened this issue 3 years ago • 4 comments

Summary

Determine the initial design for the ModSource interface.

interface ModSource {
    // Get paths to all local mods.
    Array<String> getInstalledMods();

    // Get paths to all enabled mods.
    Array<String> getEnabledMods();

    // Get info for all available mods. These may not be locally installed.
    Array<ModData> getAvailableMods();

    // Get the UI to display for this source.
    WindowOverlay getUI();
}

Goals

  • View all mods a source knows about.
  • Enable/disable any given mod.
  • Display UI for any custom needs a source may have.

Prior Art

There is some work existing around the Delver steam integration. See: https://github.com/Interrupt/delverengine/blob/5d8839311e57a9ee7e15112c67c912ca657be810/Dungeoneer/src/com/interrupt/dungeoneer/game/ModManager.java#L460

joshuaskelly avatar Mar 19 '21 23:03 joshuaskelly

For a V0 UI is probably not needed.

joshuaskelly avatar Mar 20 '21 04:03 joshuaskelly

What could also be interesting is a refresh method that would allow to reindex the existing content, either locally or remote (and probably being called on start).

PythooonUser avatar Mar 20 '21 07:03 PythooonUser

Also, is there a specific reason to go with String instead directly with a FileHandle?

In order to keep the same behavior like the ModManager, maybe?

PythooonUser avatar Mar 20 '21 07:03 PythooonUser

I don't think Refresh would be a common function.

Strings for simple serialization.

joshuaskelly avatar Mar 20 '21 15:03 joshuaskelly