-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #457 from GrognardsFromHell/SA_bugfix
savehook changes to support new modules using save archivation
- Loading branch information
Showing
3 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
|
||
#use 4 space indentation! | ||
|
||
# save hook (default - Co8 hook; will silently fail for vanilla; feel free to change for your own custom mod!) | ||
def save(filename): | ||
return | ||
|
||
def load(filename): | ||
return | ||
|
||
# Co8 python save hook - executes after the archive is done | ||
# save hook (default - Co8 hook; will silently fail for vanilla; feel free to change for your own custom mod!) | ||
def post_save(filename): | ||
try: | ||
import _co8init | ||
print "imported Co8Init inside templeplus package" | ||
_co8init.save(filename) | ||
print "Save hook successful" | ||
print "Co8 Save hook successful" | ||
except: | ||
print "Save hook failed\n" | ||
print "Co8 Save hook failed\n" | ||
|
||
# save hook (default - Co8 hook; will silently fail for vanilla; feel free to change for your own custom mod!) | ||
def load(filename): | ||
def post_load(filename): | ||
try: | ||
import _co8init | ||
_co8init.load(filename) | ||
except: | ||
print "Load hook failed\n" | ||
print "Co8 Load hook failed\n" |