urbanterror 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/urbanterror.rb +19 -0
- metadata +16 -5
data/lib/urbanterror.rb
CHANGED
@@ -74,4 +74,23 @@ class UrbanTerror
|
|
74
74
|
selected_i = selected.inject(:+)
|
75
75
|
return initial - selected_i
|
76
76
|
end
|
77
|
+
|
78
|
+
def self.matchType(number)
|
79
|
+
# 0=FreeForAll, 3=TeamDeathMatch, 4=Team Survivor, 5=Follow the Leader, 6=Capture and Hold, 7=Capture The Flag, 8=Bombmode
|
80
|
+
match = {
|
81
|
+
0 => 'Free For All',
|
82
|
+
3 => 'Team Death Match',
|
83
|
+
4 => 'Team Survivor',
|
84
|
+
5 => 'Follow the Leader',
|
85
|
+
6 => 'Capture and Hold',
|
86
|
+
7 => 'Capture the Flag',
|
87
|
+
8 => 'Bomb Mode'
|
88
|
+
}
|
89
|
+
|
90
|
+
throw "#{number} is not a valid gametype." if not match.has_key? number
|
91
|
+
match[number]
|
92
|
+
end
|
93
|
+
|
77
94
|
end
|
95
|
+
|
96
|
+
# puts UrbanTerror.matchType 3
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: urbanterror
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 15
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
version: "0.2"
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Ricky Elrod
|
@@ -9,7 +14,7 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-08-
|
17
|
+
date: 2010-08-23 00:00:00 -04:00
|
13
18
|
default_executable:
|
14
19
|
dependencies: []
|
15
20
|
|
@@ -33,21 +38,27 @@ rdoc_options: []
|
|
33
38
|
require_paths:
|
34
39
|
- lib
|
35
40
|
required_ruby_version: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
36
42
|
requirements:
|
37
43
|
- - ">="
|
38
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
46
|
+
segments:
|
47
|
+
- 0
|
39
48
|
version: "0"
|
40
|
-
version:
|
41
49
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
42
51
|
requirements:
|
43
52
|
- - ">="
|
44
53
|
- !ruby/object:Gem::Version
|
54
|
+
hash: 3
|
55
|
+
segments:
|
56
|
+
- 0
|
45
57
|
version: "0"
|
46
|
-
version:
|
47
58
|
requirements: []
|
48
59
|
|
49
60
|
rubyforge_project:
|
50
|
-
rubygems_version: 1.3.
|
61
|
+
rubygems_version: 1.3.7
|
51
62
|
signing_key:
|
52
63
|
specification_version: 3
|
53
64
|
summary: Provides a class to access and control Urban Terror servers via RCON over UDP.
|