aboutsummaryrefslogtreecommitdiff
path: root/lib/MasterWebInterface/Util/GameTypes.pm
blob: 25b8ec019ce643d2df2ada7bc5047f7a686eee0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package MasterWebInterface::Util::GameTypes;
use strict;
use warnings;
use Exporter 'import';
our @EXPORT = qw| better_gametype |;

# translate default gametype names to better readable equivalents
# in: string, out: string
sub better_gametype
{
    my ($s, $gametype) = @_;
    
    return " " unless $gametype;
    
    # all available equivalents
    my %types = (
        
        # general abbreviations
        "DM"    => "Deathmatch",
        "CTF"   => "Capture the Flag",
        "COOP"  => "Co-op",
        
            
        # Rune
        "ArenaGameInfo"     => "Arena",
        "RuneMultiPlayer"   => "Deathmatch",
        "TVgame"            => "Thirsty Vikings",
        "SRgame"            => "Shadow Rules",
        "NomadsGame"        => "Nomads",
        "CapTheTorchGame"   => "Capture the Torch",
        "HeadBallGame"      => "Headball",
        "SarkBallGame"      => "Sarkball",
        "VasArenaGameInfo"      => "VAS Arena",

        # Unreal and Unreal Tournament
        "DeathMatchPlus"        => "Deathmatch",
        "TeamGamePlus"          => "Team Deathmatch",
        "EUTDeathMatchPlus"     => "Extra UT Deathmatch",
        "CTFGame"               => "Capture the Flag",
        "Domination"            => "Domination",
        "LastManStanding"       => "Last Man Standing",
        "TLastManStanding"      => "Team Last Man Standing",
        "InstaGibDeathMatch"    => "InstaGib",
        "Assault"               => "Assault",
        "MonsterHunt"           => "Monsterhunt",
        "BunnyTrackGame"        => "Bunnytrack",
        "BunnyTrackNewNet"      => "Bunnytrack",
        "JailBreak"             => "Jailbreak",
        "TO3"                   => "Tactical Ops",
        "LeagueAssault"         => "League Assault",
        "s_SWATGame"            => "S.W.A.T.",
        "SiegeGI"               => "Siege",
        "FreeSiegeGI"           => "Siege",
    );
    
    return ($types{$gametype} // $gametype);
}

1;