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

View file

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