ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/Protocol.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/Protocol.pm (file contents):
Revision 1.189 by root, Thu Jan 10 21:53:33 2008 UTC vs.
Revision 1.192 by root, Thu Mar 27 20:42:23 2008 UTC

27 ); 27 );
28 28
29 $self->{map_widget}->clr_commands; 29 $self->{map_widget}->clr_commands;
30 30
31 my @cmd_help = map { 31 my @cmd_help = map {
32 $_->{kw}[0] =~ /^(\S+) (?:\s+ \( ([^\)]*) \) )?/x 32 $_->[DC::Pod::N_KW][0] =~ /^(\S+) (?:\s+ \( ([^\)]*) \) )?/x
33 or die "unparseable command help: $_->{kw}[0]"; 33 or die "unparseable command help: $_->[DC::Pod::N_KW][0]";
34 34
35 my $cmd = $1; 35 my $cmd = $1;
36 my @args = split /\|/, $2; 36 my @args = split /\|/, $2;
37 @args = (".*") unless @args; 37 @args = (".*") unless @args;
38 38
43 for @args; 43 for @args;
44 44
45 map ["$cmd$_", $text], 45 map ["$cmd$_", $text],
46 sort { (length $a) <=> (length $b) } 46 sort { (length $a) <=> (length $b) }
47 @args 47 @args
48 } sort { $a->{par} <=> $b->{par} } 48 } sort { $a->[DC::Pod::N_PAR] <=> $b->[DC::Pod::N_PAR] }
49 DC::Pod::find command => "*"; 49 DC::Pod::find command => "*";
50 50
51 $self->{json_coder} 51 $self->{json_coder}
52 ->convert_blessed 52 ->convert_blessed
53 ->filter_json_single_key_object ("\fw" => sub { 53 ->filter_json_single_key_object ("\fw" => sub {
1140 1140
1141 my %skill_help; 1141 my %skill_help;
1142 1142
1143 for my $node (DC::Pod::find skill_description => "*") { 1143 for my $node (DC::Pod::find skill_description => "*") {
1144 my (undef, @par) = DC::Pod::section_of $node; 1144 my (undef, @par) = DC::Pod::section_of $node;
1145 $skill_help{$node->{kw}[0]} = DC::Pod::as_label @par; 1145 $skill_help{$node->[DC::Pod::N_KW][0]} = DC::Pod::as_label @par;
1146 }; 1146 };
1147 1147
1148 for my $skill (values %{$self->{skill_info}}) { 1148 for my $skill (values %{$self->{skill_info}}) {
1149 $self->{map_widget}->add_command ("ready_skill $skill", 1149 $self->{map_widget}->add_command ("ready_skill $skill",
1150 (DC::asxml "Ready the skill '$skill'\n\n") 1150 (DC::asxml "Ready the skill '$skill'\n\n")

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines