… | |
… | |
8 | $self->{user} = $1; |
8 | $self->{user} = $1; |
9 | $self->{orig_path} = $2; |
9 | $self->{orig_path} = $2; |
10 | $self->{deny_reset} = 1; #d# for now |
10 | $self->{deny_reset} = 1; #d# for now |
11 | } |
11 | } |
12 | |
12 | |
|
|
13 | sub thawer_merge { |
|
|
14 | # we have to keep some variables in memory intact |
|
|
15 | local $_[0]{user}; |
|
|
16 | local $_[0]{orig_path}; |
|
|
17 | local $_[0]{deny_reset}; |
|
|
18 | |
|
|
19 | $_[0]->SUPER::thawer_merge ($_[1]); |
|
|
20 | } |
|
|
21 | |
13 | sub load_path { |
22 | sub load_path { |
14 | my ($self) = @_; |
23 | my ($self) = @_; |
15 | |
24 | |
16 | sprintf "%s/%s/%s", cf::datadir, cf::mapdir, $self->{orig_path} |
25 | "$cf::MAPDIR/$self->{orig_path}" |
17 | } |
26 | } |
18 | |
27 | |
19 | sub save_path { |
28 | sub save_path { |
20 | my ($self) = @_; |
29 | my ($self) = @_; |
21 | |
30 | |
22 | (my $path = $_[0]{orig_path}) =~ s/\//$PATH_SEP/g; |
31 | (my $path = $_[0]{orig_path}) =~ s/\//$PATH_SEP/g; |
23 | sprintf "%s/%s/%s/%s", cf::localdir, cf::playerdir, $self->{user}, $path |
32 | "$cf::PLAYERDIR/$self->{user}/$path" |
24 | } |
33 | } |
25 | |
34 | |
26 | sub uniq_path { |
35 | sub uniq_path { |
27 | undef |
36 | undef |
28 | } |
37 | } |
… | |
… | |
37 | $self->per_player (0); |
46 | $self->per_player (0); |
38 | |
47 | |
39 | 1 |
48 | 1 |
40 | } |
49 | } |
41 | |
50 | |
|
|
51 | sub decay_objects { |
|
|
52 | # do nothing on per player maps at the moment |
|
|
53 | # to protect apartments. |
|
|
54 | # TODO: apartments should be marked as such |
|
|
55 | # (no reset, no decay etc.) |
|
|
56 | } |
|
|
57 | |
42 | 1 |
58 | 1 |
43 | |
59 | |