diff options
author | Mattes D <github@xoft.cz> | 2017-02-13 18:08:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-13 18:08:27 +0100 |
commit | 7b8380c6df0d532419bee86009fbd3d77b0a818f (patch) | |
tree | de5267740459c2b9b6b6a1296e9d43eb7ac8ec28 /src/Generating/PrefabPiecePool.cpp | |
parent | Made survival the default gamemode (#3563) (diff) | |
parent | PieceGenerator: Added rotation-aware vertical connectors. (diff) | |
download | cuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.tar cuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.tar.gz cuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.tar.bz2 cuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.tar.lz cuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.tar.xz cuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.tar.zst cuberite-7b8380c6df0d532419bee86009fbd3d77b0a818f.zip |
Diffstat (limited to 'src/Generating/PrefabPiecePool.cpp')
-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); |