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

Method canBeamToTeamShip

source/game/StarUniverseClient.cpp:413–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413bool UniverseClient::canBeamToTeamShip() const {
414 auto playerWorldId = m_clientContext->playerWorldId();
415 if (playerWorldId.empty())
416 return false;
417
418 if (m_mainPlayer->isAdmin())
419 return true;
420
421 if (canBeamUp())
422 return true;
423
424 if (playerWorldId.is<ClientShipWorldId>() && m_clientContext->shipUpgrades().capabilities.contains("teleport"))
425 return true;
426
427 return false;
428}
429
430bool UniverseClient::canTeleport() const {
431 if (m_mainPlayer->isAdmin())

Callers 1

updateMethod · 0.80

Calls 5

playerWorldIdMethod · 0.45
emptyMethod · 0.45
isAdminMethod · 0.45
containsMethod · 0.45
shipUpgradesMethod · 0.45

Tested by

no test coverage detected