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.18 by root, Wed Feb 22 22:41:22 2006 UTC vs.
Revision 1.21 by root, Thu Feb 23 01:55:29 2006 UTC

12 12
13use base 'Exporter'; 13use base 'Exporter';
14 14
15use Carp (); 15use Carp ();
16use Storable; 16use Storable;
17use File::Spec;
17use List::Util qw(min max); 18use List::Util qw(min max);
18 19
19#XXX: The map_* procedures scream for a map-object 20#XXX: The map_* procedures scream for a map-object
20 21
21our @EXPORT = 22our @EXPORT =
272 return if %ARCH; 273 return if %ARCH;
273 274
274 *ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst"; 275 *ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst";
275} 276}
276 277
277=item $data = arch_attr $arch 278=item $type = arch_attr $arch
278 279
279Returns a hashref describing the object and its attributes. It can contain 280Returns a hashref describing the object and its attributes. It can contain
280the following keys: 281the following keys:
281 282
282 name the name, suitable for display purposes 283 name the name, suitable for display purposes
283 ignore 284 ignore
284 attr 285 attr
285 desc 286 desc
286 use 287 use
287 section => [name => \%attr, name => \%attr] 288 section => [name => \%attr, name => \%attr]
289 import
288 290
289=cut 291=cut
290 292
291sub arch_attr($) { 293sub arch_attr($) {
292 my ($arch) = @_; 294 my ($arch) = @_;
312 314
313 $attr = $_; 315 $attr = $_;
314 } 316 }
315 } 317 }
316 318
317 use PApp::Util; 319 $attr || \%Crossfire::Data::DEFAULT_ATTR;
318 warn PApp::Util::dumpval $attr;
319} 320}
320 321
321sub arch_edit_sections { 322sub arch_edit_sections {
322# if (edit_type == IGUIConstants.TILE_EDIT_NONE) 323# if (edit_type == IGUIConstants.TILE_EDIT_NONE)
323# edit_type = 0; 324# edit_type = 0;
377# return(edit_type); 378# return(edit_type);
378# 379#
379# 380#
380} 381}
381 382
382$CACHEDIR ||= "$ENV{HOME}/.crossfire"; 383$CACHEDIR ||= $ENV{HOME} ? "$ENV{HOME}/.crossfire" : File::Spec->tmpdir;
383 384
384init $CACHEDIR; 385init $CACHEDIR;
385 386
386=head1 AUTHOR 387=head1 AUTHOR
387 388

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines