… | |
… | |
2550 | || s/<fg name=\"([^"]+)\">([^<]*)<\/fg>/[color=$1]${2}[\/color]/; |
2550 | || s/<fg name=\"([^"]+)\">([^<]*)<\/fg>/[color=$1]${2}[\/color]/; |
2551 | } |
2551 | } |
2552 | |
2552 | |
2553 | $color &= cf::NDI_COLOR_MASK; |
2553 | $color &= cf::NDI_COLOR_MASK; |
2554 | |
2554 | |
|
|
2555 | utf8::encode $msg; |
|
|
2556 | |
2555 | if (0 && $msg =~ /\[/) { |
2557 | if (0 && $msg =~ /\[/) { |
2556 | $self->send_packet ("drawextinfo $color 4 0 $msg") |
2558 | $self->send_packet ("drawextinfo $color 4 0 $msg") |
2557 | } else { |
2559 | } else { |
2558 | $msg =~ s/\[\/?(?:b|i|u|fixed|color)[^\]]*\]//g; |
2560 | $msg =~ s/\[\/?(?:b|i|u|fixed|color)[^\]]*\]//g; |
2559 | $self->send_packet ("drawinfo $color $msg") |
2561 | $self->send_packet ("drawinfo $color $msg") |
… | |
… | |
2708 | our $safe = new Safe "safe"; |
2710 | our $safe = new Safe "safe"; |
2709 | our $safe_hole = new Safe::Hole; |
2711 | our $safe_hole = new Safe::Hole; |
2710 | |
2712 | |
2711 | $SIG{FPE} = 'IGNORE'; |
2713 | $SIG{FPE} = 'IGNORE'; |
2712 | |
2714 | |
2713 | $safe->permit_only (Opcode::opset qw(:base_core :base_mem :base_orig :base_math sort time)); |
2715 | $safe->permit_only (Opcode::opset qw( |
|
|
2716 | :base_core :base_mem :base_orig :base_math |
|
|
2717 | grepstart grepwhile mapstart mapwhile |
|
|
2718 | sort time |
|
|
2719 | )); |
2714 | |
2720 | |
2715 | # here we export the classes and methods available to script code |
2721 | # here we export the classes and methods available to script code |
2716 | |
2722 | |
2717 | =pod |
2723 | =pod |
2718 | |
2724 | |
… | |
… | |
2733 | |
2739 | |
2734 | =cut |
2740 | =cut |
2735 | |
2741 | |
2736 | for ( |
2742 | for ( |
2737 | ["cf::object" => qw(contr pay_amount pay_player map force_find force_add x y |
2743 | ["cf::object" => qw(contr pay_amount pay_player map force_find force_add x y |
2738 | insert remove)], |
2744 | insert remove inv)], |
2739 | ["cf::object::player" => qw(player)], |
2745 | ["cf::object::player" => qw(player)], |
2740 | ["cf::player" => qw(peaceful)], |
2746 | ["cf::player" => qw(peaceful)], |
2741 | ["cf::map" => qw(trigger)], |
2747 | ["cf::map" => qw(trigger)], |
2742 | ) { |
2748 | ) { |
2743 | no strict 'refs'; |
2749 | no strict 'refs'; |
… | |
… | |
2909 | for (0 .. SOUND_CAST_SPELL_0 - 1) { |
2915 | for (0 .. SOUND_CAST_SPELL_0 - 1) { |
2910 | my $sound = $soundconf->{compat}[$_] |
2916 | my $sound = $soundconf->{compat}[$_] |
2911 | or next; |
2917 | or next; |
2912 | |
2918 | |
2913 | my $face = cf::face::find "sound/$sound->[1]"; |
2919 | my $face = cf::face::find "sound/$sound->[1]"; |
2914 | |
|
|
2915 | cf::sound::set $sound->[0] => $face; |
2920 | cf::sound::set $sound->[0] => $face; |
2916 | cf::sound::old_sound_index $_, $face; # gcfclient-compat |
2921 | cf::sound::old_sound_index $_, $face; # gcfclient-compat |
2917 | } |
2922 | } |
2918 | |
2923 | |
|
|
2924 | while (my ($k, $v) = each %{$soundconf->{event}}) { |
|
|
2925 | my $face = cf::face::find "sound/$v"; |
|
|
2926 | cf::sound::set $k => $face; |
2919 | #TODO |
2927 | } |
2920 | } |
2928 | } |
2921 | } |
2929 | } |
2922 | |
2930 | |
2923 | 1 |
2931 | 1 |
2924 | } |
2932 | } |