line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Declare our package |
2
|
|
|
|
|
|
|
package Games::AssaultCube::Log::Line::TeamStatus; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# import the Moose stuff |
5
|
1
|
|
|
1
|
|
2917
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# Initialize our version |
8
|
|
|
|
|
|
|
use vars qw( $VERSION ); |
9
|
|
|
|
|
|
|
$VERSION = '0.04'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
extends 'Games::AssaultCube::Log::Line::Base'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
with 'Games::AssaultCube::Log::Line::Base::TeamInfo'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# TODO improve validation for everything here, ha! |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has 'players' => ( |
18
|
|
|
|
|
|
|
isa => 'Int', |
19
|
|
|
|
|
|
|
is => 'ro', |
20
|
|
|
|
|
|
|
required => 1, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has 'frags' => ( |
24
|
|
|
|
|
|
|
isa => 'Int', |
25
|
|
|
|
|
|
|
is => 'ro', |
26
|
|
|
|
|
|
|
required => 1, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has 'flags' => ( |
30
|
|
|
|
|
|
|
isa => 'Int', |
31
|
|
|
|
|
|
|
is => 'ro', |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
has 'tostr' => ( |
35
|
|
|
|
|
|
|
isa => 'Str', |
36
|
|
|
|
|
|
|
is => 'ro', |
37
|
|
|
|
|
|
|
lazy => 1, |
38
|
|
|
|
|
|
|
default => sub { |
39
|
|
|
|
|
|
|
my $self = shift; |
40
|
|
|
|
|
|
|
return "Team Status for " . $self->team_name . ": " . $self->players . " players, " . $self->frags . " frags" . ( defined $self->flags ? ", " . $self->flags . " flags" : "" ); |
41
|
|
|
|
|
|
|
}, |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
no Moose; |
45
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
__END__ |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=for stopwords CLA RVSF admin configfile frags gamemode |
51
|
|
|
|
|
|
|
=head1 NAME |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Games::AssaultCube::Log::Line::TeamStatus - Describes the TeamStatus event in a log line |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 ABSTRACT |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Describes the TeamStatus event in a log line |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 DESCRIPTION |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This module holds the "TeamStatus" event data from a log line. Normally, you would not use this class directly |
62
|
|
|
|
|
|
|
but via the L<Games::AssaultCube::Log::Line> class. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This line is emitted when the AC server finishes a team-based game. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 Attributes |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Those attributes hold information about the event. As this class extends the L<Games::AssaultCube::Log::Line::Base> |
69
|
|
|
|
|
|
|
class, you can also use it's attributes too. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head3 team |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
The id of the team |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
0 = CLA |
76
|
|
|
|
|
|
|
1 = RVSF |
77
|
|
|
|
|
|
|
2 = NONE |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head3 team_name |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
The team name ( CLA, RVSF, NONE ) |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head3 players |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
The number of players on this team |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head3 frags |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
The total number of frags for this team |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head3 flags |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
The total number of captured flags this team did ( not always defined - depends on gamemode ) |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head3 |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
The number of passwords loaded |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head3 configfile |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
The admin password config filename |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 AUTHOR |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Apocalypse E<lt>apocal@cpan.orgE<gt> |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Props goes to the BS clan for the support! |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
This project is sponsored by L<http://cubestats.net> |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Copyright 2009 by Apocalypse |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
116
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=cut |