… | |
… | |
66 | } |
66 | } |
67 | |
67 | |
68 | our $DOCLET_HANDLER = ext::doclet::register command => sub { |
68 | our $DOCLET_HANDLER = ext::doclet::register command => sub { |
69 | my ($pl, $category, $command) = @_; |
69 | my ($pl, $category, $command) = @_; |
70 | |
70 | |
|
|
71 | if ($command =~ /^(cast|invoke)\s+(.*)$/) { # not used currently |
|
|
72 | my ($cmd, $arg) = ($1, $2); |
|
|
73 | (ext::doclet::doclet $pl, command => $cmd) |
|
|
74 | . (ext::doclet::doclet $pl, spell => $arg) |
|
|
75 | } elsif ($command =~ /^(ready_skill|use_skill)\s+(.*)$/) { |
|
|
76 | my ($cmd, $arg) = ($1, $2); |
|
|
77 | (ext::doclet::doclet $pl, command => $cmd) |
|
|
78 | . (ext::doclet::doclet $pl, skill => $arg) |
|
|
79 | } else { |
71 | my $guard = cf::lock_acquire "ext::help::loading"; |
80 | my $guard = cf::lock_acquire "ext::help::loading"; |
72 | |
81 | |
73 | $DOCLET{$command} |
82 | $DOCLET{$command} |
74 | || "B<No documentation available for '$category/$command'>" |
83 | || "B<No documentation available for '$category/$command'>" |
|
|
84 | } |
75 | }; |
85 | }; |
76 | |
86 | |
77 | sub load_topics($$) { |
87 | sub load_topics($$) { |
78 | my ($type, $path) = @_; |
88 | my ($type, $path) = @_; |
79 | |
89 | |