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.132 by root, Tue Jul 24 05:13:23 2007 UTC vs.
Revision 1.136 by elmex, Fri Jul 27 18:04:42 2007 UTC

183 183
184 my $w = $self->{widget}{$id} 184 my $w = $self->{widget}{$id}
185 or return; 185 or return;
186 186
187 $self->send_exti_msg (w_r => $rid, [map $w->{$_}, @$attr]); 187 $self->send_exti_msg (w_r => $rid, [map $w->{$_}, @$attr]);
188 });
189
190 # message window
191 $self->connect_ext (channel_info => sub {
192 my ($info) = @_;
193 $self->{channels}->{$info->{id}} = $info;
194 $::MESSAGE_WINDOW->add_channel ($info);
188 }); 195 });
189 196
190 # destroy widgets on logout 197 # destroy widgets on logout
191 $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 {
192 for my $ws (values %{delete $self->{widgetset} || {}}) { 199 for my $ws (values %{delete $self->{widgetset} || {}}) {
889 896
890 ## 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
891 # no longer neecssary with TRT servers 898 # no longer neecssary with TRT servers
892 #$text =~ s/(?<=\S)\n(?=\w)/ /g; 899 #$text =~ s/(?<=\S)\n(?=\w)/ /g;
893 900
894 ::message ({ fg => $fg, markup => $_ }) 901 ::message ({ fg => $fg, markup => $_, type => $type, extra => [@extra] })
895 for split /\n/, $text; 902 for split /\n/, $text;
896 903
897 $self->{statusbox}->add ($text, 904 $self->{statusbox}->add ($text,
898 group => $text, 905 group => $text,
899 fg => $fg, 906 fg => $fg,
1155 . "cfplus support $yesno[$self->{cfplus_ext} > 0]" 1162 . "cfplus support $yesno[$self->{cfplus_ext} > 0]"
1156 . ($self->{cfplus_ext} > 0 ? ", version $self->{cfplus_ext}" : "") ."\n" 1163 . ($self->{cfplus_ext} > 0 ? ", version $self->{cfplus_ext}" : "") ."\n"
1157 . "map size $self->{mapw}×$self->{maph}\n" 1164 . "map size $self->{mapw}×$self->{maph}\n"
1158 ); 1165 );
1159 1166
1160 ::setup_build_button ($self->{editor_support}->{builder_ui});
1161} 1167}
1162 1168
1163sub logged_in { 1169sub logged_in {
1164 my ($self) = @_; 1170 my ($self) = @_;
1165 1171
1185 1191
1186 $self->send_command ("output-sync $::CFG->{output_sync}"); 1192 $self->send_command ("output-sync $::CFG->{output_sync}");
1187 $self->send_command ("output-count $::CFG->{output_count}"); 1193 $self->send_command ("output-count $::CFG->{output_count}");
1188 $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;
1189 $self->send_command ("pickup $::CFG->{pickup}"); 1195 $self->send_command ("pickup $::CFG->{pickup}");
1190}
1191
1192sub buildat {
1193 my ($self, $builditem, $x, $y) = @_;
1194
1195 if ($self->{cfplus_ext}) {
1196 $self->send_ext_msg (builder_build => dx => $x, dy => $y, (ref ($builditem) eq 'HASH') ? %$builditem : (item => $builditem));
1197 }
1198} 1196}
1199 1197
1200sub lookat { 1198sub lookat {
1201 my ($self, $x, $y) = @_; 1199 my ($self, $x, $y) = @_;
1202 1200

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines