Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpTurretHolder.cpp
Show All 34 Lines | public: | ||||
* turret point they occupy (name). | * turret point they occupy (name). | ||||
*/ | */ | ||||
virtual std::vector<std::pair<std::string, entity_id_t> > GetTurrets() const | virtual std::vector<std::pair<std::string, entity_id_t> > GetTurrets() const | ||||
{ | { | ||||
std::vector<std::pair<std::string, entity_id_t> > turrets; | std::vector<std::pair<std::string, entity_id_t> > turrets; | ||||
std::vector<entity_id_t> entities = m_Script.Call<std::vector<entity_id_t>>("GetEntities"); | std::vector<entity_id_t> entities = m_Script.Call<std::vector<entity_id_t>>("GetEntities"); | ||||
for (entity_id_t entity : entities) | for (entity_id_t entity : entities) | ||||
turrets.push_back(std::make_pair( | turrets.push_back(std::make_pair( | ||||
m_Script.Call<std::string>("GetOccupiedTurretName", entity), | m_Script.Call<std::string>("GetOccupiedTurretPointName", entity), | ||||
entity | entity | ||||
)); | )); | ||||
return turrets; | return turrets; | ||||
} | } | ||||
/** | /** | ||||
* Correlation between entities (ID) and the turret point they ought to occupy (name). | * Correlation between entities (ID) and the turret point they ought to occupy (name). | ||||
Show All 9 Lines |
Wildfire Games · Phabricator