| 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); |