📄 uid.pl
字号:
#!/usr/bin/perl
if(! @ARGV[0]) {
die "Usage <filename>\n";
}
# get uid from .h file
my $uid=readpipe("grep KUidExampleGame ../code/uiinc/CGameApplication.h");
$uid =~ /\{([^\}]*)\}/;
$uid = $1;
my $mapuid=readpipe("grep KMapTypeUid ../code/uisrc/CGameAppUi.cpp");
$mapuid =~ /\{([^\}]*)\}/;
$mapuid = $1;
my $leveluid=readpipe("grep KLevelTypeUid ../code/uisrc/CGameAppUi.cpp");
$leveluid =~ /\{([^\}]*)\}/;
$leveluid = $1;
my $levelNumberuid;
if( @ARGV[0] =~ /^([0-9]*)[._]/ ) {
$levelNumberuid = $1;
}
if(! $levelNumberuid) {
die "Missing level number at start of filename\n";
}
if(@ARGV[0] =~ /.map$/ ) {
print "$uid $mapuid $levelNumberuid\n";
} elsif(@ARGV[0] =~ /.lev$/ ) {
print "$uid $leveluid $levelNumberuid\n";
} else {
die "Not .lev or .map extension to filename\n";
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -