… | |
… | |
57 | } elsif ($_->{slaying} eq '/python/IPO/say.py') { |
57 | } elsif ($_->{slaying} eq '/python/IPO/say.py') { |
58 | $arch->{msg} = '@match *'."\n".'@eval ipo::command $who, $msg, $npc'."\n"; |
58 | $arch->{msg} = '@match *'."\n".'@eval ipo::command $who, $msg, $npc'."\n"; |
59 | $patched++ |
59 | $patched++ |
60 | } |
60 | } |
61 | } |
61 | } |
|
|
62 | |
62 | if ($arch->{inventory}) { |
63 | if ($arch->{inventory}) { |
63 | @{$arch->{inventory}} = |
64 | my @oinv = |
64 | grep { |
65 | grep { |
65 | $_->{slaying} ne '/python/IPO/board.py' |
66 | $_->{slaying} ne '/python/IPO/board.py' |
66 | and $_->{slaying} ne '/python/IPO/say.py' |
67 | and $_->{slaying} ne '/python/IPO/say.py' |
67 | } @{$arch->{inventory}}; |
68 | } @{$arch->{inventory}}; |
68 | $patched++ |
69 | $patched++ if @oinv < @{$arch->{inventory}}; |
|
|
70 | @{$arch->{inventory}} = @oinv; |
69 | } |
71 | } |
70 | |
72 | |
71 | if (@appendinv) { |
73 | if (@appendinv) { |
72 | $arch->{inventory} = [@{$arch->{inventory} || []}, @appendinv]; |
74 | $arch->{inventory} = [@{$arch->{inventory} || []}, @appendinv]; |
|
|
75 | $patched++ |
73 | } |
76 | } |
74 | |
77 | |
75 | $patched |
78 | $patched |
76 | } |
79 | } |
77 | |
80 | |
… | |
… | |
87 | or die "$path: file load error\n"; |
90 | or die "$path: file load error\n"; |
88 | |
91 | |
89 | my $dirty; |
92 | my $dirty; |
90 | |
93 | |
91 | for my $a (map @$_, grep $_, map @$_, grep $_, @{ $map->{map} }) { |
94 | for my $a (map @$_, grep $_, map @$_, grep $_, @{ $map->{map} }) { |
92 | if (patch_ipo ($a)) { |
95 | if ($a->{inventory} and patch_ipo ($a)) { |
93 | $dirty = 1; |
96 | $dirty = 1; |
94 | next; |
97 | next; |
95 | } |
98 | } |
96 | |
99 | |
97 | next unless $a->{msg} =~ /^\@match /; |
100 | next unless $a->{msg} =~ /^\@match /; |