stad
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "city.h"
|
||||
#include "matrix2d.h"
|
||||
#include "terrain.h"
|
||||
#include "terrainyieldmanager.h"
|
||||
|
||||
enum class ActionMode {
|
||||
None,
|
||||
@@ -38,6 +39,7 @@ public:
|
||||
|
||||
const std::vector<std::shared_ptr<Unit>>& getUnits() const { return m_units; }
|
||||
const std::vector<City>& getCities() const { return m_cities; }
|
||||
std::vector<City>& getCitiesMutable() { return m_cities; }
|
||||
const std::vector<FloatingText>& getFloatingTexts() const { return m_floatingTexts; }
|
||||
|
||||
Unit* getSelectedUnit();
|
||||
@@ -51,6 +53,19 @@ public:
|
||||
Unit* getUnitAt(int tx, int ty);
|
||||
Unit* getUnitById(int id);
|
||||
|
||||
City* getCityAt(int tx, int ty);
|
||||
City* getCityById(int id);
|
||||
|
||||
// City View System
|
||||
bool isInCityView() const { return m_activeCityViewId != -1; }
|
||||
int getActiveCityViewId() const { return m_activeCityViewId; }
|
||||
City* getActiveCityView();
|
||||
const City* getActiveCityView() const;
|
||||
void enterCityView(int cityId);
|
||||
void exitCityView();
|
||||
|
||||
CityYieldSummary calculateCityYields(const City &city, Matrix2D<TerrainPoint> *mapPoints, int numPoints05) const;
|
||||
|
||||
void commandMoveSelected(int targetX, int targetY, Matrix2D<TerrainPoint> *mapPoints, int numPoints05);
|
||||
void commandAttack(Unit *target);
|
||||
void commandBuildCitySelected(Matrix2D<TerrainPoint> *mapPoints, int numPoints05);
|
||||
@@ -81,6 +96,7 @@ private:
|
||||
std::vector<FloatingText> m_floatingTexts;
|
||||
|
||||
int m_selectedUnitId;
|
||||
int m_activeCityViewId;
|
||||
ActionMode m_actionMode;
|
||||
|
||||
float m_movementTickDuration; // Default 30.0s
|
||||
|
||||
Reference in New Issue
Block a user