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

Method entityGender

source/game/scripting/StarWorldLuaBindings.cpp:1429–1437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1427 }
1428
1429 Maybe<String> WorldEntityCallbacks::entityGender(World* world, EntityId entityId) {
1430 if (auto player = world->get<Player>(entityId)) {
1431 return GenderNames.getRight(player->gender());
1432 } else if (auto npc = world->get<Npc>(entityId)) {
1433 return GenderNames.getRight(npc->gender());
1434 } else {
1435 return {};
1436 }
1437 }
1438
1439 Maybe<String> WorldEntityCallbacks::entityName(World* world, EntityId entityId) {
1440 auto entity = world->entity(entityId);

Callers

nothing calls this directly

Calls 1

genderMethod · 0.45

Tested by

no test coverage detected