urbanterror 0.2 → 0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/urbanterror.rb +22 -10
- metadata +3 -3
data/lib/urbanterror.rb
CHANGED
@@ -75,17 +75,29 @@ class UrbanTerror
|
|
75
75
|
return initial - selected_i
|
76
76
|
end
|
77
77
|
|
78
|
-
def self.matchType(number)
|
78
|
+
def self.matchType(number, abbreviate=false)
|
79
79
|
# 0=FreeForAll, 3=TeamDeathMatch, 4=Team Survivor, 5=Follow the Leader, 6=Capture and Hold, 7=Capture The Flag, 8=Bombmode
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
80
|
+
if abbreviate
|
81
|
+
match = {
|
82
|
+
0 => 'FFA',
|
83
|
+
3 => 'TDM',
|
84
|
+
4 => 'TS',
|
85
|
+
5 => 'FTL',
|
86
|
+
6 => 'CAH',
|
87
|
+
7 => 'CTF',
|
88
|
+
8 => 'BOMB'
|
89
|
+
}
|
90
|
+
else
|
91
|
+
match = {
|
92
|
+
0 => 'Free For All',
|
93
|
+
3 => 'Team Death Match',
|
94
|
+
4 => 'Team Survivor',
|
95
|
+
5 => 'Follow the Leader',
|
96
|
+
6 => 'Capture and Hold',
|
97
|
+
7 => 'Capture the Flag',
|
98
|
+
8 => 'Bomb Mode'
|
99
|
+
}
|
100
|
+
end
|
89
101
|
|
90
102
|
throw "#{number} is not a valid gametype." if not match.has_key? number
|
91
103
|
match[number]
|
metadata
CHANGED