| 29 | }; |
| 30 | |
| 31 | bool ObjectOrientation::placementValid(World const* world, Vec2I const& position) const { |
| 32 | if (!world) |
| 33 | return false; |
| 34 | |
| 35 | for (Vec2I space : spaces) { |
| 36 | space += position; |
| 37 | if (world->tileIsOccupied(space, TileLayer::Foreground, false, true) || world->isTileProtected(space)) |
| 38 | return false; |
| 39 | } |
| 40 | return true; |
| 41 | } |
| 42 | |
| 43 | bool ObjectOrientation::anchorsValid(World const* world, Vec2I const& position) const { |
| 44 | if (!world) |
no test coverage detected