import { join as joinPath } from "path" ; import { ModMapper } from "../ModMapper" ; export default class InstallAppropriateFiles extends ModMapper { public mapFile ( path ) { const filename = path . split ( "/" ) . pop ( ) ; if ( filename . match ( /\.rp(y|yc|a)$/ ) ) { return joinPath ( "game" , filename ) ; } else if ( filename . match ( /\.chr$/ ) ) { return joinPath ( "characters" , filename ) ; } return null ; } public getFriendlyName ( ) { return "Unsorted Game Files" ; } }