… | |
… | |
770 | cf::register_command me => sub { |
770 | cf::register_command me => sub { |
771 | my ($pl, $msg) = @_; |
771 | my ($pl, $msg) = @_; |
772 | |
772 | |
773 | my $name = $pl->name; |
773 | my $name = $pl->name; |
774 | |
774 | |
775 | send_msg $pl, $SAY_CHANNEL => "* $name $msg", cf::NDI_GREY | cf::NDI_DEF | ($_ == $pl ? cf::NDI_REPLY : 0), "msg_say" |
775 | send_msg $_, $SAY_CHANNEL => "* $name $msg", cf::NDI_GREY | cf::NDI_DEF | ($_ == $pl ? cf::NDI_REPLY : 0), "msg_say" |
776 | for grep $pl->on_same_map_as ($_->ob), cf::player::list; |
776 | for grep $pl->on_same_map_as ($_->ob), cf::player::list; |
777 | }; |
777 | }; |
778 | |
778 | |
779 | cf::register_command say => sub { |
779 | cf::register_command say => sub { |
780 | my ($ob, $msg) = @_; |
780 | my ($ob, $msg) = @_; |
… | |
… | |
785 | |
785 | |
786 | if ($msg) { |
786 | if ($msg) { |
787 | my $name = $ob->name; |
787 | my $name = $ob->name; |
788 | my @plonmap = grep $ob->on_same_map_as ($_->ob), cf::player::list; |
788 | my @plonmap = grep $ob->on_same_map_as ($_->ob), cf::player::list; |
789 | |
789 | |
790 | send_msg $_, $SAY_CHANNEL => "$name says: $msg", cf::NDI_GREY | ($_ == $ob->contr ? cf::NDI_REPLY : 0), "msg_say" |
790 | send_msg $_, $SAY_CHANNEL => "$name says: $msg", cf::NDI_GREY, "msg_say" |
791 | for @plonmap; |
791 | for grep $_ != $ob->contr, @plonmap; |
|
|
792 | $ob->contr->send_msg ($SAY_CHANNEL => "$name says: $msg", cf::NDI_GREY | cf::NDI_REPLY); |
792 | |
793 | |
793 | # npcs, magic_ears etc. |
794 | # npcs, magic_ears etc. |
794 | # first find all objects and their first-level inventories |
795 | # first find all objects and their first-level inventories |
795 | # within a 5x5 square that have something resembling |
796 | # within a 5x5 square that have something resembling |
796 | # dialogue or support on_say. |
797 | # dialogue or support on_say. |