From 745d17d1fb36e888ed6f6f66c245e38806fb5b27 Mon Sep 17 00:00:00 2001 From: chris062689 Date: Wed, 7 Jun 2017 00:52:57 -0400 Subject: [PATCH] Added date property to savefiles. --- scripts/games/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/games/app.js b/scripts/games/app.js index 5d5489d..9edc7c0 100644 --- a/scripts/games/app.js +++ b/scripts/games/app.js @@ -77,7 +77,6 @@ try { model.testcase_date = "2000-01-01"; } else { let recent = model.testcases[0]; - model.compatibility = recent.compatibility; model.testcase_date = recent.date; } @@ -101,8 +100,11 @@ try { // Read the data file into an object. let savefile = toml.parse(fs.readFileSync(`${fsPathCodeSavefilesGame}/${file}`, 'utf8')); + let stats = fs.statSync(`${fsPathCodeSavefilesGame}/${file}`); + // Store the contents of the file in memory for adding it into the markdown later. model.savefiles.push({ + date: new Date(util.inspect(stats.mtime)), filename: file.replace('.dat', '.zip'), title: savefile.title, description: savefile.description,