#pragma once #include #include #include #include "entt/entity/entity.hpp" class EntityAdmin; entt::entity entityAtWorldPos(EntityAdmin& admin, QVector2D worldPos); // Returns the nearest scrap pile whose center is within the scrap pick radius of // worldPos, or entt::null if none (REQ-UI-SCRAP-CLICK-SELECT). Scrap is picked only // after actors: entityAtWorldPos never returns scrap (scrap has no HealthComponent). entt::entity scrapAtWorldPos(EntityAdmin& admin, QVector2D worldPos); // Returns every scrap pile whose position falls within the inclusive tile rectangle // spanned by tileA and tileB, in any corner order (REQ-UI-SCRAP-MULTI-SELECT). std::vector scrapInBox(EntityAdmin& admin, QPoint tileA, QPoint tileB); // Returns every living actor (ship or defence station, player or enemy) that falls // within the inclusive tile rectangle spanned by tileA and tileB, in any corner order // (REQ-UI-MULTI-SELECT, REQ-UI-ENTITY-CLICK-SELECT). A ship is included when its floored // position tile lies in the box; a station is included when any of its body cells does. // Dead actors (hp <= 0) and the HQ proxy are excluded. std::vector actorsInBox(EntityAdmin& admin, QPoint tileA, QPoint tileB);