Browse Source

Convert World and EventManager methods to snake_case

Co-authored-by: djeada <[email protected]>
copilot-swe-agent[bot] 1 week ago
parent
commit
3a703e78bf
46 changed files with 167 additions and 167 deletions
  1. 2 2
      app/controllers/action_vfx.cpp
  2. 5 5
      app/controllers/command_controller.cpp
  3. 33 33
      app/core/game_engine.cpp
  4. 1 1
      app/utils/selection_utils.h
  5. 1 1
      game/audio/AudioEventHandler.cpp
  6. 5 5
      game/core/event_manager.h
  7. 5 5
      game/core/serialization.cpp
  8. 18 18
      game/core/world.cpp
  9. 20 20
      game/core/world.h
  10. 1 1
      game/map/level_loader.cpp
  11. 1 1
      game/map/map_transformer.cpp
  12. 4 4
      game/map/skirmish_loader.cpp
  13. 1 1
      game/map/visibility_service.cpp
  14. 4 4
      game/systems/ai_system/ai_command_applier.cpp
  15. 2 2
      game/systems/ai_system/ai_snapshot_builder.cpp
  16. 2 2
      game/systems/camera_follow_system.cpp
  17. 4 4
      game/systems/camera_service.cpp
  18. 3 3
      game/systems/capture_system.cpp
  19. 2 2
      game/systems/cleanup_system.cpp
  20. 10 10
      game/systems/combat_system.cpp
  21. 5 5
      game/systems/command_service.cpp
  22. 1 1
      game/systems/global_stats_registry.cpp
  23. 3 3
      game/systems/healing_system.cpp
  24. 1 1
      game/systems/movement_system.cpp
  25. 2 2
      game/systems/patrol_system.cpp
  26. 2 2
      game/systems/picking_service.cpp
  27. 2 2
      game/systems/production_service.cpp
  28. 2 2
      game/systems/production_system.cpp
  29. 3 3
      game/systems/selection_system.cpp
  30. 1 1
      game/systems/terrain_alignment_system.cpp
  31. 1 1
      game/systems/troop_count_registry.cpp
  32. 5 5
      game/systems/victory_service.cpp
  33. 1 1
      game/units/archer.cpp
  34. 1 1
      game/units/ballista.cpp
  35. 1 1
      game/units/barracks.cpp
  36. 1 1
      game/units/catapult.cpp
  37. 1 1
      game/units/healer.cpp
  38. 1 1
      game/units/horse_archer.cpp
  39. 1 1
      game/units/horse_spearman.cpp
  40. 1 1
      game/units/horse_swordsman.cpp
  41. 1 1
      game/units/spearman.cpp
  42. 1 1
      game/units/swordsman.cpp
  43. 1 1
      game/units/unit.cpp
  44. 1 1
      render/geom/patrol_flags.cpp
  45. 1 1
      render/gl/humanoid/animation/animation_inputs.cpp
  46. 2 2
      render/scene_renderer.cpp

+ 2 - 2
app/controllers/action_vfx.cpp

@@ -14,12 +14,12 @@ void ActionVFX::spawnAttackArrow(Engine::Core::World *world,
     return;
   }
 
-  auto *arrow_system = world->getSystem<Game::Systems::ArrowSystem>();
+  auto *arrow_system = world->get_system<Game::Systems::ArrowSystem>();
   if (arrow_system == nullptr) {
     return;
   }
 
-  auto *target_entity = world->getEntity(target_id);
+  auto *target_entity = world->get_entity(target_id);
   if (target_entity == nullptr) {
     return;
   }

+ 5 - 5
app/controllers/command_controller.cpp

@@ -51,7 +51,7 @@ auto CommandController::onAttackClick(qreal sx, qreal sy, int viewportWidth,
     return result;
   }
 
-  auto *target_entity = m_world->getEntity(target_id);
+  auto *target_entity = m_world->get_entity(target_id);
   if (target_entity == nullptr) {
     return result;
   }
