ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/map-link.ext
Revision: 1.1
Committed: Sat Jan 13 23:06:13 2007 UTC (17 years, 4 months ago) by root
Branch: MAIN
Log Message:
WARNING: this release is BROKEN

- rewrote map handling. map types are now completely pluggable, maybe
  *too* pluggable, as everything is a plug-in now.
- mark mandatory extensions as such.
- handle overloaded attachable objects correctly.
- many minor changes.

File Contents

# Content
1 #! perl # MANDATORY
2
3 cf::map->register (qr{^\{link\}});
4
5 sub load_header {
6 my ($self) = @_;
7
8 # singleton :/
9 $self->width (41);
10 $self->height (41);
11 $self->alloc;
12 $self->in_memory (cf::MAP_IN_MEMORY);
13
14 # provide some exits "home"
15 my $exit = cf::object::new "exit";
16 my $guard = Coro::guard { $exit->destroy };
17
18 $exit->slaying ($cf::EMERGENCY_POSITION->[0]);
19 $exit->stats->hp ($cf::EMERGENCY_POSITION->[1]);
20 $exit->stats->sp ($cf::EMERGENCY_POSITION->[2]);
21
22 $self->insert ($exit->clone, 19, 19);
23 $self->insert ($exit->clone, 19, 20);
24 $self->insert ($exit->clone, 19, 21);
25 $self->insert ($exit->clone, 20, 19);
26 $self->insert ($exit->clone, 20, 21);
27 $self->insert ($exit->clone, 21, 19);
28 $self->insert ($exit->clone, 21, 20);
29 $self->insert ($exit->clone, 21, 21);
30
31 $self->{deny_save} = 1;
32 $self->{deny_reset} = 1;
33
34 1
35 }
36
37 1
38