engine/conversion/source/MembershipsDumper.cpp
// Get the creature's current memberships
Get the creature's current memberships
Get the creature ' s current memberships
string MembershipsDumper::get_memberships() const
{
  ostringstream ss;
  int num_memberships = 0;
  ss << String::centre(StringTable::get(TextKeys::MEMBERSHIPS), num_cols) << endl << endl;
  if (creature != nullptr)
  {
    map<string, Membership> memberships = creature->get_memberships_ref().get_memberships();
    for (auto m_pair : memberships)
    {
      ss << StringTable::get(m_pair.second.get_description_sid()) << endl;
      num_memberships++;
    }
  }
  if (num_memberships == 0)
  {
    ss << String::centre("-", num_cols) << endl;
  }
  return ss.str();
}
string MembershipsDumper :: get_memberships ( ) const { ostringstream ss ; int num_memberships = 0 ; ss << String :: centre ( StringTable :: get ( TextKeys :: MEMBERSHIPS ) , num_cols ) << endl << endl ; if ( creature != nullptr ) { map < string , Membership > memberships = creature -> get_memberships_ref ( ) . get_memberships ( ) ; for ( auto m_pair : memberships ) { ss << StringTable :: get ( m_pair . second . get_description_sid ( ) ) << endl ; num_memberships ++ ; } } if ( num_memberships == 0 ) { ss << String :: centre ( " " , num_cols ) << endl ; } return ss . str ( ) ; }
Get the creature's current memberships
Get the creature ' s current memberships