diff options
author | Niels Breuker <niels.breuker@hotmail.nl> | 2023-03-31 14:27:14 +0200 |
---|---|---|
committer | Niels Breuker <niels.breuker@hotmail.nl> | 2023-03-31 14:27:14 +0200 |
commit | c3dfa60882d94bbf5893b5c4e91384ff57a21e8b (patch) | |
tree | 7e9a217cac3425f29f8b2bc4dc664dda8b2bdd73 /src/Generating/PrefabPiecePool.cpp | |
parent | PieceGenerator: Added functionality to end a structure with a custom prefab. (diff) | |
download | cuberite-c3dfa60882d94bbf5893b5c4e91384ff57a21e8b.tar cuberite-c3dfa60882d94bbf5893b5c4e91384ff57a21e8b.tar.gz cuberite-c3dfa60882d94bbf5893b5c4e91384ff57a21e8b.tar.bz2 cuberite-c3dfa60882d94bbf5893b5c4e91384ff57a21e8b.tar.lz cuberite-c3dfa60882d94bbf5893b5c4e91384ff57a21e8b.tar.xz cuberite-c3dfa60882d94bbf5893b5c4e91384ff57a21e8b.tar.zst cuberite-c3dfa60882d94bbf5893b5c4e91384ff57a21e8b.zip |
Diffstat (limited to 'src/Generating/PrefabPiecePool.cpp')
-rw-r--r-- | src/Generating/PrefabPiecePool.cpp | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/Generating/PrefabPiecePool.cpp b/src/Generating/PrefabPiecePool.cpp index b78251d78..1fbdac8af 100644 --- a/src/Generating/PrefabPiecePool.cpp +++ b/src/Generating/PrefabPiecePool.cpp @@ -350,18 +350,8 @@ bool cPrefabPiecePool::LoadCubesetPieceVer1(const AString & a_FileName, cLuaStat else { auto p = prefab.release(); - - int IsClosurePiece = 0; - a_LuaState.GetNamedValue("Metadata.IsClosurePiece", IsClosurePiece); - if (IsClosurePiece != 0) - { - m_ClosurePieces.push_back(p); - } - else - { - m_AllPieces.push_back(p); - AddToPerConnectorMap(p); - } + m_AllPieces.push_back(p); + AddToPerConnectorMap(p); } return true; @@ -773,28 +763,6 @@ cPieces cPrefabPiecePool::GetPiecesWithConnector(int a_ConnectorType) -cPieces cPrefabPiecePool::GetClosurePiecesWithConnector(int a_ConnectorType) -{ - cPieces pieces; - for (auto& piece : m_ClosurePieces) - { - auto connectors = piece->GetConnectors(); - for (auto& connector : connectors) - { - if (connector.m_Type == a_ConnectorType) - { - pieces.push_back(piece); - break; - } - } - } - return pieces; -} - - - - - cPieces cPrefabPiecePool::GetStartingPieces(void) { if (m_StartingPieces.empty()) |