summaryrefslogtreecommitdiffstats
path: root/src/Generating/PrefabPiecePool.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-06-14 12:06:48 +0200
committermadmaxoft <github@xoft.cz>2014-06-14 12:06:48 +0200
commitf8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b (patch)
treed2f3e35f37821e93d92143db2055bcedeaf57142 /src/Generating/PrefabPiecePool.h
parentPlayer.h: Moved doxy-comments to Entity.h (diff)
parentFixed a repeater issue (diff)
downloadcuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.tar
cuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.tar.gz
cuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.tar.bz2
cuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.tar.lz
cuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.tar.xz
cuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.tar.zst
cuberite-f8f7748a09b936cc888c0c4a1f0ae9e9e444ba5b.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/PrefabPiecePool.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Generating/PrefabPiecePool.h b/src/Generating/PrefabPiecePool.h
index c6a5ad360..b9c1f0483 100644
--- a/src/Generating/PrefabPiecePool.h
+++ b/src/Generating/PrefabPiecePool.h
@@ -34,6 +34,12 @@ public:
const cPrefab::sDef * a_StartingPieceDefs, size_t a_NumStartingPieceDefs
);
+ /** Destroys the pool, freeing all pieces. */
+ ~cPrefabPiecePool();
+
+ /** Removes and frees all pieces from this pool. */
+ void Clear(void);
+
/** Adds pieces from the specified definitions into m_AllPieces. Also adds the pieces into
the m_PiecesByConnector map.
May be called multiple times with different PieceDefs, will add all such pieces. */
@@ -44,7 +50,6 @@ public:
May be called multiple times with different PieceDefs, will add all such pieces. */
void AddStartingPieceDefs(const cPrefab::sDef * a_StartingPieceDefs, size_t a_NumStartingPieceDefs);
-
protected:
/** The type used to map a connector type to the list of pieces with that connector */
@@ -70,6 +75,7 @@ protected:
virtual cPieces GetPiecesWithConnector(int a_ConnectorType) override;
virtual cPieces GetStartingPieces(void) override;
virtual int GetPieceWeight(const cPlacedPiece & a_PlacedPiece, const cPiece::cConnector & a_ExistingConnector, const cPiece & a_NewPiece) override;
+ virtual int GetStartingPieceWeight(const cPiece & a_NewPiece) override;
virtual void PiecePlaced(const cPiece & a_Piece) override;
virtual void Reset(void) override;
} ;