mrmin123 / kancolle-auto

Kantai Collection (Kancolle) bot/automation tool - DEPERECATED - see kcauto-kai:
https://github.com/mrmin123/kcauto-kai
54 stars 22 forks source link

Add support for ss and ssv options to EnabledSubs of submarine switch module #334

Closed mrmin123 closed 7 years ago

mrmin123 commented 7 years ago

Plan is to allow for:

This hopefully makes it easier to customize the enabled subs. Example: ss, i-13, i-14 automatically translates into i-8, i-19, i-26, i-58, i-168, maruyu, ro-500, u-511, i-13, i-14

waicool20 commented 7 years ago

In this section, ss and ssv if statements should be under an else statement of all to prevent overlap

        if 'all' in settings['submarine_switch_subs']:
            settings['submarine_switch_subs'] = ['i-8', 'i-8-kai', 'i-13', 'i-14', 'i-19', 'i-19-kai', 'i-26', 'i-26-kai', 'i-58', 'i-58-kai', 'i-168', 'i-401', 'maruyu', 'ro-500', 'u-511']
        # Expand 'ss' and 'ssv' group values to their actual subs
        if 'ss' in settings['submarine_switch_subs']:
            settings['submarine_switch_subs'].remove('ss')
            settings['submarine_switch_subs'].extend(['i-8', 'i-19', 'i-26', 'i-58', 'i-168', 'maruyu', 'ro-500', 'u-511'])
        if 'ssv' in settings['submarine_switch_subs']:
            settings['submarine_switch_subs'].remove('ssv')
            settings['submarine_switch_subs'].extend(['i-8-kai', 'i-13', 'i-14', 'i-19-kai', 'i-26-kai', 'i-58-kai', 'i-401'])
        settings['submarine_switch_subs'] = list(set(settings['submarine_switch_subs']))
waicool20 commented 7 years ago

Also this line log_error("'%s' is not a valid sub selection! Please check your config file." % formation)

formation should be changed to sub

mrmin123 commented 7 years ago

@waicool20 noted and implemented