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

Method positionAdjustment

source/game/StarDungeonGenerator.cpp:939–950  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

937 }
938
939 Vec2I Connector::positionAdjustment() const {
940 if (m_direction == Direction::Any)
941 return Vec2I(0, 0);
942 if (m_direction == Direction::Left)
943 return Vec2I(-1, 0);
944 if (m_direction == Direction::Right)
945 return Vec2I(1, 0);
946 if (m_direction == Direction::Up)
947 return Vec2I(0, 1);
948 starAssert(m_direction == Direction::Down);
949 return Vec2I(0, -1);
950 }
951
952 Part* Connector::part() const {
953 return m_part;

Callers 1

buildDungeonMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected