forked from BASLQC/kc-vita-translation
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
convert the xml copying script to handle translated but unmodded files
- Loading branch information
1 parent
5ae716f
commit 531c857
Showing
4 changed files
with
29 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use 5.020; | ||
use strictures 2; | ||
use IO::All -binary; | ||
use Capture::Tiny 'capture'; | ||
|
||
$|++; | ||
run(); | ||
|
||
sub run { | ||
say "copying translated unmodded files"; | ||
for my $set ( # | ||
[ "xml", "en/Xml/tables/master", "Media/StreamingAssets/Xml/tables/master/" ], | ||
[ "png", "en/sce_sys", "sce_sys/" ], | ||
[ "png", "en/sce_sys/livearea/contents", "sce_sys/livearea/contents/" ], | ||
) | ||
{ | ||
my ( $ext, $src, $tgt ) = $set->@*; | ||
my @files = grep /\.$ext$/, io($src)->all_files; | ||
for my $file (@files) { | ||
die "didn't find file '$file' in original game" if !-e "../kc_original/$tgt" . $file->filename; | ||
my $target_file = "../kc_original_unpack_modded/$tgt" . $file->filename; | ||
io( io->file($target_file)->filepath )->mkpath; | ||
$file->copy($target_file); | ||
} | ||
} | ||
say "done"; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters