--- cfmaps/cfmap2html 2005/11/20 08:04:19 1.13 +++ cfmaps/cfmap2html 2005/12/26 12:15:11 1.22 @@ -17,7 +17,7 @@ # along with gvpe; if not, write to the Free Software # Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -our $VERSION = '1.2'; +our $VERSION = '1.211'; use Storable; @@ -62,7 +62,7 @@ my (@path) = split /\//, $path; print "", - "", + '', "", "", "Crossfire Map \"$path\"", @@ -121,14 +121,17 @@ if (my $as = $meta->{map}[$x][$y]) { my @class; - push @class, "fishy" if grep $_->{invisible} || $_->{face} || exists $_->{no_pass}, @$as; - push @class, "exit" if grep $is_exit{$arch->{$_->{_name}}{type}}, @$as; - - my @connected = grep $_, map $_->{connected}, @$as; + push @class, "fishy" if grep $_->{invisible} || $_->{face} || exists $_->{no_pass} || exists $_->{no_pick}, @$as; + push @class, "exit" if grep $is_exit{$arch->{$_->{_name}}{type}} && $_->{slaying}, @$as; + push @class, "dialog" if grep $_->{msg} =~ /^\@match/m, @$as; print ""; print "
"; - print "", (join ", ", @connected), "" if @connected; + + print join "\n", map "$_", + reverse sort { (length $a) <=> (length $b) or $b <=> $a } + grep $_, map $_->{connected}, @$as; + print "
($x|$y)"; sub print_archs { @@ -139,7 +142,7 @@ my $aname = escape_html $a->{_name}; my $name = escape_html $a->{name} || $o->{name}; - print "
  • $aname \"$name\"\n"; + print "
  • $aname \"$name\"\n"; for (sort keys %$a) { next if $ignore{$_}; my $v = escape_html $a->{$_}; @@ -150,7 +153,7 @@ print "slaying => $v\n"; } elsif ($_ eq "other_arch") { - print "$_ => $v\n"; + print "$_ => $v\n"; } elsif ($_ eq "inventory") { print "inventory =>\n"; print_archs ($a->{$_}); @@ -174,11 +177,11 @@ print ""; } - print "", + print "", "

    "; close $fh; - system "gzip", "-7f", "$path.xhtml"; + #system "gzip", "-7f", "$path.xhtml"; }