… | |
… | |
228 | returns directly I<after> the tick processing (and consequently, can only wake one process |
228 | returns directly I<after> the tick processing (and consequently, can only wake one process |
229 | per tick), while cf::wait_for_tick wakes up all waiters after tick processing. |
229 | per tick), while cf::wait_for_tick wakes up all waiters after tick processing. |
230 | |
230 | |
231 | =item @cf::INVOKE_RESULTS |
231 | =item @cf::INVOKE_RESULTS |
232 | |
232 | |
233 | This array contains the results of the last C<invoke ()> call. When |
233 | This array contains the results of the last C<invoke ()> call. When |
234 | C<cf::override> is called C<@cf::INVOKE_RESULTS> is set to the parameters of |
234 | C<cf::override> is called C<@cf::INVOKE_RESULTS> is set to the parameters of |
235 | that call. |
235 | that call. |
236 | |
236 | |
237 | =item %cf::REFLECT |
237 | =item %cf::REFLECT |
238 | |
238 | |
… | |
… | |
2341 | : normalise $_ |
2341 | : normalise $_ |
2342 | } @{ aio_readdir $UNIQUEDIR or [] } |
2342 | } @{ aio_readdir $UNIQUEDIR or [] } |
2343 | ] |
2343 | ] |
2344 | } |
2344 | } |
2345 | |
2345 | |
|
|
2346 | =item cf::map::static_maps |
|
|
2347 | |
|
|
2348 | Returns an arrayref if paths of all static maps (all preinstalled F<.map> |
|
|
2349 | file in the shared directory excluding F</styles>). May block. |
|
|
2350 | |
|
|
2351 | =cut |
|
|
2352 | |
|
|
2353 | sub static_maps() { |
|
|
2354 | my @dirs = ""; |
|
|
2355 | my @maps; |
|
|
2356 | |
|
|
2357 | while (@dirs) { |
|
|
2358 | my $dir = shift @dirs; |
|
|
2359 | |
|
|
2360 | next if $dir eq "/styles"; |
|
|
2361 | |
|
|
2362 | my ($dirs, $files) = Coro::AIO::aio_scandir "$MAPDIR$dir", 2 |
|
|
2363 | or return; |
|
|
2364 | |
|
|
2365 | for (@$files) { |
|
|
2366 | s/\.map$// or next; |
|
|
2367 | utf8::decode $_; |
|
|
2368 | push @maps, "$dir/$_"; |
|
|
2369 | } |
|
|
2370 | |
|
|
2371 | push @dirs, map "$dir/$_", @$dirs; |
|
|
2372 | } |
|
|
2373 | |
|
|
2374 | \@maps |
|
|
2375 | } |
|
|
2376 | |
2346 | =back |
2377 | =back |
2347 | |
2378 | |
2348 | =head3 cf::object |
2379 | =head3 cf::object |
2349 | |
2380 | |
2350 | =cut |
2381 | =cut |
… | |
… | |
2765 | |
2796 | |
2766 | =cut |
2797 | =cut |
2767 | |
2798 | |
2768 | # non-persistent channels (usually the info channel) |
2799 | # non-persistent channels (usually the info channel) |
2769 | our %CHANNEL = ( |
2800 | our %CHANNEL = ( |
|
|
2801 | "c/motd" => { |
|
|
2802 | id => "infobox", |
|
|
2803 | title => "MOTD", |
|
|
2804 | reply => undef, |
|
|
2805 | tooltip => "The message of the day", |
|
|
2806 | }, |
2770 | "c/identify" => { |
2807 | "c/identify" => { |
2771 | id => "infobox", |
2808 | id => "infobox", |
2772 | title => "Identify", |
2809 | title => "Identify", |
2773 | reply => undef, |
2810 | reply => undef, |
2774 | tooltip => "Items recently identified", |
2811 | tooltip => "Items recently identified", |
… | |
… | |
2776 | "c/examine" => { |
2813 | "c/examine" => { |
2777 | id => "infobox", |
2814 | id => "infobox", |
2778 | title => "Examine", |
2815 | title => "Examine", |
2779 | reply => undef, |
2816 | reply => undef, |
2780 | tooltip => "Signs and other items you examined", |
2817 | tooltip => "Signs and other items you examined", |
|
|
2818 | }, |
|
|
2819 | "c/shopinfo" => { |
|
|
2820 | id => "infobox", |
|
|
2821 | title => "Shop Info", |
|
|
2822 | reply => undef, |
|
|
2823 | tooltip => "What your bargaining skill tells you about the shop", |
2781 | }, |
2824 | }, |
2782 | "c/book" => { |
2825 | "c/book" => { |
2783 | id => "infobox", |
2826 | id => "infobox", |
2784 | title => "Book", |
2827 | title => "Book", |
2785 | reply => undef, |
2828 | reply => undef, |