Revision 3738

Date:
2019-10-25 03:13:37
Author:
dsb
Revision Log:
Apply --prev and --beta to --orc, --ashes, --cults and --possess.
Files:

Legend:

 
Added
 
Removed
 
Modified
  • tome2/trunk/unpack-base.pl

     
    116 116 unzip $boot_dir, file_loc($tag, 'modules/boot-te4-VER-nomusic.team');
    117 117 }
    118 118
    119 sub unpack_util ($$) {
    120 my ($filename, $dirname) = @_;
    121 unzip "/tmp/tome-$dirname", file_loc('cur', "addons/$filename");
    122 if ($opt{prev}) {
    123 unzip "/tmp/tome-prev-$dirname", file_loc('prev', "addons/$filename");
    124 }
    125 if ($opt{beta}) {
    126 unzip "/tmp/tome-new-$dirname", file_loc('beta', "addons/$filename");
    127 }
    128 }
    119 129
    130 sub unpack_addon ($$) {
    131 unpack_util "tome-$_[0].teaa", $dirname;
    132 }
    133
    134 sub unpack_dlc ($$) {
    135 unpack_util "$basename.teaac", $dirname;
    136 }
    137
    138
    120 139 Getopt::Long::Configure qw(no_ignore_case);
    121 140 GetOptions(\%opt, @opt);
    122 141
    123 142 unpack_set 'cur';
    124 143 unpack_set 'prev', 'prev' if $opt{prev};
    125 144 unpack_set 'beta', 'new' if $opt{beta};
    126 if ($opt{orc}) {
    127 unzip '/tmp/tome-orcs', file_loc('cur', 'addons/orcs.teaac');
    128 }
    129 if ($opt{ashes}) {
    130 unzip '/tmp/tome-ashes', file_loc('cur', 'addons/ashes-urhrok.teaac');
    131 }
    132 if ($opt{cults}) {
    133 unzip '/tmp/tome-cults', file_loc('cur', 'addons/cults.teaac');
    134 }
    135 if ($opt{possess}) {
    136 unzip '/tmp/tome-possessors', file_loc('cur', 'addons/tome-possessors.teaa');
    137 unzip '/tmp/tome-new-possessors', file_loc('beta', 'addons/tome-possessors.teaa') if $opt{beta};
    138 }
    145 unpack_dlc 'orcs', 'orcs' if $opt{orc};
    146 unpack_dlc 'ashes-urhrok', 'ashes' if $opt{ashes};
    147 unpack_dlc 'cults', 'cults' if $opt{cults};
    148 unpack_addon 'possessors', 'possessors' if $opt{possess};