implement blueprints
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <QTimer>
|
||||
#include <QVector2D>
|
||||
|
||||
#include "Blueprint.h"
|
||||
#include "SchematicDropEvent.h"
|
||||
#include "BuildingType.h"
|
||||
#include "EntityId.h"
|
||||
@@ -46,6 +47,7 @@ signals:
|
||||
void stateUpdated(Tick tick, int blocks, double speed);
|
||||
void gameOver();
|
||||
void builderModeExited();
|
||||
void blueprintModeExited();
|
||||
void escapeMenuRequested();
|
||||
void demolishModeChanged(bool active);
|
||||
|
||||
@@ -55,6 +57,8 @@ public:
|
||||
public slots:
|
||||
void enterBuilderMode(BuildingType type);
|
||||
void exitBuilderMode();
|
||||
void enterBlueprintMode(Blueprint blueprint);
|
||||
void exitBlueprintMode();
|
||||
void toggleDemolishMode();
|
||||
void setGameSpeed(double multiplier);
|
||||
void resetForNewGame();
|
||||
@@ -101,6 +105,8 @@ private:
|
||||
void drawPortGlyph(QPainter& painter, QPoint bodyTile,
|
||||
Rotation direction, const QColor& color);
|
||||
|
||||
void placeBlueprintAtTile(QPoint center);
|
||||
|
||||
std::optional<QVector2D> entityPosition(EntityId id) const;
|
||||
void stepSpeed(int delta);
|
||||
void placeAtTile(QPoint tile);
|
||||
@@ -145,6 +151,9 @@ private:
|
||||
std::set<QPoint, QPointCompare> m_beltDragTiles;
|
||||
bool m_dragging;
|
||||
|
||||
std::optional<Blueprint> m_blueprintMode;
|
||||
QPoint m_blueprintGhostTile;
|
||||
|
||||
bool m_demolishMode;
|
||||
EntityId m_demolishHoverId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user