MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetBuildClass

Method GetBuildClass

trinity/Eve/SpaceObjectFactory/EveSOFDNA.cpp:1102–1114  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: Return the build class for this hull --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1100// Return the build class for this hull
1101// --------------------------------------------------------------------------------
1102EveSOFDataHull::BuildClass EveSOFDNA::GetBuildClass() const
1103{
1104 std::vector<std::string> commandArgs;
1105 if( GetDnaCommandArgs( CMD_CLASS, commandArgs ) && !commandArgs.empty() )
1106 {
1107 auto found = std::find( std::begin( s_dnaClasses ), std::end( s_dnaClasses ), commandArgs[0] );
1108 if( found != std::end( s_dnaClasses ) )
1109 {
1110 return EveSOFDataHull::BuildClass( found - std::begin( s_dnaClasses ) );
1111 }
1112 }
1113 return m_hullDatas[0]->buildClass;
1114}
1115
1116// --------------------------------------------------------------------------------
1117// Description:

Callers 2

BuildFromDNAMethod · 0.80
CreateSpaceObjectMethod · 0.80

Calls 3

emptyMethod · 0.80
beginFunction · 0.50
endFunction · 0.50

Tested by

no test coverage detected