Add filetype to the config.
This commit is contained in:
parent
4195159003
commit
cc10c145b5
2 changed files with 2 additions and 1 deletions
1
server/src/types/config.d.ts
vendored
1
server/src/types/config.d.ts
vendored
|
|
@ -8,6 +8,7 @@ interface config {
|
||||||
};
|
};
|
||||||
datastores: {
|
datastores: {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
filetype: string;
|
||||||
directory: string;
|
directory: string;
|
||||||
};
|
};
|
||||||
game: {
|
game: {
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue