UNPKG

igir

Version:

🕹 A zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS.

32 lines (31 loc) • 682 B
import Game from "./game.js"; class MergedDiscGame extends Game { subGames; constructor(props) { super({ ...props, roms: props.subGames.flatMap((game) => game.getRoms()) }); this.subGames = props.subGames; } /** * Return the original per-disc games this merged game was built from. */ getSubGames() { return this.subGames; } /** * Return a new merged game with some different properties, preserving the sub-games. */ withProps(props) { return new MergedDiscGame({ ...this, ...props, subGames: this.subGames }); } } export { MergedDiscGame as default }; //# sourceMappingURL=mergedDiscGame.js.map