forked from External/mage
spjspj - Shorten names of buttons. (#2472)
* spjspj - Do a count for supertypes and subtypes of all implemented cards.
This commit is contained in:
parent
f5fb2c0b19
commit
85346708bf
2 changed files with 60 additions and 2 deletions
|
|
@ -744,8 +744,8 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
|||
sortButton = new JButton("Sort");
|
||||
filterButton = new JButton("Filter");
|
||||
visibilityButton = new JButton("Visibility");
|
||||
selectByButton = new JButton("Select By ..");
|
||||
analyseButton = new JButton("Analyse Mana");
|
||||
selectByButton = new JButton("Select By");
|
||||
analyseButton = new JButton("Mana");
|
||||
|
||||
// Name and count label
|
||||
deckNameAndCountLabel = new JLabel();
|
||||
|
|
|
|||
58
Utils/gen_types_list.pl
Normal file
58
Utils/gen_types_list.pl
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
##
|
||||
# File: gen_types_list.pl
|
||||
# Author: spjspj
|
||||
# Purpose: To open all card java files and count all subtypes/supertypes
|
||||
# Purpose: Ones with unique spellings are possibly incorrect!
|
||||
##
|
||||
|
||||
use strict;
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
|
||||
my $dir_listing = "dir \/a \/b \/s ..\\Mage.Sets\\ | find \".java\" |";
|
||||
|
||||
open (DIR_LISTING, "$dir_listing");
|
||||
my %types;
|
||||
my %types_files;
|
||||
|
||||
while (<DIR_LISTING>)
|
||||
{
|
||||
chomp;
|
||||
my $file = $_;
|
||||
|
||||
my $name = "";
|
||||
my $cardNum = "";
|
||||
|
||||
open (JAVA_FILE, "$file");
|
||||
|
||||
while (<JAVA_FILE>)
|
||||
{
|
||||
chomp;
|
||||
|
||||
# Eg: this.subtype.add("Human");
|
||||
my $line = $_;
|
||||
if ($line =~ m/this.subtype.add.*"([^"]*)".;/)
|
||||
{
|
||||
$types{$1}++;
|
||||
$types_files{$1} .= $file . ",,,";
|
||||
}
|
||||
if ($line =~ m/this.supertype.add.*"([^"]*)"/)
|
||||
{
|
||||
$types{$1}++;
|
||||
$types_files{$1} .= $file . ",,,";
|
||||
}
|
||||
}
|
||||
|
||||
close (JAVA_FILE);
|
||||
}
|
||||
my $key;
|
||||
foreach $key (sort keys (%types))
|
||||
{
|
||||
print ("$types{$key} = $key .... ");
|
||||
if ($types{$key} < 10)
|
||||
{
|
||||
print (" In files:$types_files{$key}");
|
||||
}
|
||||
print ("\n");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue