summaryrefslogtreecommitdiffstats
path: root/src/Generating/Prefab.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Generating/Prefab.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Generating/Prefab.h b/src/Generating/Prefab.h
index 6596b906b..3733166ab 100644
--- a/src/Generating/Prefab.h
+++ b/src/Generating/Prefab.h
@@ -33,13 +33,18 @@ public:
int m_SizeZ;
const char * m_CharMap;
const char * m_Image;
- // TODO: Connectors
+ const char * m_Connectors;
+ int m_AllowedRotations;
+ cBlockArea::eMergeStrategy m_MergeStrategy;
};
cPrefab(const sDef & a_Def);
/** Draws the prefab into the specified block area, according to the placement stored in the PlacedPiece. */
void Draw(cBlockArea & a_Dest, const cPlacedPiece * a_Placement);
+
+ /** Returns true if the prefab has any connector of the specified type. */
+ bool HasConnectorType(int a_ConnectorType) const;
protected:
/** Maps letters in the sDef::m_Image onto a number, BlockType * 16 | BlockMeta */
@@ -76,6 +81,9 @@ protected:
/** Parses the Image in the definition into m_BlockArea's block types and metas, using the specified CharMap. */
void ParseBlockImage(const CharMap & a_CharMap, const char * a_BlockImage);
+
+ /** Parses the connectors definition text into m_Connectors member. */
+ void ParseConnectors(const char * a_ConnectorsDef);
};