MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / placementValid

Method placementValid

source/game/StarObjectDatabase.cpp:31–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29};
30
31bool 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
43bool ObjectOrientation::anchorsValid(World const* world, Vec2I const& position) const {
44 if (!world)

Callers 1

findValidOrientationMethod · 0.80

Calls 2

tileIsOccupiedMethod · 0.45
isTileProtectedMethod · 0.45

Tested by

no test coverage detected