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

Method isNpc

source/game/scripting/StarWorldLuaBindings.cpp:1862–1868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1860 }
1861
1862 bool WorldEntityCallbacks::isNpc(World* world, EntityId entityId, Maybe<int> const& damageTeam) {
1863 if (auto entity = world->get<Npc>(entityId)) {
1864 return !damageTeam || *damageTeam == entity->getTeam().team;
1865 }
1866
1867 return false;
1868 }
1869
1870 float WorldEnvironmentCallbacks::lightLevel(World* world, Vec2F const& position) {
1871 return world->lightLevel(position);

Callers

nothing calls this directly

Calls 1

getTeamMethod · 0.45

Tested by

no test coverage detected