Skip to content

Commit

Permalink
fix: house mailboxes (#3096)
Browse files Browse the repository at this point in the history
Fixes the houses mailbox that were not sending parcels and consuming
them.

Fixes #2891
  • Loading branch information
phacUFPE authored Nov 10, 2024
1 parent d7f7820 commit d52b952
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/items/tile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -987,11 +987,13 @@ std::shared_ptr<Cylinder> Tile::queryDestination(int32_t &, const std::shared_pt
const auto &destThing = destTile->getTopDownItem();
if (destThing) {
destItem = destThing->getItem();
if (thing && thing->getItem()) {
const auto &destCylinder = destThing->getCylinder();
if (destCylinder && !destCylinder->getContainer()) {
return destThing->getCylinder();
}
const auto &thingItem = thing ? thing->getItem() : nullptr;
if (!thingItem || thingItem->getMailbox() != destItem->getMailbox()) {
return destTile;
}
const auto &destCylinder = destThing->getCylinder();
if (destCylinder && !destCylinder->getContainer()) {
return destThing->getCylinder();
}
}
}
Expand Down

0 comments on commit d52b952

Please sign in to comment.