fix download name on jpa

This commit is contained in:
Matteias Collet 2020-06-29 22:30:29 +02:00
parent dd9d0b38e0
commit 667cbb9a80
2 changed files with 10 additions and 4 deletions

View file

@ -7,9 +7,13 @@
</template> </template>
<script> <script>
// Components
import ButtonComponent from './ButtonComponent'; import ButtonComponent from './ButtonComponent';
import CodeFormatter from './scripts/codeFormatter'; import CodeFormatter from './scripts/codeFormatter';
// Data
import gameVersions from '../data/gameVersions.json';
export default { export default {
props: { props: {
codes: { type: Array }, codes: { type: Array },
@ -34,15 +38,17 @@ export default {
}); });
console.log(`Preparing download for ${this.format}`); console.log(`Preparing download for ${this.format}`);
const fileName = gameVersions.find(v => v.identifier === this.versionIdentifier).version;
switch (this.format) { switch (this.format) {
case 'gct': case 'gct':
CodeFormatter.generateGCT(c, this.versionIdentifier); CodeFormatter.generateGCT(c, fileName);
break; break;
case 'dolphin': case 'dolphin':
CodeFormatter.generateDolphinINI(c, this.versionIdentifier); CodeFormatter.generateDolphinINI(c, fileName);
break; break;
case 'gcm': case 'gcm':
CodeFormatter.generateCheatManagerTXT(c, this.versionIdentifier); CodeFormatter.generateCheatManagerTXT(c, fileName);
break; break;
} }
}, },

View file

@ -160,7 +160,7 @@ export default {
this.levelOrderSelection = e; this.levelOrderSelection = e;
if (e === 'random') { if (e === 'random') {
this.postGameSelection = '0109'; this.postGameSelection = '3400';
} }
this.updateCode(); this.updateCode();