line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Declare our package |
2
|
|
|
|
|
|
|
package Games::AssaultCube::Log::Line::FlagScored; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# import the Moose stuff |
5
|
1
|
|
|
1
|
|
2581
|
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::FlagStole'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
with 'Games::AssaultCube::Log::Line::Base::TeamInfo'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# TODO improve validation for everything here, ha! |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has 'score' => ( |
18
|
|
|
|
|
|
|
isa => 'Int', |
19
|
|
|
|
|
|
|
is => 'ro', |
20
|
|
|
|
|
|
|
required => 1, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has 'tostr' => ( |
24
|
|
|
|
|
|
|
isa => 'Str', |
25
|
|
|
|
|
|
|
is => 'ro', |
26
|
|
|
|
|
|
|
lazy => 1, |
27
|
|
|
|
|
|
|
default => sub { |
28
|
|
|
|
|
|
|
my $self = shift; |
29
|
|
|
|
|
|
|
return $self->nick . " scored the flag for team " . $self->team_name . " with score " . $self->score; |
30
|
|
|
|
|
|
|
}, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
no Moose; |
34
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
__END__ |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=for stopwords CLA RVSF ip |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 NAME |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Games::AssaultCube::Log::Line::FlagScored - Describes the FlagScored event in a log line |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 ABSTRACT |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Describes the FlagScored event in a log line |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 DESCRIPTION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This module holds the "FlagScored" event data from a log line. Normally, you would not use this class directly |
52
|
|
|
|
|
|
|
but via the L<Games::AssaultCube::Log::Line> class. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This line is emitted when a client scores a flag for a team. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 Attributes |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Those attributes hold information about the event. As this class extends the L<Games::AssaultCube::Log::Line::Base> |
59
|
|
|
|
|
|
|
class, you can also use it's attributes too. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head3 nick |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
The nick of the client who scored the flag |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head3 ip |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
The ip of the client |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head3 team |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
The id of the client's team |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
0 = CLA |
74
|
|
|
|
|
|
|
1 = RVSF |
75
|
|
|
|
|
|
|
2 = NONE |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head3 team_name |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
The team name of the client ( CLA, RVSF, NONE ) |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head3 score |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
The new score for the team |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 AUTHOR |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Apocalypse E<lt>apocal@cpan.orgE<gt> |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Props goes to the BS clan for the support! |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
This project is sponsored by L<http://cubestats.net> |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Copyright 2009 by Apocalypse |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
98
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=cut |