… | |
… | |
18 | use Crossfire; |
18 | use Crossfire; |
19 | use Crossfire::MapWidget; |
19 | use Crossfire::MapWidget; |
20 | use File::Spec::Functions; |
20 | use File::Spec::Functions; |
21 | use Cwd 'abs_path'; |
21 | use Cwd 'abs_path'; |
22 | |
22 | |
23 | our @EXPORT = qw(insert_arch_stack_layer replace_arch_stack_layer new_arch_pb fill_pb_from_arch arch_is_floor stack_find_floor stack_find_wall stack_find arch_is_wall arch_is_monster add_table_widget quick_msg def arch_is_exit map2abs exit_paths); |
23 | our @EXPORT = qw(insert_arch_stack_layer replace_arch_stack_layer new_arch_pb fill_pb_from_arch arch_is_floor stack_find_floor stack_find_wall stack_find arch_is_wall arch_is_monster add_table_widget quick_msg def arch_is_exit map2abs exit_paths pseudohtml2txt); |
|
|
24 | |
|
|
25 | sub pseudohtml2txt { |
|
|
26 | my ($html) = @_; |
|
|
27 | |
|
|
28 | $html =~ s/<br\s*?\/?>/\n/gsi; |
|
|
29 | $html =~ s/<b>(.*?)<\/b>/_\1_/gsi; |
|
|
30 | $html =~ s/<\/?\s*li>//gi; |
|
|
31 | $html =~ s/<\/?\s*ul>//gi; |
|
|
32 | $html =~ s/>/>/g; |
|
|
33 | $html =~ s/</</g; |
|
|
34 | $html |
|
|
35 | } |
24 | |
36 | |
25 | sub exit_paths { |
37 | sub exit_paths { |
26 | my ($mappath, $map1path, $map2path) = @_; |
38 | my ($mappath, $map1path, $map2path) = @_; |
27 | $mappath = abs_path $mappath; |
39 | $mappath = abs_path $mappath; |
28 | $map1path = abs_path $map1path; |
40 | $map1path = abs_path $map1path; |