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

Method GetReflectionMode

trinity/Eve/SpaceObjectFactory/EveSOFDNA.cpp:1777–1811  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1775}
1776
1777EntityComponents::ReflectionMode EveSOFDNA::GetReflectionMode() const
1778{
1779 std::string category = m_hullDatas[0]->category;
1780
1781 // New category data but keeping it backwards compatible
1782 if( !m_dataMgr->GetGenericData()->categoryData.empty() )
1783 {
1784 // See generic.red::hullCategories for adding more reflection overrides to HullCategories
1785 auto it = m_dataMgr->GetGenericData()->categoryData.find( category );
1786
1787 if( it != m_dataMgr->GetGenericData()->categoryData.end() )
1788 {
1789 return it->second;
1790 }
1791
1792 return EntityComponents::REFLECT_NEVER;
1793 }
1794
1795 // Warning non future proofed code ahead!
1796 // this should come from the category (as in the category being an object that has information about features)
1797 // see above for the new way of doing this
1798 if( category == "hangar" || category == "hangar4k" )
1799 {
1800 return EntityComponents::REFLECT_LOW_MEDIUM_HIGH;
1801 }
1802 if( category.find( "station" ) != std::string::npos || category.find( "structure" ) != std::string::npos )
1803 {
1804 return EntityComponents::REFLECT_MEDIUM_AND_HIGH;
1805 }
1806 if( category == "jumpgate" )
1807 {
1808 return EntityComponents::REFLECT_MEDIUM_AND_HIGH;
1809 }
1810 return EntityComponents::REFLECT_NEVER;
1811}

Callers 2

SetupMeshMethod · 0.80
CreatePlacementMethod · 0.80

Calls 3

emptyMethod · 0.80
GetGenericDataMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected