mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-06-12 15:37:12 +08:00
@@ -230,11 +230,17 @@ var Engine = {
|
|||||||
export64: function() {
|
export64: function() {
|
||||||
Engine.saveGame();
|
Engine.saveGame();
|
||||||
var string64 = Base64.encode(localStorage.gameState);
|
var string64 = Base64.encode(localStorage.gameState);
|
||||||
|
string64 = string64.replace(/\s/g, '');
|
||||||
|
string64 = string64.replace(/\W/g, '');
|
||||||
|
string64 = string64.replace(/\n/g, '');
|
||||||
prompt("save this.",string64);
|
prompt("save this.",string64);
|
||||||
},
|
},
|
||||||
|
|
||||||
import64: function() {
|
import64: function() {
|
||||||
var string64 = prompt("put the save code here.","");
|
var string64 = prompt("put the save code here.","");
|
||||||
|
string64 = string64.replace(/\s/g, '');
|
||||||
|
string64 = string64.replace(/\W/g, '');
|
||||||
|
string64 = string64.replace(/\n/g, '');
|
||||||
var decodedSave = Base64.decode(string64);
|
var decodedSave = Base64.decode(string64);
|
||||||
localStorage.gameState = decodedSave;
|
localStorage.gameState = decodedSave;
|
||||||
location.reload();
|
location.reload();
|
||||||
|
|||||||
Reference in New Issue
Block a user