File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818# from country_name import country_name
1919import metaminesweeper_checksum
2020
21+ version = "元3.1.11" .encode ( "UTF-8" )
2122
2223class MineSweeperGUI (superGUI .Ui_MainWindow ):
2324 def __init__ (self , MainWindow , args ):
@@ -101,7 +102,31 @@ def save_evf_file_integrated():
101102 # 用本软件打开录像
102103 if len (args ) == 2 :
103104 self .action_OpenFile (args [1 ])
104-
105+ elif len (args ) == 3 :
106+ print (args )
107+ if args [1 ] == "-v" :
108+ print (version )
109+ return
110+ elif args [1 ] == "-t" :
111+ if args [2 ][- 3 :] == "evf" :
112+ video = ms .EvfVideo (args [2 ])
113+ else :
114+ print ("unknown" )
115+ return
116+ try :
117+ video .parse_video ()
118+ except :
119+ print ("false" )
120+ return
121+
122+ if self .checksum_guard .\
123+ valid_checksum (video .raw_data [:- 33 ], video .checksum ):
124+ print ("true" )
125+ return
126+ else :
127+ print ("false" )
128+ return
129+
105130 self .trans_language ()
106131 self .score_board_manager .with_namespace ({
107132 "race_identifier" : self .race_identifier ,
@@ -662,7 +687,7 @@ def dump_evf_file_data(self):
662687 self .label .ms_board .is_fair = self .is_fair ()
663688 self .label .ms_board .is_official = self .is_official ()
664689
665- self .label .ms_board .software = "元3.1.11" . encode ( "UTF-8" )
690+ self .label .ms_board .software = version
666691 self .label .ms_board .mode = self .gameMode
667692 self .label .ms_board .player_identifier = self .player_identifier .encode ( "UTF-8" )
668693 self .label .ms_board .race_identifier = self .race_identifier .encode ( "UTF-8" )
You can’t perform that action at this time.
0 commit comments