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

Method placePhase

source/game/StarDungeonGenerator.cpp:753–766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

751 }
752
753 void Part::placePhase(Vec2I pos, Phase phase, Set<Vec2I> const& places, DungeonGeneratorWriter* writer) const {
754 m_reader->forEachTile([&places, pos, phase, writer](Vec2I tilePos, Tile const& tile) -> bool {
755 Vec2I position = pos + tilePos;
756 if (tile.collidesWithPlaces() || !places.contains(position)) {
757 try {
758 tile.place(position, phase, writer);
759 } catch (std::exception const&) {
760 Logger::error("Error at map position {}:", tilePos);
761 throw;
762 }
763 }
764 return false;
765 });
766 }
767
768 bool Part::tileUsesPlaces(Vec2I pos) const {
769 bool result = false;

Callers

nothing calls this directly

Calls 5

errorFunction · 0.85
collidesWithPlacesMethod · 0.80
placeMethod · 0.80
forEachTileMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected