ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/kgsueme/game.pl
(Generate patch)

Comparing kgsueme/kgsueme/game.pl (file contents):
Revision 1.131 by elmex, Fri Jun 4 14:17:53 2004 UTC vs.
Revision 1.134 by root, Sun Jun 6 08:01:09 2004 UTC

174 174
175 if ($self->{name}->get_text ne $user->as_string) { 175 if ($self->{name}->get_text ne $user->as_string) {
176 $self->{name}->set_text ($user->as_string); 176 $self->{name}->set_text ($user->as_string);
177 177
178 $self->{imagebox}->remove ($_) for $self->{imagebox}->get_children; 178 $self->{imagebox}->remove ($_) for $self->{imagebox}->get_children;
179 if (0) { 179 unless ($::config{suppress_userpic}) {
180 $self->{imagebox}->add (gtk::image_from_data undef); 180 $self->{imagebox}->add (gtk::image_from_data undef);
181 } 181 }
182 $self->{imagebox}->show_all; 182 $self->{imagebox}->show_all;
183 183
184 if ($user->has_pic) { 184 if ($user->has_pic) {
186 $app->userpic ($user->{name}, sub { 186 $app->userpic ($user->{name}, sub {
187 return unless $self->{imagebox}; 187 return unless $self->{imagebox};
188 188
189 if ($_[0]) { 189 if ($_[0]) {
190 $self->{imagebox}->remove ($_) for $self->{imagebox}->get_children; 190 $self->{imagebox}->remove ($_) for $self->{imagebox}->get_children;
191 if (0) { 191 unless ($::config{suppress_userpic}) {
192 $self->{imagebox}->add (gtk::image_from_data $_[0]); 192 $self->{imagebox}->add (gtk::image_from_data $_[0]);
193 } 193 }
194 $self->{imagebox}->show_all; 194 $self->{imagebox}->show_all;
195 } 195 }
196 }); 196 });
785 my ($self, $player) = @_; 785 my ($self, $player) = @_;
786 786
787 sound::play 3, "resign"; 787 sound::play 3, "resign";
788 $self->{chat}->append_text ("\n<infoblock><header>Resign</header>" 788 $self->{chat}->append_text ("\n<infoblock><header>Resign</header>"
789 . "\n<user>" 789 . "\n<user>"
790 . (util::toxml $self->{user}[1 - $msg->{player}]->as_string) 790 . (util::toxml $self->{user}[$player]->as_string)
791 . "</user> resigned." 791 . "</user> resigned."
792 . "\n<user>" 792 . "\n<user>"
793 . (util::toxml $self->{user}[$msg->{player}]->as_string) 793 . (util::toxml $self->{user}[1 - $player]->as_string)
794 . "</user> wins the game." 794 . "</user> wins the game."
795 . "</infoblock>"); 795 . "</infoblock>");
796} 796}
797 797
798sub event_time_win { 798sub event_out_of_time {
799 my ($self, $player) = @_; 799 my ($self, $player) = @_;
800 800
801 sound::play 3, "timewin"; 801 sound::play 3, "timewin";
802 $self->{chat}->append_text ("\n<infoblock><header>Out of Time</header>" 802 $self->{chat}->append_text ("\n<infoblock><header>Out of Time</header>"
803 . "\n<user>" 803 . "\n<user>"
804 . (util::toxml $self->{user}[1 - $msg->{player}]->as_string) 804 . (util::toxml $self->{user}[$msg->{player}]->as_string)
805 . "</user> ran out of time and lost." 805 . "</user> ran out of time and lost."
806 . "\n<user>" 806 . "\n<user>"
807 . (util::toxml $self->{user}[$msg->{player}]->as_string) 807 . (util::toxml $self->{user}[1 - $msg->{player}]->as_string)
808 . "</user> wins the game." 808 . "</user> wins the game."
809 . "</infoblock>"); 809 . "</infoblock>");
810} 810}
811 811
812sub event_owner_left { 812sub event_owner_left {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines