… | |
… | |
70 | # within a 5x5 square # that have something resembling |
70 | # within a 5x5 square # that have something resembling |
71 | # dialogue or support on_say. |
71 | # dialogue or support on_say. |
72 | my ($map, $x, $y) = ($who->map, $who->x - 2, $who->y - 2); |
72 | my ($map, $x, $y) = ($who->map, $who->x - 2, $who->y - 2); |
73 | |
73 | |
74 | for my $npc ( |
74 | for my $npc ( |
75 | grep +($_->invoke (cf::EVENT_OBJECT_SAY, $who, $msg) && return) || NPC_Dialogue::has_dialogue $_, |
75 | grep +($_->invoke (cf::EVENT_OBJECT_SAY, $who->contr, $msg) && return) || NPC_Dialogue::has_dialogue $_, |
76 | map +($_, $_->inv), |
76 | map +($_, $_->inv), |
77 | grep $_, |
77 | grep $_, |
78 | map $map->at ($x + $_ % 5, $y + (int $_ / 5)), |
78 | map $map->at ($x + $_ % 5, $y + (int $_ / 5)), |
79 | 0..24 |
79 | 0..24 |
80 | ) { |
80 | ) { |