| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | 'use strict'; |
||
| 25 | ct.importExportSave = function () { |
||
| 26 | if (state.export) { |
||
| 27 | try { |
||
| 28 | state.player = JSON.parse(atob(state.export)); |
||
| 29 | savegame.versionControl(); |
||
| 30 | } catch (error) { |
||
| 31 | alert('Invalid save file.'); |
||
| 32 | } |
||
| 33 | } else { |
||
| 34 | let exportText = btoa(JSON.stringify(state.player)); |
||
| 35 | |||
| 36 | state.export = exportText; |
||
| 37 | } |
||
| 38 | }; |
||
| 39 | } |
||
| 40 |