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

Method connectsTo

source/game/StarDungeonGenerator.cpp:923–933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

921 : m_value(value), m_forwardOnly(forwardOnly), m_direction(direction), m_offset(offset), m_part(part) {}
922
923 bool Connector::connectsTo(ConnectorConstPtr connector) const {
924 if (m_forwardOnly)
925 return false;
926 if (m_value != connector->m_value)
927 return false;
928 if (m_direction == Direction::Any || connector->m_direction == Direction::Any)
929 return true;
930 if (m_direction != flipDirection(connector->m_direction))
931 return false;
932 return true;
933 }
934
935 String Connector::value() const {
936 return m_value;

Callers 1

findConnectablePartMethod · 0.80

Calls 1

flipDirectionFunction · 0.85

Tested by

no test coverage detected