@@ -84,7 +84,7 @@ auto CommandController::onStopCommand() -> CommandResult {
   }
 
   for (auto id : selected) {
-    auto *entity = m_world->getEntity(id);
+    auto *entity = m_world->get_entity(id);
     if (entity == nullptr) {
       continue;
     }
@@ -122,7 +122,7 @@ auto CommandController::onHoldCommand() -> CommandResult {
   }
 
   for (auto id : selected) {
-    auto *entity = m_world->getEntity(id);
+    auto *entity = m_world->get_entity(id);
     if (entity == nullptr) {
       continue;
     }
@@ -217,7 +217,7 @@ auto CommandController::onPatrolClick(qreal sx, qreal sy, int viewportWidth,
   QVector3D const second_waypoint = hit;
 
   for (auto id : selected) {
-    auto *entity = m_world->getEntity(id);
+    auto *entity = m_world->get_entity(id);
     if (entity == nullptr) {
       continue;
     }
@@ -306,7 +306,7 @@ auto CommandController::anySelectedInHoldMode() const -> bool {
 
   const auto &selected = m_selection_system->getSelectedUnits();
   for (Engine::Core::EntityID const entity_id : selected) {
-    Engine::Core::Entity *entity = m_world->getEntity(entity_id);
+    Engine::Core::Entity *entity = m_world->get_entity(entity_id);
     if (entity == nullptr) {
       continue;
     }

+ 33 - 33
app/core/game_engine.cpp

@@ -146,22 +146,22 @@ GameEngine::GameEngine(QObject *parent)
 
   std::unique_ptr<Engine::Core::System> arrow_sys =
       std::make_unique<Game::Systems::ArrowSystem>();
-  m_world->addSystem(std::move(arrow_sys));
-
-  m_world->addSystem(std::make_unique<Game::Systems::MovementSystem>());
-  m_world->addSystem(std::make_unique<Game::Systems::PatrolSystem>());
-  m_world->addSystem(std::make_unique<Game::Systems::CombatSystem>());
-  m_world->addSystem(std::make_unique<Game::Systems::HealingSystem>());
-  m_world->addSystem(std::make_unique<Game::Systems::CaptureSystem>());
-  m_world->addSystem(std::make_unique<Game::Systems::AISystem>());
-  m_world->addSystem(std::make_unique<Game::Systems::ProductionSystem>());
-  m_world->addSystem(std::make_unique<Game::Systems::TerrainAlignmentSystem>());
-  m_world->addSystem(std::make_unique<Game::Systems::CleanupSystem>());
+  m_world->add_system(std::move(arrow_sys));
+
+  m_world->add_system(std::make_unique<Game::Systems::MovementSystem>());
+  m_world->add_system(std::make_unique<Game::Systems::PatrolSystem>());
+  m_world->add_system(std::make_unique<Game::Systems::CombatSystem>());
+  m_world->add_system(std::make_unique<Game::Systems::HealingSystem>());
+  m_world->add_system(std::make_unique<Game::Systems::CaptureSystem>());
+  m_world->add_system(std::make_unique<Game::Systems::AISystem>());
+  m_world->add_system(std::make_unique<Game::Systems::ProductionSystem>());
+  m_world->add_system(std::make_unique<Game::Systems::TerrainAlignmentSystem>());
+  m_world->add_system(std::make_unique<Game::Systems::CleanupSystem>());
 
   {
     std::unique_ptr<Engine::Core::System> sel_sys =
         std::make_unique<Game::Systems::SelectionSystem>();
-    m_world->addSystem(std::move(sel_sys));
+    m_world->add_system(std::move(sel_sys));
   }
 
   m_pickingService = std::make_unique<Game::Systems::PickingService>();
@@ -169,7 +169,7 @@ GameEngine::GameEngine(QObject *parent)
   m_saveLoadService = std::make_unique<Game::Systems::SaveLoadService>();
   m_cameraService = std::make_unique<Game::Systems::CameraService>();
 
-  auto *selection_system = m_world->getSystem<Game::Systems::SelectionSystem>();
+  auto *selection_system = m_world->get_system<Game::Systems::SelectionSystem>();
   m_selectionController = std::make_unique<Game::Systems::SelectionController>(
       m_world.get(), selection_system, m_pickingService.get());
   m_commandController = std::make_unique<App::Controllers::CommandController>(
@@ -245,7 +245,7 @@ GameEngine::GameEngine(QObject *parent)
           &App::Controllers::CommandController::attack_targetSelected,
           [this]() {
             if (auto *sel_sys =
-                    m_world->getSystem<Game::Systems::SelectionSystem>()) {
+                    m_world->get_system<Game::Systems::SelectionSystem>()) {
               const auto &sel = sel_sys->getSelectedUnits();
               if (!sel.empty()) {
                 auto *cam = m_camera.get();
@@ -363,7 +363,7 @@ void GameEngine::on_right_click(qreal sx, qreal sy) {
     return;
   }
   ensure_initialized();
-  auto *selection_system = m_world->getSystem<Game::Systems::SelectionSystem>();
+  auto *selection_system = m_world->get_system<Game::Systems::SelectionSystem>();
   if (selection_system == nullptr) {
     return;
   }
@@ -386,7 +386,7 @@ void GameEngine::on_right_click(qreal sx, qreal sy) {
         m_viewport.height, 0);
 
     if (target_id != 0U) {
-      auto *target_entity = m_world->getEntity(target_id);
+      auto *target_entity = m_world->get_entity(target_id);
       if (target_entity != nullptr) {
         auto *target_unit =
             target_entity->get_component<Engine::Core::UnitComponent>();
@@ -433,7 +433,7 @@ void GameEngine::on_attack_click(qreal sx, qreal sy) {
   auto result = m_commandController->onAttackClick(
       sx, sy, m_viewport.width, m_viewport.height, m_camera.get());
 
-  auto *selection_system = m_world->getSystem<Game::Systems::SelectionSystem>();
+  auto *selection_system = m_world->get_system<Game::Systems::SelectionSystem>();
   if ((selection_system == nullptr) || !m_pickingService || !m_camera ||
       !m_world) {
     return;
@@ -446,7 +446,7 @@ void GameEngine::on_attack_click(qreal sx, qreal sy) {
         m_viewport.height, 0);
 
     if (target_id != 0) {
-      auto *target_entity = m_world->getEntity(target_id);
+      auto *target_entity = m_world->get_entity(target_id);
       if (target_entity != nullptr) {
         auto *target_unit =
             target_entity->get_component<Engine::Core::UnitComponent>();
@@ -636,7 +636,7 @@ auto GameEngine::get_player_stats(int owner_id) -> QVariantMap {
   QVariantMap result;
 
   auto &stats_registry = Game::Systems::GlobalStatsRegistry::instance();
-  const auto *stats = stats_registry.getStats(owner_id);
+  const auto *stats = stats_registry.get_stats(owner_id);
 
   if (stats != nullptr) {
     result["troopsRecruited"] = stats->troops_recruited;
@@ -717,7 +717,7 @@ void GameEngine::update(float dt) {
 
   if (m_selectedUnitsModel != nullptr) {
     auto *selection_system =
-        m_world->getSystem<Game::Systems::SelectionSystem>();
+        m_world->get_system<Game::Systems::SelectionSystem>();
     if ((selection_system != nullptr) &&
         !selection_system->getSelectedUnits().empty()) {
       m_runtime.selectionRefreshCounter++;
@@ -740,7 +740,7 @@ void GameEngine::render(int pixelWidth, int pixelHeight) {
     m_renderer->setViewport(pixelWidth, pixelHeight);
   }
   if (auto *selection_system =
-          m_world->getSystem<Game::Systems::SelectionSystem>()) {
+          m_world->get_system<Game::Systems::SelectionSystem>()) {
     const auto &sel = selection_system->getSelectedUnits();
     std::vector<unsigned int> const ids(sel.begin(), sel.end());
     m_renderer->setSelectedEntities(ids);
@@ -760,7 +760,7 @@ void GameEngine::render(int pixelWidth, int pixelHeight) {
     m_renderer->setLocalOwnerId(m_runtime.localOwnerId);
   }
   m_renderer->renderWorld(m_world.get());
-  if (auto *arrow_system = m_world->getSystem<Game::Systems::ArrowSystem>()) {
+  if (auto *arrow_system = m_world->get_system<Game::Systems::ArrowSystem>()) {
     if (auto *res = m_renderer->resources()) {
       Render::GL::renderArrows(m_renderer.get(), res, *arrow_system);
     }
@@ -801,7 +801,7 @@ auto GameEngine::world_to_screen(const QVector3D &world,
 }
 
 void GameEngine::sync_selection_flags() {
-  auto *selection_system = m_world->getSystem<Game::Systems::SelectionSystem>();
+  auto *selection_system = m_world->get_system<Game::Systems::SelectionSystem>();
   if (!m_world || (selection_system == nullptr)) {
     return;
   }
@@ -956,7 +956,7 @@ auto GameEngine::get_selected_production_state() const -> QVariantMap {
   if (!m_world) {
     return m;
   }
-  auto *selection_system = m_world->getSystem<Game::Systems::SelectionSystem>();
+  auto *selection_system = m_world->get_system<Game::Systems::SelectionSystem>();
   if (selection_system == nullptr) {
     return m;
   }
@@ -991,7 +991,7 @@ auto GameEngine::get_selected_units_command_mode() const -> QString {
   if (!m_world) {
     return "normal";
   }
-  auto *selection_system = m_world->getSystem<Game::Systems::SelectionSystem>();
+  auto *selection_system = m_world->get_system<Game::Systems::SelectionSystem>();
   if (selection_system == nullptr) {
     return "normal";
   }
@@ -1006,7 +1006,7 @@ auto GameEngine::get_selected_units_command_mode() const -> QString {
   int total_units = 0;
 
   for (auto id : sel) {
-    auto *e = m_world->getEntity(id);
+    auto *e = m_world->get_entity(id);
     if (e == nullptr) {
       continue;
     }
@@ -1295,7 +1295,7 @@ void GameEngine::start_skirmish(const QString &map_path,
 
     m_runtime.loading = false;
 
-    if (auto *ai_system = m_world->getSystem<Game::Systems::AISystem>()) {
+    if (auto *ai_system = m_world->get_system<Game::Systems::AISystem>()) {
       ai_system->reinitialize();
     }
 
@@ -1382,7 +1382,7 @@ auto GameEngine::load_from_slot(const QString &slot) -> bool {
   rebuild_registries_after_load();
   rebuild_entity_cache();
 
-  if (auto *ai_system = m_world->getSystem<Game::Systems::AISystem>()) {
+  if (auto *ai_system = m_world->get_system<Game::Systems::AISystem>()) {
     qInfo() << "Reinitializing AI system after loading saved game";
     ai_system->reinitialize();
   }
@@ -1502,7 +1502,7 @@ auto GameEngine::get_unit_info(Engine::Core::EntityID id, QString &name,
   if (!m_world) {
     return false;
   }
-  auto *e = m_world->getEntity(id);
+  auto *e = m_world->get_entity(id);
   if (e == nullptr) {
     return false;
   }
@@ -1594,7 +1594,7 @@ void GameEngine::rebuild_entity_cache() {
   m_entityCache.reset();
 
   auto &owners = Game::Systems::OwnerRegistry::instance();
-  auto entities = m_world->getEntitiesWith<Engine::Core::UnitComponent>();
+  auto entities = m_world->get_entities_with<Engine::Core::UnitComponent>();
   for (auto *e : entities) {
     auto *unit = e->get_component<Engine::Core::UnitComponent>();
     if ((unit == nullptr) || unit->health <= 0) {
@@ -1652,7 +1652,7 @@ void GameEngine::rebuild_registries_after_load() {
   rebuild_building_collisions();
 
   m_level.player_unit_id = 0;
-  auto units = m_world->getEntitiesWith<Engine::Core::UnitComponent>();
+  auto units = m_world->get_entities_with<Engine::Core::UnitComponent>();
   for (auto *entity : units) {
     auto *unit = entity->get_component<Engine::Core::UnitComponent>();
     if (unit == nullptr) {
@@ -1677,7 +1677,7 @@ void GameEngine::rebuild_building_collisions() {
     return;
   }
 
-  auto buildings = m_world->getEntitiesWith<Engine::Core::BuildingComponent>();
+  auto buildings = m_world->get_entities_with<Engine::Core::BuildingComponent>();
   for (auto *entity : buildings) {
     auto *transform = entity->get_component<Engine::Core::TransformComponent>();
     auto *unit = entity->get_component<Engine::Core::UnitComponent>();
@@ -1962,7 +1962,7 @@ auto GameEngine::is_player_in_combat() const -> bool {
     return false;
   }
 
-  auto units = m_world->getEntitiesWith<Engine::Core::UnitComponent>();
+  auto units = m_world->get_entities_with<Engine::Core::UnitComponent>();
   const float combat_check_radius = 15.0F;
 
   for (auto *entity : units) {

+ 1 - 1
app/utils/selection_utils.h

@@ -19,7 +19,7 @@ sanitize_selection(Engine::Core::World *world,
   std::vector<Engine::Core::EntityID> toKeep;
   toKeep.reserve(sel.size());
   for (auto id : sel) {
-    if (auto *e = world->getEntity(id)) {
+    if (auto *e = world->get_entity(id)) {
       if (auto *u = e->get_component<Engine::Core::UnitComponent>()) {
         if (u->health > 0) {
           toKeep.push_back(id);

+ 1 - 1
game/audio/AudioEventHandler.cpp

@@ -84,7 +84,7 @@ void AudioEventHandler::onUnitSelected(
     return;
   }
 
-  auto *entity = m_world->getEntity(event.unit_id);
+  auto *entity = m_world->get_entity(event.unit_id);
   if (entity == nullptr) {
     return;
   }

+ 5 - 5
game/core/event_manager.h

@@ -92,25 +92,25 @@ public:
     }
   }
 
-  auto getStats(const std::type_index &eventType) const -> EventStats {
+  auto get_stats(const std::type_index &event_type) const -> EventStats {
     std::lock_guard<std::mutex> const lock(m_mutex);
-    auto it = m_stats.find(eventType);
+    auto it = m_stats.find(event_type);
     if (it != m_stats.end()) {
       return it->second;
     }
     return EventStats{};
   }
 
-  auto getSubscriberCount(const std::type_index &eventType) const -> size_t {
+  auto get_subscriber_count(const std::type_index &event_type) const -> size_t {
     std::lock_guard<std::mutex> const lock(m_mutex);
-    auto it = m_handlers.find(eventType);
+    auto it = m_handlers.find(event_type);
     if (it != m_handlers.end()) {
       return it->second.size();
     }
     return 0;
   }
 
-  void clearAllSubscriptions() {
+  void clear_all_subscriptions() {
     std::lock_guard<std::mutex> const lock(m_mutex);
     m_handlers.clear();
     m_stats.clear();

+ 5 - 5
game/core/serialization.cpp

@@ -776,14 +776,14 @@ auto Serialization::serializeWorld(const World *world) -> QJsonDocument {
   QJsonObject world_obj;
   QJsonArray entities_array;
 
-  const auto &entities = world->getEntities();
+  const auto &entities = world->get_entities();
   for (const auto &[id, entity] : entities) {
     QJsonObject const entity_obj = serializeEntity(entity.get());
     entities_array.append(entity_obj);
   }
 
   world_obj["entities"] = entities_array;
-  world_obj["nextEntityId"] = static_cast<qint64>(world->getNextEntityId());
+  world_obj["nextEntityId"] = static_cast<qint64>(world->get_next_entity_id());
   world_obj["schemaVersion"] = 1;
   world_obj["owner_registry"] =
       Game::Systems::OwnerRegistry::instance().toJson();
@@ -807,8 +807,8 @@ void Serialization::deserializeWorld(World *world, const QJsonDocument &doc) {
     const auto entity_id =
         static_cast<EntityID>(entity_obj["id"].toVariant().toULongLong());
     auto *entity = entity_id == NULL_ENTITY
-                       ? world->createEntity()
-                       : world->createEntityWithId(entity_id);
+                       ? world->create_entity()
+                       : world->create_entity_with_id(entity_id);
     if (entity != nullptr) {
       deserializeEntity(entity, entity_obj);
     }
@@ -817,7 +817,7 @@ void Serialization::deserializeWorld(World *world, const QJsonDocument &doc) {
   if (world_obj.contains("nextEntityId")) {
     const auto next_id = static_cast<EntityID>(
         world_obj["nextEntityId"].toVariant().toULongLong());
-    world->setNextEntityId(next_id);
+    world->set_next_entity_id(next_id);
   }
 
   if (world_obj.contains("owner_registry")) {

+ 18 - 18
game/core/world.cpp

@@ -16,8 +16,8 @@ World::World() = default;
 World::~World() = default;
 
 auto World::createEntity() -> Entity * {
-  const std::lock_guard<std::recursive_mutex> lock(m_entityMutex);
-  EntityID const id = m_nextEntityId++;
+  const std::lock_guard<std::recursive_mutex> lock(m_entity_mutex);
+  EntityID const id = m_next_entity_id++;
   auto entity = std::make_unique<Entity>(id);
   auto *ptr = entity.get();
   m_entities[id] = std::move(entity);
@@ -25,7 +25,7 @@ auto World::createEntity() -> Entity * {
 }
 
 auto World::createEntityWithId(EntityID entity_id) -> Entity * {
-  const std::lock_guard<std::recursive_mutex> lock(m_entityMutex);
+  const std::lock_guard<std::recursive_mutex> lock(m_entity_mutex);
   if (entity_id == NULL_ENTITY) {
     return nullptr;
   }
@@ -34,26 +34,26 @@ auto World::createEntityWithId(EntityID entity_id) -> Entity * {
   auto *ptr = entity.get();
   m_entities[entity_id] = std::move(entity);
 
-  if (entity_id >= m_nextEntityId) {
-    m_nextEntityId = entity_id + 1;
+  if (entity_id >= m_next_entity_id) {
+    m_next_entity_id = entity_id + 1;
   }
 
   return ptr;
 }
 
 void World::destroyEntity(EntityID entity_id) {
-  const std::lock_guard<std::recursive_mutex> lock(m_entityMutex);
+  const std::lock_guard<std::recursive_mutex> lock(m_entity_mutex);
   m_entities.erase(entity_id);
 }
 
 void World::clear() {
-  const std::lock_guard<std::recursive_mutex> lock(m_entityMutex);
+  const std::lock_guard<std::recursive_mutex> lock(m_entity_mutex);
   m_entities.clear();
-  m_nextEntityId = 1;
+  m_next_entity_id = 1;
 }
 
 auto World::getEntity(EntityID entity_id) -> Entity * {
-  const std::lock_guard<std::recursive_mutex> lock(m_entityMutex);
+  const std::lock_guard<std::recursive_mutex> lock(m_entity_mutex);
   auto it = m_entities.find(entity_id);
   return it != m_entities.end() ? it->second.get() : nullptr;
 }
@@ -69,7 +69,7 @@ void World::update(float delta_time) {
 }
 
 auto World::getUnitsOwnedBy(int owner_id) const -> std::vector<Entity *> {
-  const std::lock_guard<std::recursive_mutex> lock(m_entityMutex);
+  const std::lock_guard<std::recursive_mutex> lock(m_entity_mutex);
   std::vector<Entity *> result;
   result.reserve(m_entities.size());
   for (const auto &[entity_id, entity] : m_entities) {
@@ -85,7 +85,7 @@ auto World::getUnitsOwnedBy(int owner_id) const -> std::vector<Entity *> {
 }
 
 auto World::getUnitsNotOwnedBy(int owner_id) const -> std::vector<Entity *> {
-  const std::lock_guard<std::recursive_mutex> lock(m_entityMutex);
+  const std::lock_guard<std::recursive_mutex> lock(m_entity_mutex);
   std::vector<Entity *> result;
   result.reserve(m_entities.size());
   for (const auto &[entity_id, entity] : m_entities) {
@@ -101,7 +101,7 @@ auto World::getUnitsNotOwnedBy(int owner_id) const -> std::vector<Entity *> {
 }
 
 auto World::getAlliedUnits(int owner_id) const -> std::vector<Entity *> {
-  const std::lock_guard<std::recursive_mutex> lock(m_entityMutex);
+  const std::lock_guard<std::recursive_mutex> lock(m_entity_mutex);
   std::vector<Entity *> result;
   result.reserve(m_entities.size());
   auto &owner_registry = Game::Systems::OwnerRegistry::instance();
@@ -121,7 +121,7 @@ auto World::getAlliedUnits(int owner_id) const -> std::vector<Entity *> {
 }
 
 auto World::getEnemyUnits(int owner_id) const -> std::vector<Entity *> {
-  const std::lock_guard<std::recursive_mutex> lock(m_entityMutex);
+  const std::lock_guard<std::recursive_mutex> lock(m_entity_mutex);
   std::vector<Entity *> result;
   result.reserve(m_entities.size());
   auto &owner_registry = Game::Systems::OwnerRegistry::instance();
@@ -139,18 +139,18 @@ auto World::getEnemyUnits(int owner_id) const -> std::vector<Entity *> {
   return result;
 }
 
-auto World::countTroopsForPlayer(int owner_id) -> int {
+auto World::count_troops_for_player(int owner_id) -> int {
   return Game::Systems::TroopCountRegistry::instance().getTroopCount(owner_id);
 }
 
 auto World::getNextEntityId() const -> EntityID {
-  const std::lock_guard<std::recursive_mutex> lock(m_entityMutex);
-  return m_nextEntityId;
+  const std::lock_guard<std::recursive_mutex> lock(m_entity_mutex);
+  return m_next_entity_id;
 }
 
 void World::setNextEntityId(EntityID next_id) {
-  const std::lock_guard<std::recursive_mutex> lock(m_entityMutex);
-  m_nextEntityId = std::max(next_id, m_nextEntityId);
+  const std::lock_guard<std::recursive_mutex> lock(m_entity_mutex);
+  m_next_entity_id = std::max(next_id, m_next_entity_id);
 }
 
 } // namespace Engine::Core

+ 20 - 20
game/core/world.h

@@ -19,18 +19,18 @@ public:
   auto operator=(const World &) -> World & = delete;
   auto operator=(World &&) -> World & = delete;
 
-  auto createEntity() -> Entity *;
-  auto createEntityWithId(EntityID entity_id) -> Entity *;
-  void destroyEntity(EntityID entity_id);
-  auto getEntity(EntityID entity_id) -> Entity *;
+  auto create_entity() -> Entity *;
+  auto create_entity_with_id(EntityID entity_id) -> Entity *;
+  void destroy_entity(EntityID entity_id);
+  auto get_entity(EntityID entity_id) -> Entity *;
   void clear();
 
-  void addSystem(std::unique_ptr<System> system);
+  void add_system(std::unique_ptr<System> system);
   void update(float delta_time);
 
   auto systems() -> std::vector<std::unique_ptr<System>> & { return m_systems; }
 
-  template <typename T> auto getSystem() -> T * {
+  template <typename T> auto get_system() -> T * {
     for (auto &system : m_systems) {
       if (auto *ptr = dynamic_cast<T *>(system.get())) {
         return ptr;
@@ -39,38 +39,38 @@ public:
     return nullptr;
   }
 
-  template <typename T> auto getEntitiesWith() -> std::vector<Entity *> {
-    const std::lock_guard<std::recursive_mutex> lock(m_entityMutex);
+  template <typename T> auto get_entities_with() -> std::vector<Entity *> {
+    const std::lock_guard<std::recursive_mutex> lock(m_entity_mutex);
     std::vector<Entity *> result;
     for (auto &[entity_id, entity] : m_entities) {
-      if (entity->template hasComponent<T>()) {
+      if (entity->template has_component<T>()) {
         result.push_back(entity.get());
       }
     }
     return result;
   }
 
-  auto getUnitsOwnedBy(int owner_id) const -> std::vector<Entity *>;
-  auto getUnitsNotOwnedBy(int owner_id) const -> std::vector<Entity *>;
-  auto getAlliedUnits(int owner_id) const -> std::vector<Entity *>;
-  auto getEnemyUnits(int owner_id) const -> std::vector<Entity *>;
-  static auto countTroopsForPlayer(int owner_id) -> int;
+  auto get_units_owned_by(int owner_id) const -> std::vector<Entity *>;
+  auto get_units_not_owned_by(int owner_id) const -> std::vector<Entity *>;
+  auto get_allied_units(int owner_id) const -> std::vector<Entity *>;
+  auto get_enemy_units(int owner_id) const -> std::vector<Entity *>;
+  static auto count_troops_for_player(int owner_id) -> int;
 
-  auto getEntities() const
+  auto get_entities() const
       -> const std::unordered_map<EntityID, std::unique_ptr<Entity>> & {
     return m_entities;
   }
 
-  auto getNextEntityId() const -> EntityID;
-  void setNextEntityId(EntityID next_id);
+  auto get_next_entity_id() const -> EntityID;
+  void set_next_entity_id(EntityID next_id);
 
-  auto getEntityMutex() -> std::recursive_mutex & { return m_entityMutex; }
+  auto get_entity_mutex() -> std::recursive_mutex & { return m_entity_mutex; }
 
 private:
-  EntityID m_nextEntityId = 1;
+  EntityID m_next_entity_id = 1;
   std::unordered_map<EntityID, std::unique_ptr<Entity>> m_entities;
   std::vector<std::unique_ptr<System>> m_systems;
-  mutable std::recursive_mutex m_entityMutex;
+  mutable std::recursive_mutex m_entity_mutex;
 };
 
 } // namespace Engine::Core

+ 1 - 1
game/map/level_loader.cpp

@@ -104,7 +104,7 @@ auto LevelLoader::loadFromAssets(
     }
 
     bool has_barracks = false;
-    for (auto *e : world.getEntitiesWith<Engine::Core::UnitComponent>()) {
+    for (auto *e : world.get_entities_with<Engine::Core::UnitComponent>()) {
       if (auto *u = e->get_component<Engine::Core::UnitComponent>()) {
         if (u->spawn_type == Game::Units::SpawnType::Barracks &&
             owners.isPlayer(u->owner_id)) {

+ 1 - 1
game/map/map_transformer.cpp

@@ -190,7 +190,7 @@ auto MapTransformer::applyToWorld(
       }
       auto obj = s_registry->create(s.type, world, sp);
       if (obj) {
-        e = world.getEntity(obj->id());
+        e = world.get_entity(obj->id());
         rt.unit_ids.push_back(obj->id());
       } else {
         qWarning() << "MapTransformer: no factory for spawn type"

+ 4 - 4
game/map/skirmish_loader.cpp

@@ -65,7 +65,7 @@ SkirmishLoader::SkirmishLoader(Engine::Core::World &world,
 
 void SkirmishLoader::resetGameState() {
   if (auto *selection_system =
-          m_world.getSystem<Game::Systems::SelectionSystem>()) {
+          m_world.get_system<Game::Systems::SelectionSystem>()) {
     selection_system->clearSelection();
   }
 
@@ -277,7 +277,7 @@ auto SkirmishLoader::start(const QString &map_path,
       }
     }
 
-    auto entities = m_world.getEntitiesWith<Engine::Core::UnitComponent>();
+    auto entities = m_world.get_entities_with<Engine::Core::UnitComponent>();
     std::unordered_map<int, int> owner_entity_count;
     for (auto *entity : entities) {
       auto *unit = entity->get_component<Engine::Core::UnitComponent>();
@@ -458,7 +458,7 @@ auto SkirmishLoader::start(const QString &map_path,
 
   Engine::Core::Entity *focus_entity = nullptr;
 
-  auto candidates = m_world.getEntitiesWith<Engine::Core::UnitComponent>();
+  auto candidates = m_world.get_entities_with<Engine::Core::UnitComponent>();
   for (auto *entity : candidates) {
     if (entity == nullptr) {
       continue;
@@ -475,7 +475,7 @@ auto SkirmishLoader::start(const QString &map_path,
   }
 
   if ((focus_entity == nullptr) && level_result.player_unit_id != 0) {
-    focus_entity = m_world.getEntity(level_result.player_unit_id);
+    focus_entity = m_world.get_entity(level_result.player_unit_id);
   }
 
   if (focus_entity != nullptr) {

+ 1 - 1
game/map/visibility_service.cpp

@@ -110,7 +110,7 @@ auto VisibilityService::gatherVisionSources(Engine::Core::World &world,
     -> std::vector<VisibilityService::VisionSource> {
   std::vector<VisionSource> sources;
   const auto entities =
-      world.getEntitiesWith<Engine::Core::TransformComponent>();
+      world.get_entities_with<Engine::Core::TransformComponent>();
   const float range_padding = m_tile_size * k_half_cell_offset;
 
   auto &owner_registry = Game::Systems::OwnerRegistry::instance();

+ 4 - 4
game/systems/ai_system/ai_command_applier.cpp

@@ -51,7 +51,7 @@ void AICommandApplier::apply(Engine::Core::World &world, int aiOwnerId,
 
       for (std::size_t idx = 0; idx < command.units.size(); ++idx) {
         auto entity_id = command.units[idx];
-        auto *entity = world.getEntity(entity_id);
+        auto *entity = world.get_entity(entity_id);
         if (entity == nullptr) {
           continue;
         }
@@ -87,7 +87,7 @@ void AICommandApplier::apply(Engine::Core::World &world, int aiOwnerId,
       owned_units.reserve(command.units.size());
 
       for (auto entity_id : command.units) {
-        auto *entity = world.getEntity(entity_id);
+        auto *entity = world.get_entity(entity_id);
         if (entity == nullptr) {
           continue;
         }
@@ -110,7 +110,7 @@ void AICommandApplier::apply(Engine::Core::World &world, int aiOwnerId,
     }
 
     case AICommandType::StartProduction: {
-      auto *entity = world.getEntity(command.buildingId);
+      auto *entity = world.get_entity(command.buildingId);
       if (entity == nullptr) {
         break;
       }
@@ -131,7 +131,7 @@ void AICommandApplier::apply(Engine::Core::World &world, int aiOwnerId,
       }
 
       int const current_troops =
-          Engine::Core::World::countTroopsForPlayer(aiOwnerId);
+          Engine::Core::World::count_troops_for_player(aiOwnerId);
       int const max_troops =
           Game::GameConfig::instance().getMaxTroopsPerPlayer();
       Game::Units::TroopType const product_type = production->product_type;

+ 2 - 2
game/systems/ai_system/ai_snapshot_builder.cpp

@@ -11,7 +11,7 @@ auto AISnapshotBuilder::build(const Engine::Core::World &world,
   AISnapshot snapshot;
   snapshot.player_id = aiOwnerId;
 
-  auto friendlies = world.getUnitsOwnedBy(aiOwnerId);
+  auto friendlies = world.get_units_owned_by(aiOwnerId);
   snapshot.friendlies.reserve(friendlies.size());
 
   int skipped_no_ai = 0;
@@ -77,7 +77,7 @@ auto AISnapshotBuilder::build(const Engine::Core::World &world,
     added++;
   }
 
-  auto enemies = world.getEnemyUnits(aiOwnerId);
+  auto enemies = world.get_enemy_units(aiOwnerId);
   snapshot.visibleEnemies.reserve(enemies.size());
 
   for (auto *entity : enemies) {

+ 2 - 2
game/systems/camera_follow_system.cpp

@@ -17,7 +17,7 @@ void CameraFollowSystem::update(Engine::Core::World &world,
   QVector3D sum(0, 0, 0);
   int count = 0;
   for (auto id : sel) {
-    if (auto *e = world.getEntity(id)) {
+    if (auto *e = world.get_entity(id)) {
       if (auto *t = e->get_component<Engine::Core::TransformComponent>()) {
         sum += QVector3D(t->position.x, t->position.y, t->position.z);
         ++count;
@@ -41,7 +41,7 @@ void CameraFollowSystem::snapToSelection(Engine::Core::World &world,
   QVector3D sum(0, 0, 0);
   int count = 0;
   for (auto id : sel) {
-    if (auto *e = world.getEntity(id)) {
+    if (auto *e = world.get_entity(id)) {
       if (auto *t = e->get_component<Engine::Core::TransformComponent>()) {
         sum += QVector3D(t->position.x, t->position.y, t->position.z);
         ++count;

+ 4 - 4
game/systems/camera_service.cpp

@@ -67,7 +67,7 @@ void CameraService::followSelection(Render::GL::Camera &camera,
   m_controller->setFollowEnabled(camera, enable);
 
   if (enable) {
-    if (auto *selection_system = world.getSystem<SelectionSystem>()) {
+    if (auto *selection_system = world.get_system<SelectionSystem>()) {
       m_followSystem->snapToSelection(world, *selection_system, camera);
     }
   } else {
@@ -86,7 +86,7 @@ void CameraService::resetCamera(Render::GL::Camera &camera,
                                 Engine::Core::World &world, int local_owner_id,
                                 unsigned int playerUnitId) {
   Engine::Core::Entity *focus_entity = nullptr;
-  for (auto *e : world.getEntitiesWith<Engine::Core::UnitComponent>()) {
+  for (auto *e : world.get_entities_with<Engine::Core::UnitComponent>()) {
     if (e == nullptr) {
       continue;
     }
@@ -101,7 +101,7 @@ void CameraService::resetCamera(Render::GL::Camera &camera,
     }
   }
   if ((focus_entity == nullptr) && playerUnitId != 0) {
-    focus_entity = world.getEntity(playerUnitId);
+    focus_entity = world.get_entity(playerUnitId);
   }
 
   if (focus_entity != nullptr) {
@@ -123,7 +123,7 @@ void CameraService::updateFollow(Render::GL::Camera &camera,
                                  Engine::Core::World &world,
                                  bool follow_enabled) {
   if (follow_enabled) {
-    if (auto *selection_system = world.getSystem<SelectionSystem>()) {
+    if (auto *selection_system = world.get_system<SelectionSystem>()) {
       m_followSystem->update(world, *selection_system, camera);
     }
   }

+ 3 - 3
game/systems/capture_system.cpp

@@ -25,7 +25,7 @@ auto CaptureSystem::countNearbyTroops(Engine::Core::World *world,
                                       float barrack_x, float barrack_z,
                                       int owner_id, float radius) -> int {
   int total_troops = 0;
-  auto entities = world->getEntitiesWith<Engine::Core::UnitComponent>();
+  auto entities = world->get_entities_with<Engine::Core::UnitComponent>();
 
   for (auto *e : entities) {
     auto *unit = e->get_component<Engine::Core::UnitComponent>();
@@ -127,7 +127,7 @@ void CaptureSystem::processBarrackCapture(Engine::Core::World *world,
   constexpr float capture_radius = 8.0F;
   constexpr int troop_advantage_multiplier = 3;
 
-  auto barracks = world->getEntitiesWith<Engine::Core::BuildingComponent>();
+  auto barracks = world->get_entities_with<Engine::Core::BuildingComponent>();
 
   for (auto *barrack : barracks) {
     auto *unit = barrack->get_component<Engine::Core::UnitComponent>();
@@ -153,7 +153,7 @@ void CaptureSystem::processBarrackCapture(Engine::Core::World *world,
     int max_enemy_troops = 0;
     int capturing_player_id = -1;
 
-    auto entities = world->getEntitiesWith<Engine::Core::UnitComponent>();
+    auto entities = world->get_entities_with<Engine::Core::UnitComponent>();
     std::vector<int> player_ids;
     for (auto *e : entities) {
       auto *u = e->get_component<Engine::Core::UnitComponent>();

+ 2 - 2
game/systems/cleanup_system.cpp

@@ -14,7 +14,7 @@ void CleanupSystem::removeDeadEntities(Engine::Core::World *world) {
   std::vector<Engine::Core::EntityID> entities_to_remove;
 
   auto entities =
-      world->getEntitiesWith<Engine::Core::PendingRemovalComponent>();
+      world->get_entities_with<Engine::Core::PendingRemovalComponent>();
 
   entities_to_remove.reserve(entities.size());
   for (auto *entity : entities) {
@@ -22,7 +22,7 @@ void CleanupSystem::removeDeadEntities(Engine::Core::World *world) {
   }
 
   for (auto entity_id : entities_to_remove) {
-    world->destroyEntity(entity_id);
+    world->destroy_entity(entity_id);
   }
 }
 

+ 10 - 10
game/systems/combat_system.cpp

@@ -25,9 +25,9 @@ void CombatSystem::update(Engine::Core::World *world, float delta_time) {
 }
 
 void CombatSystem::processAttacks(Engine::Core::World *world, float delta_time) {
-  auto units = world->getEntitiesWith<Engine::Core::UnitComponent>();
+  auto units = world->get_entities_with<Engine::Core::UnitComponent>();
 
-  auto *arrow_sys = world->getSystem<ArrowSystem>();
+  auto *arrow_sys = world->get_system<ArrowSystem>();
 
   for (auto *attacker : units) {
 
@@ -50,7 +50,7 @@ void CombatSystem::processAttacks(Engine::Core::World *world, float delta_time)
     }
 
     if ((attacker_atk != nullptr) && attacker_atk->in_melee_lock) {
-      auto *lock_target = world->getEntity(attacker_atk->melee_lock_target_id);
+      auto *lock_target = world->get_entity(attacker_atk->melee_lock_target_id);
       if ((lock_target == nullptr) ||
           lock_target->has_component<Engine::Core::PendingRemovalComponent>()) {
 
@@ -94,7 +94,7 @@ void CombatSystem::processAttacks(Engine::Core::World *world, float delta_time)
 
     if ((attacker_atk != nullptr) && attacker_atk->in_melee_lock &&
         attacker_atk->melee_lock_target_id != 0) {
-      auto *lock_target = world->getEntity(attacker_atk->melee_lock_target_id);
+      auto *lock_target = world->get_entity(attacker_atk->melee_lock_target_id);
       if ((lock_target != nullptr) &&
           !lock_target->has_component<Engine::Core::PendingRemovalComponent>()) {
 
@@ -156,7 +156,7 @@ void CombatSystem::processAttacks(Engine::Core::World *world, float delta_time)
 
     if ((attack_target != nullptr) && attack_target->target_id != 0) {
 
-      auto *target = world->getEntity(attack_target->target_id);
+      auto *target = world->get_entity(attack_target->target_id);
       if ((target != nullptr) &&
           !target->has_component<Engine::Core::PendingRemovalComponent>()) {
         auto *target_unit = target->get_component<Engine::Core::UnitComponent>();
@@ -633,7 +633,7 @@ void CombatSystem::dealDamage(Engine::Core::World *world,
 
     int attacker_owner_id = 0;
     if (attackerId != 0 && (world != nullptr)) {
-      auto *attacker = world->getEntity(attackerId);
+      auto *attacker = world->get_entity(attackerId);
       if (attacker != nullptr) {
         auto *attacker_unit =
             attacker->get_component<Engine::Core::UnitComponent>();
@@ -665,7 +665,7 @@ void CombatSystem::dealDamage(Engine::Core::World *world,
           target_atk->melee_lock_target_id != 0) {
 
         if (world != nullptr) {
-          auto *lock_partner = world->getEntity(target_atk->melee_lock_target_id);
+          auto *lock_partner = world->get_entity(target_atk->melee_lock_target_id);
           if ((lock_partner != nullptr) &&
               !lock_partner
                    ->has_component<Engine::Core::PendingRemovalComponent>()) {
@@ -728,7 +728,7 @@ void CombatSystem::updateCombatMode(
   }
 
   auto &owner_registry = Game::Systems::OwnerRegistry::instance();
-  auto units = world->getEntitiesWith<Engine::Core::UnitComponent>();
+  auto units = world->get_entities_with<Engine::Core::UnitComponent>();
 
   float closest_enemy_dist_sq = std::numeric_limits<float>::max();
   float closest_height_diff = 0.0F;
@@ -800,7 +800,7 @@ void CombatSystem::updateCombatMode(
 
 void CombatSystem::processAutoEngagement(Engine::Core::World *world,
                                          float delta_time) {
-  auto units = world->getEntitiesWith<Engine::Core::UnitComponent>();
+  auto units = world->get_entities_with<Engine::Core::UnitComponent>();
 
   for (auto it = m_engagementCooldowns.begin();
        it != m_engagementCooldowns.end();) {
@@ -905,7 +905,7 @@ auto CombatSystem::findNearestEnemy(Engine::Core::Entity *unit,
   }
 
   auto &owner_registry = Game::Systems::OwnerRegistry::instance();
-  auto units = world->getEntitiesWith<Engine::Core::UnitComponent>();
+  auto units = world->get_entities_with<Engine::Core::UnitComponent>();
 
   Engine::Core::Entity *nearest_enemy = nullptr;
   float nearest_dist_sq = max_range * max_range;

+ 5 - 5
game/systems/command_service.cpp

@@ -122,7 +122,7 @@ void CommandService::moveUnits(Engine::Core::World &world,
   }
 
   for (size_t i = 0; i < units.size(); ++i) {
-    auto *e = world.getEntity(units[i]);
+    auto *e = world.get_entity(units[i]);
     if (e == nullptr) {
       continue;
     }
@@ -349,7 +349,7 @@ void CommandService::moveGroup(Engine::Core::World &world,
   members.reserve(units.size());
 
   for (size_t i = 0; i < units.size(); ++i) {
-    auto *entity = world.getEntity(units[i]);
+    auto *entity = world.get_entity(units[i]);
     if (entity == nullptr) {
       continue;
     }
@@ -731,7 +731,7 @@ void CommandService::processPathResults(Engine::Core::World &world) {
     auto apply_to_member = [&](Engine::Core::EntityID member_id,
                                const QVector3D &target,
                                const QVector3D &offset) {
-      auto *member_entity = world.getEntity(member_id);
+      auto *member_entity = world.get_entity(member_id);
       if (member_entity == nullptr) {
         return;
       }
@@ -854,7 +854,7 @@ void CommandService::attack_target(
     return;
   }
   for (auto unit_id : units) {
-    auto *e = world.getEntity(unit_id);
+    auto *e = world.get_entity(unit_id);
     if (e == nullptr) {
       continue;
     }
@@ -882,7 +882,7 @@ void CommandService::attack_target(
       continue;
     }
 
-    auto *target_ent = world.getEntity(target_id);
+    auto *target_ent = world.get_entity(target_id);
     if (target_ent == nullptr) {
       continue;
     }

+ 1 - 1
game/systems/global_stats_registry.cpp

@@ -143,7 +143,7 @@ void GlobalStatsRegistry::rebuild_from_world(Engine::Core::World &world) {
     m_player_stats[owner_id].game_start_time = startTime;
   }
 
-  auto entities = world.getEntitiesWith<Engine::Core::UnitComponent>();
+  auto entities = world.get_entities_with<Engine::Core::UnitComponent>();
   for (auto *e : entities) {
     auto *unit = e->get_component<Engine::Core::UnitComponent>();
     if ((unit == nullptr) || unit->health <= 0) {

+ 3 - 3
game/systems/healing_system.cpp

@@ -14,8 +14,8 @@ void HealingSystem::update(Engine::Core::World *world, float delta_time) {
 
 void HealingSystem::processHealing(Engine::Core::World *world,
                                    float delta_time) {
-  auto healers = world->getEntitiesWith<Engine::Core::HealerComponent>();
-  auto *arrow_system = world->getSystem<ArrowSystem>();
+  auto healers = world->get_entities_with<Engine::Core::HealerComponent>();
+  auto *arrow_system = world->get_system<ArrowSystem>();
 
   for (auto *healer : healers) {
     if (healer->has_component<Engine::Core::PendingRemovalComponent>()) {
@@ -43,7 +43,7 @@ void HealingSystem::processHealing(Engine::Core::World *world,
     }
 
     bool healed_any = false;
-    auto units = world->getEntitiesWith<Engine::Core::UnitComponent>();
+    auto units = world->get_entities_with<Engine::Core::UnitComponent>();
     for (auto *target : units) {
       if (target->has_component<Engine::Core::PendingRemovalComponent>()) {
         continue;

+ 1 - 1
game/systems/movement_system.cpp

@@ -88,7 +88,7 @@ auto isSegmentWalkable(const QVector3D &from, const QVector3D &to,
 
 void MovementSystem::update(Engine::Core::World *world, float delta_time) {
   CommandService::processPathResults(*world);
-  auto entities = world->getEntitiesWith<Engine::Core::MovementComponent>();
+  auto entities = world->get_entities_with<Engine::Core::MovementComponent>();
 
   for (auto *entity : entities) {
     move_unit(entity, world, delta_time);

+ 2 - 2
game/systems/patrol_system.cpp

@@ -11,7 +11,7 @@ void PatrolSystem::update(Engine::Core::World *world, float) {
     return;
   }
 
-  auto entities = world->getEntitiesWith<Engine::Core::PatrolComponent>();
+  auto entities = world->get_entities_with<Engine::Core::PatrolComponent>();
 
   for (auto *entity : entities) {
     auto *patrol = entity->get_component<Engine::Core::PatrolComponent>();
@@ -40,7 +40,7 @@ void PatrolSystem::update(Engine::Core::World *world, float) {
     }
 
     bool enemy_nearby = false;
-    auto all_entities = world->getEntitiesWith<Engine::Core::UnitComponent>();
+    auto all_entities = world->get_entities_with<Engine::Core::UnitComponent>();
     for (auto *other : all_entities) {
       auto *other_unit = other->get_component<Engine::Core::UnitComponent>();
       auto *other_transform =

+ 2 - 2
game/systems/picking_service.cpp

@@ -95,7 +95,7 @@ auto PickingService::pick_single(
   float best_building_dist2 = std::numeric_limits<float>::max();
   Engine::Core::EntityID best_unit_id = 0;
   Engine::Core::EntityID best_building_id = 0;
-  auto ents = world.getEntitiesWith<Engine::Core::TransformComponent>();
+  auto ents = world.get_entities_with<Engine::Core::TransformComponent>();
   for (auto *e : ents) {
     if (!e->has_component<Engine::Core::UnitComponent>()) {
       continue;
@@ -236,7 +236,7 @@ auto PickingService::pickInRect(
   float const min_y = std::min(y1, y2);
   float const max_y = std::max(y1, y2);
   std::vector<Engine::Core::EntityID> picked;
-  auto ents = world.getEntitiesWith<Engine::Core::TransformComponent>();
+  auto ents = world.get_entities_with<Engine::Core::TransformComponent>();
   for (auto *e : ents) {
     if (!e->has_component<Engine::Core::UnitComponent>()) {
       continue;

+ 2 - 2
game/systems/production_service.cpp

@@ -17,7 +17,7 @@ findFirstSelectedBarracks(Engine::Core::World &world,
                           const std::vector<Engine::Core::EntityID> &selected,
                           int owner_id) -> Engine::Core::Entity * {
   for (auto id : selected) {
-    if (auto *e = world.getEntity(id)) {
+    if (auto *e = world.get_entity(id)) {
       auto *u = e->get_component<Engine::Core::UnitComponent>();
       if ((u == nullptr) || u->owner_id != owner_id) {
         continue;
@@ -83,7 +83,7 @@ auto ProductionService::startProductionForFirstSelectedBarracks(
   }
 
   int const current_troops =
-      Engine::Core::World::countTroopsForPlayer(owner_id);
+      Engine::Core::World::count_troops_for_player(owner_id);
   int const max_troops = Game::GameConfig::instance().getMaxTroopsPerPlayer();
   if (current_troops + individuals_per_unit > max_troops) {
     return ProductionResult::GlobalTroopLimitReached;

+ 2 - 2
game/systems/production_system.cpp

@@ -44,7 +44,7 @@ void ProductionSystem::update(Engine::Core::World *world, float delta_time) {
   if (world == nullptr) {
     return;
   }
-  auto entities = world->getEntitiesWith<Engine::Core::ProductionComponent>();
+  auto entities = world->get_entities_with<Engine::Core::ProductionComponent>();
   for (auto *e : entities) {
     auto *prod = e->get_component<Engine::Core::ProductionComponent>();
     if (prod == nullptr) {
@@ -79,7 +79,7 @@ void ProductionSystem::update(Engine::Core::World *world, float delta_time) {
       if ((t != nullptr) && (u != nullptr)) {
 
         int const current_troops =
-            Engine::Core::World::countTroopsForPlayer(u->owner_id);
+            Engine::Core::World::count_troops_for_player(u->owner_id);
         int const max_troops =
             Game::GameConfig::instance().getMaxTroopsPerPlayer();
         if (current_troops + individuals_per_unit > max_troops) {

+ 3 - 3
game/systems/selection_system.cpp

@@ -133,7 +133,7 @@ void SelectionController::select_all_player_troops(int local_owner_id) {
 
   m_selection_system->clearSelection();
 
-  auto entities = m_world->getEntitiesWith<Engine::Core::UnitComponent>();
+  auto entities = m_world->get_entities_with<Engine::Core::UnitComponent>();
   for (auto *e : entities) {
     auto *unit = e->get_component<Engine::Core::UnitComponent>();
     if ((unit == nullptr) || unit->owner_id != local_owner_id) {
@@ -161,7 +161,7 @@ void SelectionController::select_single_unit(Engine::Core::EntityID id,
     return;
   }
 
-  auto *entity = m_world->getEntity(id);
+  auto *entity = m_world->get_entity(id);
   if (entity == nullptr) {
     return;
   }
@@ -202,7 +202,7 @@ auto SelectionController::has_selected_type(const QString &type) const -> bool {
   }
   const auto &sel = m_selection_system->getSelectedUnits();
   for (auto id : sel) {
-    if (auto *e = m_world->getEntity(id)) {
+    if (auto *e = m_world->get_entity(id)) {
       if (auto *u = e->get_component<Engine::Core::UnitComponent>()) {
         if (QString::fromStdString(
                 Game::Units::spawn_typeToString(u->spawn_type)) == type) {

+ 1 - 1
game/systems/terrain_alignment_system.cpp

@@ -14,7 +14,7 @@ void TerrainAlignmentSystem::update(Engine::Core::World *world, float) {
     return;
   }
 
-  auto entities = world->getEntitiesWith<Engine::Core::TransformComponent>();
+  auto entities = world->get_entities_with<Engine::Core::TransformComponent>();
   for (auto *entity : entities) {
     alignEntityToTerrain(entity);
   }

+ 1 - 1
game/systems/troop_count_registry.cpp

@@ -63,7 +63,7 @@ void TroopCountRegistry::on_unit_died(const Engine::Core::UnitDiedEvent &event)
 void TroopCountRegistry::rebuild_from_world(Engine::Core::World &world) {
   m_troop_counts.clear();
 
-  auto entities = world.getEntitiesWith<Engine::Core::UnitComponent>();
+  auto entities = world.get_entities_with<Engine::Core::UnitComponent>();
   for (auto *e : entities) {
     auto *unit = e->get_component<Engine::Core::UnitComponent>();
     if ((unit == nullptr) || unit->health <= 0) {

+ 5 - 5
game/systems/victory_service.cpp

@@ -140,7 +140,7 @@ void VictoryService::checkVictoryConditions(Engine::Core::World &world) {
       }
     }
 
-    const auto *stats = m_stats_registry.getStats(m_localOwnerId);
+    const auto *stats = m_stats_registry.get_stats(m_localOwnerId);
     if (stats != nullptr) {
       qInfo() << "Final Stats - Troops Recruited:" << stats->troops_recruited
               << "Enemies Killed:" << stats->enemies_killed
@@ -182,7 +182,7 @@ void VictoryService::checkDefeatConditions(Engine::Core::World &world) {
         }
       }
 
-      const auto *stats = m_stats_registry.getStats(m_localOwnerId);
+      const auto *stats = m_stats_registry.get_stats(m_localOwnerId);
       if (stats != nullptr) {
         qInfo() << "Final Stats - Troops Recruited:" << stats->troops_recruited
                 << "Enemies Killed:" << stats->enemies_killed
@@ -204,7 +204,7 @@ auto VictoryService::checkElimination(Engine::Core::World &world) -> bool {
 
   int const local_team = m_owner_registry.getOwnerTeam(m_localOwnerId);
 
-  auto entities = world.getEntitiesWith<Engine::Core::UnitComponent>();
+  auto entities = world.get_entities_with<Engine::Core::UnitComponent>();
   for (auto *e : entities) {
     auto *unit = e->get_component<Engine::Core::UnitComponent>();
     if ((unit == nullptr) || unit->health <= 0) {
@@ -237,7 +237,7 @@ auto VictoryService::checkSurviveTime() const -> bool {
 
 auto VictoryService::checkNoUnits(Engine::Core::World &world) const -> bool {
 
-  auto entities = world.getEntitiesWith<Engine::Core::UnitComponent>();
+  auto entities = world.get_entities_with<Engine::Core::UnitComponent>();
   for (auto *e : entities) {
     auto *unit = e->get_component<Engine::Core::UnitComponent>();
     if ((unit == nullptr) || unit->health <= 0) {
@@ -254,7 +254,7 @@ auto VictoryService::checkNoUnits(Engine::Core::World &world) const -> bool {
 
 auto VictoryService::checkNoKeyStructures(Engine::Core::World &world) -> bool {
 
-  auto entities = world.getEntitiesWith<Engine::Core::UnitComponent>();
+  auto entities = world.get_entities_with<Engine::Core::UnitComponent>();
   for (auto *e : entities) {
     auto *unit = e->get_component<Engine::Core::UnitComponent>();
     if ((unit == nullptr) || unit->health <= 0) {

+ 1 - 1
game/units/archer.cpp

@@ -36,7 +36,7 @@ auto Archer::Create(Engine::Core::World &world,
 
 void Archer::init(const SpawnParams &params) {
 
-  auto *e = m_world->createEntity();
+  auto *e = m_world->create_entity();
   m_id = e->get_id();
 
   const auto nation_id = resolve_nation_id(params);

+ 1 - 1
game/units/ballista.cpp

@@ -37,7 +37,7 @@ auto Ballista::Create(Engine::Core::World &world,
 
 void Ballista::init(const SpawnParams &params) {
 
-  auto *e = m_world->createEntity();
+  auto *e = m_world->create_entity();
   m_id = e->get_id();
 
   const auto nation_id = resolve_nation_id(params);

+ 1 - 1
game/units/barracks.cpp

@@ -23,7 +23,7 @@ auto Barracks::Create(Engine::Core::World &world,
 }
 
 void Barracks::init(const SpawnParams &params) {
-  auto *e = m_world->createEntity();
+  auto *e = m_world->create_entity();
   m_id = e->get_id();
 
   const auto nation_id = resolve_nation_id(params);

+ 1 - 1
game/units/catapult.cpp

@@ -37,7 +37,7 @@ auto Catapult::Create(Engine::Core::World &world,
 
 void Catapult::init(const SpawnParams &params) {
 
-  auto *e = m_world->createEntity();
+  auto *e = m_world->create_entity();
   m_id = e->get_id();
 
   const auto nation_id = resolve_nation_id(params);

+ 1 - 1
game/units/healer.cpp

@@ -36,7 +36,7 @@ auto Healer::Create(Engine::Core::World &world,
 
 void Healer::init(const SpawnParams &params) {
 
-  auto *e = m_world->createEntity();
+  auto *e = m_world->create_entity();
   m_id = e->get_id();
 
   const auto nation_id = resolve_nation_id(params);

+ 1 - 1
game/units/horse_archer.cpp

@@ -37,7 +37,7 @@ auto HorseArcher::Create(Engine::Core::World &world, const SpawnParams &params)
 
 void HorseArcher::init(const SpawnParams &params) {
 
-  auto *e = m_world->createEntity();
+  auto *e = m_world->create_entity();
   m_id = e->get_id();
 
   const auto nation_id = resolve_nation_id(params);

+ 1 - 1
game/units/horse_spearman.cpp

@@ -38,7 +38,7 @@ auto HorseSpearman::Create(Engine::Core::World &world,
 
 void HorseSpearman::init(const SpawnParams &params) {
 
-  auto *e = m_world->createEntity();
+  auto *e = m_world->create_entity();
   m_id = e->get_id();
 
   const auto nation_id = resolve_nation_id(params);

+ 1 - 1
game/units/horse_swordsman.cpp

@@ -38,7 +38,7 @@ auto MountedKnight::Create(Engine::Core::World &world,
 
 void MountedKnight::init(const SpawnParams &params) {
 
-  auto *e = m_world->createEntity();
+  auto *e = m_world->create_entity();
   m_id = e->get_id();
 
   const auto nation_id = resolve_nation_id(params);

+ 1 - 1
game/units/spearman.cpp

@@ -37,7 +37,7 @@ auto Spearman::Create(Engine::Core::World &world,
 
 void Spearman::init(const SpawnParams &params) {
 
-  auto *e = m_world->createEntity();
+  auto *e = m_world->create_entity();
   m_id = e->get_id();
 
   const auto nation_id = resolve_nation_id(params);

+ 1 - 1
game/units/swordsman.cpp

@@ -37,7 +37,7 @@ auto Swordsman::Create(Engine::Core::World &world, const SpawnParams &params)
 
 void Swordsman::init(const SpawnParams &params) {
 
-  auto *e = m_world->createEntity();
+  auto *e = m_world->create_entity();
   m_id = e->get_id();
 
   const auto nation_id = resolve_nation_id(params);

+ 1 - 1
game/units/unit.cpp

@@ -18,7 +18,7 @@ Unit::Unit(Engine::Core::World &world, std::string type)
     : m_world(&world), m_type_string(std::move(type)) {}
 
 auto Unit::entity() const -> Engine::Core::Entity * {
-  return (m_world != nullptr) ? m_world->getEntity(m_id) : nullptr;
+  return (m_world != nullptr) ? m_world->get_entity(m_id) : nullptr;
 }
 
 auto Unit::resolve_nation_id(const SpawnParams &params)

+ 1 - 1
render/geom/patrol_flags.cpp

@@ -45,7 +45,7 @@ void renderPatrolFlags(Renderer *renderer, ResourceManager *resources,
     rendered_positions.insert(pos_hash);
   }
 
-  auto patrol_entities = world.getEntitiesWith<Engine::Core::PatrolComponent>();
+  auto patrol_entities = world.get_entities_with<Engine::Core::PatrolComponent>();
 
   for (auto *entity : patrol_entities) {
     auto *patrol = entity->get_component<Engine::Core::PatrolComponent>();

+ 1 - 1
render/gl/humanoid/animation/animation_inputs.cpp

@@ -57,7 +57,7 @@ auto sampleAnimState(const DrawContext &ctx) -> AnimationInputs {
     bool target_in_range = false;
 
     if (ctx.world != nullptr) {
-      auto *target = ctx.world->getEntity(attack_target->target_id);
+      auto *target = ctx.world->get_entity(attack_target->target_id);
       if (target != nullptr) {
         auto *target_transform =
             target->get_component<Engine::Core::TransformComponent>();

+ 2 - 2
render/scene_renderer.cpp

@@ -379,13 +379,13 @@ void Renderer::renderWorld(Engine::Core::World *world) {
     return;
   }
 
-  std::lock_guard<std::recursive_mutex> const guard(world->getEntityMutex());
+  std::lock_guard<std::recursive_mutex> const guard(world->get_entity_mutex());
 
   auto &vis = Game::Map::VisibilityService::instance();
   const bool visibility_enabled = vis.isInitialized();
 
   auto renderable_entities =
-      world->getEntitiesWith<Engine::Core::RenderableComponent>();
+      world->get_entities_with<Engine::Core::RenderableComponent>();
 
   const auto &gfxSettings = Render::GraphicsSettings::instance();
   const auto &batch_config = gfxSettings.batching_config();