Skip to content

Commit

Permalink
Auto-close containers moved into Inbox of other player (otland#4536)
Browse files Browse the repository at this point in the history
  • Loading branch information
gesior committed Oct 6, 2024
1 parent 268c517 commit 241e1fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3097,6 +3097,12 @@ void Player::postRemoveNotification(Thing* thing, const Cylinder* newParent, int
if (!isOwner) {
autoCloseContainers(container);
}
} else if (const Inbox* inboxContainer = dynamic_cast<const Inbox*>(topContainer)) {
if (inboxContainer == inbox) {
onSendContainer(container);
} else {
autoCloseContainers(container);
}
} else {
onSendContainer(container);
}
Expand Down

0 comments on commit 241e1fc

Please sign in to comment.