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

Method canPlace

source/game/StarDungeonGenerator.cpp:513–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511 }
512
513 bool Tile::canPlace(Vec2I position, DungeonGeneratorWriter* writer) const {
514 if (writer->otherDungeonPresent(position))
515 return false;
516 else if (position[1] < 0)
517 return false;
518 for (size_t i = 0; i < rules.size(); i++)
519 if (!rules[i]->checkTileCanPlace(position, writer))
520 return false;
521 return true;
522 }
523
524 void Tile::place(Vec2I position, Phase phase, DungeonGeneratorWriter* writer) const {
525 for (size_t i = 0; i < brushes.size(); i++) {

Callers 3

generateMethod · 0.45
generateMethod · 0.45
buildDungeonMethod · 0.45

Calls 4

otherDungeonPresentMethod · 0.80
checkTileCanPlaceMethod · 0.80
sizeMethod · 0.45
forEachTileMethod · 0.45

Tested by

no test coverage detected