def _init_scene(self, debug=False): self.election_period = 5 * 1000 # msec self.stage_matchers = [] self.rule_matchers = [] for stage_id in stages.keys(): stage = IkaMatcher( self.mapname_left, self.mapname_top, self.mapname_width, self.mapname_height, img_file='stage_%s.png' % stage_id, threshold=0.95, orig_threshold=0.30, bg_method=matcher.MM_NOT_WHITE(), fg_method=matcher.MM_WHITE(), label='stage:%s' % stage_id, debug=debug, ) self.stage_matchers.append(stage) setattr(stage, 'id_', stage_id) for rule_id in rules.keys(): rule = IkaMatcher( self.rulename_left, self.rulename_top, self.rulename_width, self.rulename_height, img_file='rule_%s.png' % rule_id, threshold=0.95, orig_threshold=0.30, bg_method=matcher.MM_NOT_WHITE(), fg_method=matcher.MM_WHITE(), label='rule:%s' % rule_id, debug=debug, ) setattr(rule, 'id_', rule_id) self.rule_matchers.append(rule)
def _init_scene(self, debug=False): self.election_period = 5 * 1000 # msec self.stage_matchers = [] self.rule_matchers = [] for stage_id in stages.keys(): stage = IkaMatcher( self.mapname_left, self.mapname_top, self.mapname_width, self.mapname_height, img_file='stage_%s.png' % stage_id, threshold=0.95, orig_threshold=0.30, bg_method=matcher.MM_NOT_WHITE(), fg_method=matcher.MM_WHITE(), label='stage:%s' % stage_id, call_plugins=self._call_plugins, debug=debug, ) self.stage_matchers.append(stage) setattr(stage, 'id_', stage_id) for rule_id in rules.keys(): rule = IkaMatcher( self.rulename_left, self.rulename_top, self.rulename_width, self.rulename_height, img_file='rule_%s.png' % rule_id, threshold=0.95, orig_threshold=0.30, bg_method=matcher.MM_NOT_WHITE(), fg_method=matcher.MM_WHITE(), label='rule:%s' % rule_id, call_plugins=self._call_plugins, debug=debug, ) setattr(rule, 'id_', rule_id) self.rule_matchers.append(rule)
from ikalog.constants import gear_abilities, rules, stages, udemae_strings, weapons LOBBY_LIST = [ 'DELETE', 'standard', # 通常モード(いわゆる「野良」またはレギュラーフレンド合流) 'squad_2', # タッグマッチ(2人タッグ) 'squad_3', # タッグマッチ(3人タッグ) 'squad_4', # タッグマッチ(4人タッグ) 'private', # プライベートマッチ 'fest', # フェス(similar to standard) ] RESULT_LIST = ['DELETE', 'win', 'lose'] GEAR_LIST = ['DELETE'] + list(gear_abilities.keys()) RULE_LIST = ['DELETE'] + list(rules.keys()) MAP_LIST = ['DELETE'] + list(stages.keys()) WEAPON_LIST = ['DELETE'] + list(weapons.keys()) RANK_LIST = ['DELETE'] + udemae_strings def get_args(): parser = argparse.ArgumentParser() parser.add_argument('--input', type=str, required=True) parser.add_argument('--output', type=str) parser.add_argument('--lobby', choices=LOBBY_LIST) parser.add_argument('--rule', choices=RULE_LIST) parser.add_argument('--map', choices=MAP_LIST) parser.add_argument('--weapon', choices=WEAPON_LIST) parser.add_argument('--result', choices=RESULT_LIST) parser.add_argument('--kill', type=int) parser.add_argument('--death', type=int)
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..')) from ikalog.constants import rules, stages, udemae_strings, weapons LOBBY_LIST = [ 'DELETE', 'standard', # 通常モード(いわゆる「野良」またはレギュラーフレンド合流) 'squad_2', # タッグマッチ(2人タッグ) 'squad_3', # タッグマッチ(3人タッグ) 'squad_4', # タッグマッチ(4人タッグ) 'private', # プライベートマッチ 'fest', # フェス(similar to standard) ] RESULT_LIST = ['DELETE', 'win', 'lose'] RULE_LIST = ['DELETE'] + list(rules.keys()) MAP_LIST = ['DELETE'] + list(stages.keys()) WEAPON_LIST = ['DELETE'] + list(weapons.keys()) RANK_LIST = ['DELETE'] + udemae_strings def get_args(): parser = argparse.ArgumentParser() parser.add_argument('--input', type=str, required=True) parser.add_argument('--output', type=str) parser.add_argument('--lobby', choices=LOBBY_LIST) parser.add_argument('--rule', choices=RULE_LIST) parser.add_argument('--map', choices=MAP_LIST) parser.add_argument('--weapon', choices=WEAPON_LIST) parser.add_argument('--result', choices=RESULT_LIST) parser.add_argument('--kill', type=int) parser.add_argument('--death', type=int)