… | |
… | |
1369 | |
1369 | |
1370 | $FLOORBOX->clear; |
1370 | $FLOORBOX->clear; |
1371 | $FLOORBOX->add (new CFClient::UI::Empty expand => 1); |
1371 | $FLOORBOX->add (new CFClient::UI::Empty expand => 1); |
1372 | |
1372 | |
1373 | # we basically have to use the same sorting as everybody else |
1373 | # we basically have to use the same sorting as everybody else |
1374 | for my $item (@{ $CONN->{container}{0} }) { |
1374 | $FLOORBOX->add ( |
1375 | $FLOORBOX->add (new CFClient::UI::InventoryItem item => $item); |
1375 | map +(new CFClient::UI::InventoryItem item => $_), |
|
|
1376 | @{ $CONN->{container}{0} } |
1376 | } |
1377 | ); |
1377 | }); |
1378 | }); |
1378 | refresh; |
1379 | refresh; |
1379 | } |
1380 | } |
1380 | |
1381 | |
1381 | sub conn::container_add { |
1382 | sub conn::container_add { |
… | |
… | |
1416 | my ($self, $item) = @_; |
1417 | my ($self, $item) = @_; |
1417 | |
1418 | |
1418 | update_floorbox if $item->{container} == 0; |
1419 | update_floorbox if $item->{container} == 0; |
1419 | |
1420 | |
1420 | $INV->set_items ($self->{container}{$item->{container}}) |
1421 | $INV->set_items ($self->{container}{$item->{container}}) |
1421 | if $item->{container}; == $self->{player}{tag}; |
1422 | if $item->{container} == $self->{player}{tag}; |
1422 | } |
1423 | } |
1423 | |
1424 | |
1424 | %SDL_CB = ( |
1425 | %SDL_CB = ( |
1425 | CFClient::SDL_QUIT => sub { |
1426 | CFClient::SDL_QUIT => sub { |
1426 | Event::unloop -1; |
1427 | Event::unloop -1; |