0
0
Fork 0

Add filetype to the config.

This commit is contained in:
Oliver-Akins 2021-01-06 17:17:11 -07:00
parent 4195159003
commit cc10c145b5
2 changed files with 2 additions and 1 deletions

View file

@ -8,6 +8,7 @@ interface config {
}; };
datastores: { datastores: {
enabled: boolean; enabled: boolean;
filetype: string;
directory: string; directory: string;
}; };
game: { game: {

View file

@ -15,7 +15,7 @@ export function processExit() {
if (activeGame(game)) { if (activeGame(game)) {
game.log.debug(`Saving to datastore`); game.log.debug(`Saving to datastore`);
writeFileSync( writeFileSync(
`${conf.datastores.directory}/${game.id}.game`, `${conf.datastores.directory}/${game.id}.${conf.datastores.filetype}`,
JSON.stringify(game.toJSON()) JSON.stringify(game.toJSON())
); );
} else { } else {