ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra/Deliantra.pm
(Generate patch)

Comparing deliantra/Deliantra/Deliantra.pm (file contents):
Revision 1.119 by root, Wed Dec 26 18:05:00 2007 UTC vs.
Revision 1.121 by root, Mon Apr 14 00:35:17 2008 UTC

4 4
5=cut 5=cut
6 6
7package Deliantra; 7package Deliantra;
8 8
9our $VERSION = '1.13'; 9our $VERSION = '1.14';
10 10
11use strict; 11use strict;
12 12
13use base 'Exporter'; 13use base 'Exporter';
14 14
24 editor_archs arch_extents 24 editor_archs arch_extents
25); 25);
26 26
27use JSON::XS qw(decode_json encode_json); 27use JSON::XS qw(decode_json encode_json);
28 28
29our $LIB = $ENV{CROSSFIRE_LIBDIR}; 29our $LIB = $ENV{DELIANTRA_LIBDIR} || $ENV{CROSSFIRE_LIBDIR};
30 30
31our $VARDIR = $ENV{HOME} ? "$ENV{HOME}/.crossfire" 31our $OLDDIR = $ENV{HOME} ? "$ENV{HOME}/.crossfire"
32 : $ENV{AppData} ? "$ENV{APPDATA}/crossfire" 32 : $ENV{AppData} ? "$ENV{APPDATA}/crossfire"
33 : File::Spec->tmpdir . "/crossfire"; 33 : File::Spec->tmpdir . "/crossfire";
34
35our $VARDIR = $ENV{HOME} ? "$ENV{HOME}/.deliantra"
36 : $ENV{AppData} ? "$ENV{APPDATA}/deliantra"
37 : File::Spec->tmpdir . "/deliantra";
34 38
35mkdir $VARDIR, 0777; 39mkdir $VARDIR, 0777;
36 40
37sub TILESIZE (){ 32 } 41sub TILESIZE (){ 32 }
38sub CACHESTRIDE (){ 64 } 42sub CACHESTRIDE (){ 64 }
484} 488}
485 489
486sub attr_freeze($) { 490sub attr_freeze($) {
487 my ($ob) = @_; 491 my ($ob) = @_;
488 492
489 $ob->{attach} = Deliantra::encode_json $ob->{attach} 493 $ob->{attach} = JSON::XS->new->utf8->canonical->encode ($ob->{attach})
490 if exists $ob->{attach}; 494 if exists $ob->{attach};
491 495
492 $ob 496 $ob
493} 497}
494 498

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines