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.134 by elmex, Wed Jul 25 15:06:19 2007 UTC vs.
Revision 1.136 by elmex, Fri Jul 27 18:04:42 2007 UTC

189 189
190 # message window 190 # message window
191 $self->connect_ext (channel_info => sub { 191 $self->connect_ext (channel_info => sub {
192 my ($info) = @_; 192 my ($info) = @_;
193 $self->{channels}->{$info->{id}} = $info; 193 $self->{channels}->{$info->{id}} = $info;
194 $::MESSAGE_WINDOW->add_channel ($_[0]); 194 $::MESSAGE_WINDOW->add_channel ($info);
195 }); 195 });
196 196
197 # destroy widgets on logout 197 # destroy widgets on logout
198 $self->{on_stop_game_guard} = $self->{map_widget}{root}->connect (stop_game => sub { 198 $self->{on_stop_game_guard} = $self->{map_widget}{root}->connect (stop_game => sub {
199 for my $ws (values %{delete $self->{widgetset} || {}}) { 199 for my $ws (values %{delete $self->{widgetset} || {}}) {
896 896
897 ## try to create single paragraphs of multiple lines sent by the server 897 ## try to create single paragraphs of multiple lines sent by the server
898 # no longer neecssary with TRT servers 898 # no longer neecssary with TRT servers
899 #$text =~ s/(?<=\S)\n(?=\w)/ /g; 899 #$text =~ s/(?<=\S)\n(?=\w)/ /g;
900 900
901 ::message ({ fg => $fg, markup => $_, type => $type }) 901 ::message ({ fg => $fg, markup => $_, type => $type, extra => [@extra] })
902 for split /\n/, $text; 902 for split /\n/, $text;
903 903
904 $self->{statusbox}->add ($text, 904 $self->{statusbox}->add ($text,
905 group => $text, 905 group => $text,
906 fg => $fg, 906 fg => $fg,
1162 . "cfplus support $yesno[$self->{cfplus_ext} > 0]" 1162 . "cfplus support $yesno[$self->{cfplus_ext} > 0]"
1163 . ($self->{cfplus_ext} > 0 ? ", version $self->{cfplus_ext}" : "") ."\n" 1163 . ($self->{cfplus_ext} > 0 ? ", version $self->{cfplus_ext}" : "") ."\n"
1164 . "map size $self->{mapw}×$self->{maph}\n" 1164 . "map size $self->{mapw}×$self->{maph}\n"
1165 ); 1165 );
1166 1166
1167 ::setup_build_button ($self->{editor_support}->{builder_ui});
1168} 1167}
1169 1168
1170sub logged_in { 1169sub logged_in {
1171 my ($self) = @_; 1170 my ($self) = @_;
1172 1171
1192 1191
1193 $self->send_command ("output-sync $::CFG->{output_sync}"); 1192 $self->send_command ("output-sync $::CFG->{output_sync}");
1194 $self->send_command ("output-count $::CFG->{output_count}"); 1193 $self->send_command ("output-count $::CFG->{output_count}");
1195 $self->send_command ("output-rate $::CFG->{output_rate}") if $::CFG->{output_rate} > 0; 1194 $self->send_command ("output-rate $::CFG->{output_rate}") if $::CFG->{output_rate} > 0;
1196 $self->send_command ("pickup $::CFG->{pickup}"); 1195 $self->send_command ("pickup $::CFG->{pickup}");
1197}
1198
1199sub buildat {
1200 my ($self, $builditem, $x, $y) = @_;
1201
1202 if ($self->{cfplus_ext}) {
1203 $self->send_ext_msg (builder_build => dx => $x, dy => $y, (ref ($builditem) eq 'HASH') ? %$builditem : (item => $builditem));
1204 }
1205} 1196}
1206 1197
1207sub lookat { 1198sub lookat {
1208 my ($self, $x, $y) = @_; 1199 my ($self, $x, $y) = @_;
1209 1200

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines