Created
May 10, 2015 23:11
-
-
Save diiq/0eef730a758e01380208 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var save_squares = {}; | |
var dingsave = function (actor) { | |
// A checkpoint; saves your game and goes 'ding' | |
if (actor.type === "player") { | |
grid.tiles[actor.x][actor.y].hash = "_"; | |
if (!save_squares["" + actor.x + actor.y]){ | |
save_squares["" + actor.x + actor.y] = | |
{color:actor.color, tilemap:brief_tilemap(grid.tilemap)}; | |
} | |
transitions.push(function(){ | |
if (callbacks.ding) | |
callbacks.ding(count); | |
count = 0; | |
grid.tiles[actor.x][actor.y].hash = "_"; | |
actor.color = save_squares["" + actor.x + actor.y].color; | |
grid.tilemap = unbrief_tilemap(save_squares["" + actor.x + actor.y].tilemap); | |
actor.save(grid); | |
}); | |
} | |
return true; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-syncedBFSettings.AllUnlocked true