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

Method checkBroken

source/game/StarObject.cpp:464–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464bool Object::checkBroken() {
465 if (!m_broken && !m_unbreakable) {
466 auto orientation = currentOrientation();
467 if (orientation) {
468 if (!orientation->anchorsValid(world(), tilePosition()))
469 m_broken = true;
470 } else {
471 m_broken = true;
472 }
473 }
474 return m_broken;
475}
476
477bool Object::shouldDestroy() const {
478 return m_broken || (m_health.get() <= 0);

Callers

nothing calls this directly

Calls 1

anchorsValidMethod · 0.80

Tested by

no test coverage detected