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

Method isConnectable

source/game/StarWorldTiles.cpp:6–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4namespace Star {
5
6bool WorldTile::isConnectable(TileLayer layer, bool materialOnly) const {
7 if (layer == TileLayer::Foreground) {
8 if (isConnectableMaterial(foreground))
9 return true;
10 } else {
11 if (isConnectableMaterial(background))
12 return true;
13 }
14 if (materialOnly)
15 return false;
16
17 if (layer == TileLayer::Foreground)
18 return collision == CollisionKind::Block || collision == CollisionKind::Platform;
19 else
20 return false;
21}
22
23bool WorldTile::isColliding(CollisionSet const& collisionSet) const {
24 return Star::isColliding(collision, collisionSet);

Callers 2

isTileConnectableMethod · 0.80
isTileConnectableMethod · 0.80

Calls 1

isConnectableMaterialFunction · 0.85

Tested by

no test coverage detected