ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/map-per-player.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

# User Rev Content
1 root 1.1 #! perl # MANDATORY
2    
3     cf::map->register (qr{^~[^/]+/});
4    
5     sub init {
6     my ($self) = @_;
7    
8     $self->{user} = $1;
9     }
10    
11     sub as_string {
12     my ($self) = @_;
13    
14     "~$self->{user}$self->{path}"
15     }
16    
17     sub save_path {
18     my ($self) = @_;
19    
20     sprintf "%s/%s/%s/%s", cf::localdir, cf::playerdir, $self->{user}, $self->_escaped_path
21     }
22    
23     sub uniq_path {
24     undef
25     }
26    
27     1
28