1 | package DC::Item; |
1 | package DC::Item; |
2 | |
2 | |
3 | use strict; |
3 | use common::sense; |
4 | use utf8; |
|
|
5 | use Encode; |
|
|
6 | |
4 | |
7 | use Deliantra::Protocol::Constants; |
5 | use Deliantra::Protocol::Constants; |
8 | |
6 | |
9 | my $last_enter_count = 1; |
7 | my $last_enter_count = 1; |
10 | |
8 | |
… | |
… | |
12 | my ($self) = @_; |
10 | my ($self) = @_; |
13 | |
11 | |
14 | my $desc = |
12 | my $desc = |
15 | $self->{nrof} < 2 |
13 | $self->{nrof} < 2 |
16 | ? $self->{name} |
14 | ? $self->{name} |
17 | : "$self->{nrof} × $self->{name_pl}"; |
15 | : "$self->{nrof} $self->{name_pl}"; |
18 | |
16 | |
19 | $self->{flags} & F_OPEN |
17 | $self->{flags} & F_OPEN |
20 | and $desc .= " (open)"; |
18 | and $desc .= " (open)"; |
21 | $self->{flags} & F_APPLIED |
19 | $self->{flags} & F_APPLIED |
22 | and $desc .= " (applied)"; |
20 | and $desc .= " (applied)"; |