",
+ print "",
+ "",
"Crossfire Map ",
- "";
+ "";
print "/ ";
for (0 .. $#path - 1) {
print "$path[$_] / ";
}
+ my @dir = qw(none up right down left);
my @tile = map {
$meta->{info}{"tile_path_$_"}
- ? ""
+ ? ""
: ""
} 1..4;
#"}"# vim misparses without this comment
print "$path[-1]",
"",
- "[more about cfmaps.schmorp.de] ",
+ "[more about cfmaps.schmorp.de] ",
" | ",
" | $tile[0] | | ",
"$tile[3] | ",
- " | ",
- "$tile[1] | ",
+ " | ",
+ "$tile[1] | ",
" | $tile[2] | | ",
" ";
my $W1 = $W + 600;
- print "",
+ print " ",
escape_html $meta->{info}{msg},
" ";
- print "";
+ print "";
my %ignore = map +($_ => 1), qw(name _name x y);
+ my %is_exit = map +($_ => 1), 41, 57, 66;
for my $y (0.. $meta->{height} - 1) {
print "";
for my $x (0.. $meta->{width} - 1) {
- print "";
if (my $as = $meta->{map}[$x][$y]) {
- print "($x|$y)";
+ my @class;
+
+ 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 "\n", map " $_",
+ reverse sort { (length $a) <=> (length $b) or $b <=> $a }
+ grep $_, map $_->{connected}, @$as;
+
+ print " ($x|$y)";
sub print_archs {
print " ";
for my $a (@{$_[0]}) {
my $o = $arch->{$a->{_name}};
+ my $type = $a->{type} || $o->{type};
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->{$_};
- if (($o->{type} == 66 || $o->{type} == 41) && $_ eq "slaying") { # door, teleporter
+ if ($_ eq "slaying" && $is_exit{$type}) { # door, teleporter, player_changer
$a->{msg} =~ /^final_map\s*(\S+)\s*$/m, $v = $1
if $v eq "/!"; # random map
- print "slaying => $v\n";
+ print "slaying => $v\n";
} elsif ($_ eq "other_arch") {
- print "$_ => $v\n";
+ print "$_ => $v\n";
} elsif ($_ eq "inventory") {
print "inventory =>\n";
print_archs ($a->{$_});
@@ -149,23 +163,25 @@
print "$_ => $v\n";
}
}
+ print "
";
}
print " ";
}
print_archs $as;
- print " ";
+ print " | ";
+ } else {
+ print " | ";
}
- print " | ";
}
print " ";
}
- print "
created by cfmap2html version $VERSION ",
- "";
+ print " ",
+ " |