Created
February 5, 2016 03:19
-
-
Save YeOldeDM/880d1d1d676d0071b484 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#Make sure our file exists: | |
if not saveGame.file_exists('res://saves/savegame.sav'): | |
print("no savegame found!") | |
return | |
#Dict to hold json lines | |
var loadNodes = {} | |
#Open file to Read | |
saveGame.open('res://saves/savegame.sav', File.READ) | |
#Go through file lines and append each line to loadNodes | |
while (!saveGame.eof_reached()): | |
loadNodes.parse_json(saveGame.get_line()) | |
prints("LOADING DICTS: ",loadNodes.keys(),'\n') | |
### DONE GETTING DATA. NOW RESTORE THE GAME MODULES ### | |
saveGame.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment