ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/pclient
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/pclient (file contents):
Revision 1.225 by root, Wed May 17 16:17:01 2006 UTC vs.
Revision 1.226 by root, Wed May 17 20:21:28 2006 UTC

750 750
751 $CFG->{mapsize} = $self->{range}[0] = $value = int $value; 751 $CFG->{mapsize} = $self->{range}[0] = $value = int $value;
752 }, 752 },
753 ); 753 );
754 754
755 $table->add (0, 8, new CFClient::UI::Label valign => 0, align => 1, text => "Output-Count");
756 $table->add (1, 8, new CFClient::UI::Entry
757 text => $CFG->{output_count},
758 tooltip => "Should be set to 1 unless you know what you are doing",
759 connect_changed => sub { $CFG->{output_count} = $_[1] },
760 );
761
762 $table->add (0, 9, new CFClient::UI::Label valign => 0, align => 1, text => "Output-Sync");
763 $table->add (1, 9, new CFClient::UI::Entry
764 text => $CFG->{output_sync},
765 tooltip => "Should be set to 1 unless you know what you are doing",
766 connect_changed => sub { $CFG->{output_sync} = $_[1] },
767 );
768
755 $table->add (1, 8, $LOGIN_BUTTON = new CFClient::UI::Button 769 $table->add (1, 10, $LOGIN_BUTTON = new CFClient::UI::Button
756 expand => 1, 770 expand => 1,
757 align => 0, 771 align => 0,
758 text => "Login", 772 text => "Login",
759 connect_activate => sub { 773 connect_activate => sub {
760 $CONN ? stop_game 774 $CONN ? stop_game
941my $bgmusic;#TODO#hack#d# 955my $bgmusic;#TODO#hack#d#
942 956
943sub audio_channel_finished { 957sub audio_channel_finished {
944 my ($channel) = @_; 958 my ($channel) = @_;
945 959
946 warn "channel $channel finished\n";#d# 960 #warn "channel $channel finished\n";#d#
947} 961}
948 962
949sub audio_music_finished { 963sub audio_music_finished {
950 return unless $CFG->{bgm_enable}; 964 return unless $CFG->{bgm_enable};
951 965
1036 my ($widget) = @_; 1050 my ($widget) = @_;
1037 delete $animate_object{$widget}; 1051 delete $animate_object{$widget};
1038} 1052}
1039 1053
1040@conn::ISA = Crossfire::Protocol::; 1054@conn::ISA = Crossfire::Protocol::;
1055
1056sub conn::new {
1057 my $class = shift;
1058
1059 my $self = $class->Crossfire::Protocol::new (@_);
1060
1061 $MAPWIDGET->clr_commands;
1062
1063 my $parser = new Pod::POM;
1064 my $pod = $parser->parse_file (CFClient::find_rcfile "pod/command_help.pod");
1065
1066 for my $head2 ($pod->head2) {
1067 $head2->title =~ /^(\S+) (?:\s+ \( ([^\)]*) \) )?/x
1068 or next;
1069
1070 my $cmd = $1;
1071 my @args = split /\|/, $2;
1072 @args = (".*") unless @args;
1073
1074 my $text = CFClient::pod_to_pango $head2->content;
1075
1076 for my $arg (@args) {
1077 $arg = $arg eq ".*" ? "" : " $arg";
1078
1079 $MAPWIDGET->add_command ("$cmd$arg", $text);
1080 }
1081 }
1082
1083 $self
1084}
1041 1085
1042sub conn::stats_update { 1086sub conn::stats_update {
1043 my ($self, $stats) = @_; 1087 my ($self, $stats) = @_;
1044 1088
1045 if (my $exp = $stats->{Crossfire::Protocol::CS_STAT_EXP64}) { 1089 if (my $exp = $stats->{Crossfire::Protocol::CS_STAT_EXP64}) {
1391} 1435}
1392 1436
1393sub conn::addme_success { 1437sub conn::addme_success {
1394 my ($self) = @_; 1438 my ($self) = @_;
1395 1439
1396 $MAPWIDGET->clr_commands; 1440 $self->send ("command output-sync $CFG->{output_sync}");
1441 $self->send ("command output-count $CFG->{output_count}");
1397 1442
1398 for my $skill (values %{$self->{skill_info}}) { 1443 for my $skill (values %{$self->{skill_info}}) {
1399 $MAPWIDGET->add_command ("ready_skill $skill", CFClient::UI::Label::escape "Ready the skill '$skill'"); 1444 $MAPWIDGET->add_command ("ready_skill $skill", CFClient::UI::Label::escape "Ready the skill '$skill'");
1400 $MAPWIDGET->add_command ("use_skill $skill", CFClient::UI::Label::escape "Immediately use the skill '$skill'"); 1445 $MAPWIDGET->add_command ("use_skill $skill", CFClient::UI::Label::escape "Immediately use the skill '$skill'");
1401 }
1402
1403 $MAPWIDGET->add_command ("petmode defend", "Tell pets to stay close to you and defend you");
1404 $MAPWIDGET->add_command ("petmode arena", "Same as petmode sad, but also attack other players");
1405 $MAPWIDGET->add_command ("petmode sad", "Search & Destroy - tell pets to roam about and attack enemies");
1406 $MAPWIDGET->add_command ("killpets", "Kill your pets");
1407 $MAPWIDGET->add_command ("chat", "chat TEXT\nChat with all other players");
1408 $MAPWIDGET->add_command ("shout", "shout TEXT\nShout loudly, used for emergencies");
1409 $MAPWIDGET->add_command ("tell", "tell USERNAME TEXT\nPrivately tell a specific player");
1410
1411 my $parser = new Pod::POM;
1412 my $pod = $parser->parse_file (CFClient::find_rcfile "pod/command_help.pod");
1413
1414 for my $head2 ($pod->head2) {
1415 $head2->title =~ /^(\S+) (?:\s+ \( ([^\)]*) \) )?/x
1416 or next;
1417
1418 my $cmd = $1;
1419 my @args = split /\|/, $2;
1420 @args = (".*") unless @args;
1421
1422 my $text = CFClient::pod_to_pango $head2->content;
1423
1424 for my $arg (@args) {
1425 $arg = $arg eq ".*" ? "" : " $arg";
1426
1427 $MAPWIDGET->add_command ("$cmd$arg", $text);
1428 }
1429 } 1446 }
1430} 1447}
1431 1448
1432sub conn::eof { 1449sub conn::eof {
1433 $MAPWIDGET->clr_commands; 1450 $MAPWIDGET->clr_commands;
1613 host => "crossfire.schmorp.de", 1630 host => "crossfire.schmorp.de",
1614 say_command => 'say', 1631 say_command => 'say',
1615 audio_enable => 1, 1632 audio_enable => 1,
1616 bgm_enable => 1, 1633 bgm_enable => 1,
1617 bgm_volume => 0.25, 1634 bgm_volume => 0.25,
1635 output_sync => 1,
1636 output_count => 1,
1618 ); 1637 );
1619 1638
1620 while (my ($k, $v) = each %DEF_CFG) { 1639 while (my ($k, $v) = each %DEF_CFG) {
1621 $CFG->{$k} = $v unless exists $CFG->{$k}; 1640 $CFG->{$k} = $v unless exists $CFG->{$k};
1622 } 1641 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines