diff options
author | Mattes D <github@xoft.cz> | 2017-02-13 16:50:35 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-02-13 16:50:35 +0100 |
commit | 585571d78ca9ff5e384cae8d006a391df0f17ff7 (patch) | |
tree | de5267740459c2b9b6b6a1296e9d43eb7ac8ec28 /src/Generating/PrefabPiecePool.cpp | |
parent | Made survival the default gamemode (#3563) (diff) | |
download | cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.tar cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.tar.gz cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.tar.bz2 cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.tar.lz cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.tar.xz cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.tar.zst cuberite-585571d78ca9ff5e384cae8d006a391df0f17ff7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/PrefabPiecePool.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Generating/PrefabPiecePool.cpp b/src/Generating/PrefabPiecePool.cpp index 407915e56..9c4e24e92 100644 --- a/src/Generating/PrefabPiecePool.cpp +++ b/src/Generating/PrefabPiecePool.cpp @@ -487,17 +487,23 @@ bool cPrefabPiecePool::ReadConnectorsCubesetVer1( break; } int Type = 0, RelX = 0, RelY = 0, RelZ = 0; - eBlockFace Direction = BLOCK_FACE_NONE; + AString DirectionStr; + cPiece::cConnector::eDirection Direction = cPiece::cConnector::dirYM; if ( !a_LuaState.GetNamedValue("Type", Type) || !a_LuaState.GetNamedValue("RelX", RelX) || !a_LuaState.GetNamedValue("RelY", RelY) || !a_LuaState.GetNamedValue("RelZ", RelZ) || - !a_LuaState.GetNamedValue("Direction", Direction) + !a_LuaState.GetNamedValue("Direction", DirectionStr) || + !cPiece::cConnector::StringToDirection(DirectionStr, Direction) ) { - CONDWARNING(a_LogWarnings, "Piece %s in file %s has a malformed Connector at index %d. Skipping the connector.", a_PieceName.c_str(), a_FileName.c_str(), idx); + CONDWARNING(a_LogWarnings, "Piece %s in file %s has a malformed Connector at index %d ({%d, %d, %d}, type %d, direction %s). Skipping the connector.", + a_PieceName.c_str(), a_FileName.c_str(), idx, RelX, RelY, RelZ, Type, DirectionStr.c_str() + ); res = false; + lua_pop(a_LuaState, 1); // stk: [Connectors] + idx += 1; continue; } a_Prefab->AddConnector(RelX, RelY, RelZ, Direction, Type); |