1
+ def Credits ():
2
+ ## Credits for Creator + Version Number (Example v3.2.2)
3
+ global version , developer
4
+ version = "v2.0.0"
5
+ developer = "YT*Toaster (James Mc'Douglas)"
6
+ return version , developer
7
+ Credits ()
8
+
9
+
10
+ def Backup ():
11
+ from shutil import copytree
12
+ from os import path , getcwd , makedirs , getenv
13
+
14
+ directory = getcwd ()
15
+ app_datadir = getenv ("LOCALAPPDATA" )
16
+
17
+ plugins_dir = path .join (directory ,'_dat' ,'MMplugins' )
18
+ backups_dir = path .join (directory ,'_dat' ,'_backups' )
19
+ isz_sav_dir = path .join (app_datadir ,'ISZ' ,'Saved' ,'SaveGames' )
20
+
21
+ if path .exists (backups_dir ):
22
+ print ("CONSOLE: Unable To Backup Current Save-Data." )
23
+ else :
24
+ print ("CONSOLE: Backed-Up Current Save-Data." )
25
+ makedirs (backups_dir , exist_ok = True )
26
+ copytree (isz_sav_dir ,f'{ backups_dir } \\ SaveGames' )
27
+
28
+ def Inject ():
29
+ from shutil import copytree , rmtree
30
+ from os import path , getenv , getcwd
31
+
32
+ directory = getcwd ()
33
+ app_datadir = getenv ("LOCALAPPDATA" )
34
+
35
+ plugins_dir = path .join (directory ,'_dat' ,'MMplugins' )
36
+ backups_dir = path .join (directory ,'_dat' ,'_backups' ,'SaveGames' )
37
+ isz_sav_dir = path .join (app_datadir ,'ISZ' ,'Saved' )
38
+ write2_dir = path .join (isz_sav_dir ,'SaveGames' )
39
+
40
+ if path .exists (write2_dir ):
41
+ rmtree (write2_dir )
42
+ copytree (backups_dir ,f'{ isz_sav_dir } \\ SaveGames' )
43
+ print ("CONSOLE: Injected Save-Data." )
44
+ else :
45
+ copytree (backups_dir ,f'{ isz_sav_dir } \\ SaveGames' )
46
+ print ("CONSOLE: Injected Save-Data." )
47
+
48
+
49
+
50
+ def error ():
51
+ print ("WARNING: If you are seeing this, the Plugin isn't a Correct Name." )
52
+ print ("WARNING: This plugin is partnered will the 'ISZ-ModMenu'. *It should be named: 'WTSM'." )
53
+ print (" " )
54
+ print ("WARNING: As such we have special functionality for Backups and Injecting." )
55
+ print ("WARNING: Which do not work with Traditional Plugins." )
56
+
57
+
58
+ def MainApp ():
59
+ ## Your Code Here.
60
+ error ()
0 commit comments