… | |
… | |
616 | sub item_update { |
616 | sub item_update { |
617 | my ($self, $item) = @_; |
617 | my ($self, $item) = @_; |
618 | |
618 | |
619 | #d# print "item_update: $item->{tag} in $item->{container} ($self->{player}{tag}) ($::CONN->{open_container})\n"; |
619 | #d# print "item_update: $item->{tag} in $item->{container} ($self->{player}{tag}) ($::CONN->{open_container})\n"; |
620 | |
620 | |
621 | if ($item->{tag} == $self->{player}{tag}) { |
|
|
622 | $::STATWIDS->{weight}->set_text (sprintf "Weight: %.1fkg", $item->{weight} / 1000); |
|
|
623 | return; |
|
|
624 | } |
|
|
625 | |
|
|
626 | CFClient::Item::update_widgets $item; |
621 | CFClient::Item::update_widgets $item; |
627 | |
622 | |
628 | if ($item->{tag} == $::CONN->{open_container} && not ($item->{flags} & F_OPEN)) { |
623 | if ($item->{tag} == $::CONN->{open_container} && not ($item->{flags} & F_OPEN)) { |
629 | set_opencont ($::CONN, 0, "Floor"); |
624 | set_opencont ($::CONN, 0, "Floor"); |
630 | |
625 | |
… | |
… | |
643 | } |
638 | } |
644 | } |
639 | } |
645 | |
640 | |
646 | sub player_update { |
641 | sub player_update { |
647 | my ($self, $player) = @_; |
642 | my ($self, $player) = @_; |
648 | |
|
|
649 | $::STATWIDS->{weight}->set_text (sprintf "Weight: %.1fkg", $player->{weight} / 1000); |
643 | $::STATWIDS->{weight}->set_text (sprintf "Weight: %.1fkg", $player->{weight} / 1000); |
650 | } |
644 | } |
651 | |
645 | |
652 | sub update_server_info { |
646 | sub update_server_info { |
653 | my ($self) = @_; |
647 | my ($self) = @_; |