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.125 by root, Sun Aug 31 09:19:22 2008 UTC

4 4
5=cut 5=cut
6 6
7package Deliantra; 7package Deliantra;
8 8
9our $VERSION = '1.13'; 9our $VERSION = '1.22';
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};
30 30
31our $VARDIR = $ENV{HOME} ? "$ENV{HOME}/.crossfire" 31our $VARDIR = $ENV{HOME} ? "$ENV{HOME}/.deliantra"
32 : $ENV{AppData} ? "$ENV{APPDATA}/crossfire" 32 : $ENV{AppData} ? "$ENV{APPDATA}/deliantra"
33 : File::Spec->tmpdir . "/crossfire"; 33 : File::Spec->tmpdir . "/deliantra";
34 34
35mkdir $VARDIR, 0777; 35mkdir $VARDIR, 0777;
36 36
37sub TILESIZE (){ 32 } 37sub TILESIZE (){ 32 }
38sub CACHESTRIDE (){ 64 } 38sub CACHESTRIDE (){ 64 }
484} 484}
485 485
486sub attr_freeze($) { 486sub attr_freeze($) {
487 my ($ob) = @_; 487 my ($ob) = @_;
488 488
489 $ob->{attach} = Deliantra::encode_json $ob->{attach} 489 $ob->{attach} = JSON::XS->new->utf8->canonical->encode ($ob->{attach})
490 if exists $ob->{attach}; 490 if exists $ob->{attach};
491 491
492 $ob 492 $ob
493} 493}
494 494

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines