… | |
… | |
410 | ? (($new & $_ ? "+" : "-") . $self->{spell_paths}{$_}) |
410 | ? (($new & $_ ? "+" : "-") . $self->{spell_paths}{$_}) |
411 | : () |
411 | : () |
412 | } |
412 | } |
413 | sort { $a <=> $b } keys %{$self->{spell_paths}}; |
413 | sort { $a <=> $b } keys %{$self->{spell_paths}}; |
414 | |
414 | |
415 | join "", @diff |
415 | "\u$name: " . (join ", ", @diff) |
416 | } |
416 | } |
417 | |
417 | |
418 | # all stats that are chacked against changes |
418 | # all stats that are chacked against changes |
419 | my @statchange = ( |
419 | my @statchange = ( |
420 | [&CS_STAT_STR => \&_stat_numdiff, "Str"], |
420 | [&CS_STAT_STR => \&_stat_numdiff, "Str"], |
… | |
… | |
475 | } |
475 | } |
476 | |
476 | |
477 | if ( |
477 | if ( |
478 | my @diffs = map $_->[1]->($self, $_->[2], $prev->{$_->[0]}, $stats->{$_->[0]}), @statchange |
478 | my @diffs = map $_->[1]->($self, $_->[2], $prev->{$_->[0]}, $stats->{$_->[0]}), @statchange |
479 | ) { |
479 | ) { |
480 | my $msg = "<b>stat change</b>: " . (join " ", @diffs); |
480 | my $msg = "<b>stat change</b>: " . (join " ", map "($_)", @diffs); |
481 | $self->{statusbox}->add ($msg, group => "stat $msg", fg => [0.8, 1, 0.2, 1], timeout => 20); |
481 | $self->{statusbox}->add ($msg, group => "stat $msg", fg => [0.8, 1, 0.2, 1], timeout => 20); |
482 | } |
482 | } |
483 | |
483 | |
484 | $self->update_stats_window ($stats, $prev); |
484 | $self->update_stats_window ($stats, $prev); |
485 | |
485 | |
… | |
… | |
998 | |
998 | |
999 | my $tex = $self->{texture}[$tile] ||= |
999 | my $tex = $self->{texture}[$tile] ||= |
1000 | new DC::Texture |
1000 | new DC::Texture |
1001 | tile => $tile, |
1001 | tile => $tile, |
1002 | image => $data, delete_image => 1, |
1002 | image => $data, delete_image => 1, |
1003 | minify => 1, mipmap => 1; |
1003 | minify => 1; |
1004 | |
1004 | |
1005 | if (my $cbs = delete $self->{tile_cb}{$tile}) { |
1005 | if (my $cbs = delete $self->{tile_cb}{$tile}) { |
1006 | $_->($tex) for @$cbs; |
1006 | $_->($tex) for @$cbs; |
1007 | } |
1007 | } |
1008 | } |
1008 | } |