implement ship behaviors
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <QPoint>
|
||||
#include <QVector2D>
|
||||
|
||||
#include "BeltSystem.h"
|
||||
#include "Building.h"
|
||||
@@ -60,6 +61,16 @@ public:
|
||||
std::vector<ConstructionSite> allSites() const;
|
||||
bool isTileOccupied(QPoint tile) const;
|
||||
|
||||
// Find nearest operational building of the given type; nullptr if none.
|
||||
const Building* findNearestBuilding(QVector2D worldPos, BuildingType type) const;
|
||||
|
||||
// Place one "scrap" item into a SalvageBay's output buffer.
|
||||
// Returns false if bay not found, wrong type, or output buffer is full.
|
||||
bool deliverScrapToSalvageBay(EntityId bayId);
|
||||
|
||||
// Increase a building's HP by amount, clamped to maxHp.
|
||||
void healBuilding(EntityId id, float amount);
|
||||
|
||||
private:
|
||||
struct BeltEntry
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user