1
0
Fork 0

Added support for Miners' Village.

The village contains both prefabs that snap to ground and prefabs that connect strictly via connectors.
Fixes #1027.
This commit is contained in:
madmaxoft 2014-05-25 23:50:16 +02:00
parent 96a22cd82c
commit 1a742a2b52
10 changed files with 4482 additions and 2278 deletions

View File

@ -286,7 +286,8 @@ cPlacedPiece::cPlacedPiece(const cPlacedPiece * a_Parent, const cPiece & a_Piece
m_Parent(a_Parent),
m_Piece(&a_Piece),
m_Coords(a_Coords),
m_NumCCWRotations(a_NumCCWRotations)
m_NumCCWRotations(a_NumCCWRotations),
m_HasBeenMovedToGround(false)
{
m_Depth = (m_Parent == NULL) ? 0 : (m_Parent->GetDepth() + 1);
m_HitBox = a_Piece.RotateMoveHitBox(a_NumCCWRotations, a_Coords.x, a_Coords.y, a_Coords.z);
@ -317,6 +318,16 @@ cPiece::cConnector cPlacedPiece::GetRotatedConnector(const cPiece::cConnector &
void cPlacedPiece::MoveToGroundBy(int a_OffsetY)
{
m_Coords.y += a_OffsetY;
m_HasBeenMovedToGround = true;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cPieceGenerator:

View File

@ -139,11 +139,13 @@ class cPlacedPiece
public:
cPlacedPiece(const cPlacedPiece * a_Parent, const cPiece & a_Piece, const Vector3i & a_Coords, int a_NumCCWRotations);
const cPiece & GetPiece (void) const { return *m_Piece; }
const Vector3i & GetCoords (void) const { return m_Coords; }
int GetNumCCWRotations(void) const { return m_NumCCWRotations; }
const cCuboid & GetHitBox (void) const { return m_HitBox; }
int GetDepth (void) const { return m_Depth; }
const cPlacedPiece * GetParent (void) const { return m_Parent; }
const cPiece & GetPiece (void) const { return *m_Piece; }
const Vector3i & GetCoords (void) const { return m_Coords; }
int GetNumCCWRotations (void) const { return m_NumCCWRotations; }
const cCuboid & GetHitBox (void) const { return m_HitBox; }
int GetDepth (void) const { return m_Depth; }
bool HasBeenMovedToGround(void) const { return m_HasBeenMovedToGround; }
/** Returns the coords as a modifiable object. */
Vector3i & GetCoords(void) { return m_Coords; }
@ -156,6 +158,11 @@ public:
this placement. */
cPiece::cConnector GetRotatedConnector(const cPiece::cConnector & a_Connector) const;
/** Moves the placed piece Y-wise by the specified offset.
Sets m_HasBeenMovedToGround to true, too.
Used eg. by village houses. */
void MoveToGroundBy(int a_OffsetY);
protected:
const cPlacedPiece * m_Parent;
const cPiece * m_Piece;
@ -163,6 +170,10 @@ protected:
int m_NumCCWRotations;
cCuboid m_HitBox; // Hitbox of the placed piece, in world coords
int m_Depth; // Depth in the generated piece tree
/** Set to true once the piece has been moved Y-wise.
Used eg. by village houses. */
bool m_HasBeenMovedToGround;
};
typedef std::vector<cPlacedPiece *> cPlacedPieces;

View File

@ -127,7 +127,8 @@ cPrefab::cPrefab(const cPrefab::sDef & a_Def) :
m_MergeStrategy(a_Def.m_MergeStrategy),
m_ShouldExtendFloor(a_Def.m_ShouldExtendFloor),
m_DefaultWeight(a_Def.m_DefaultWeight),
m_AddWeightIfSame(a_Def.m_AddWeightIfSame)
m_AddWeightIfSame(a_Def.m_AddWeightIfSame),
m_MoveToGround(a_Def.m_MoveToGround)
{
m_BlockArea[0].Create(m_Size);
CharMap cm;
@ -149,7 +150,8 @@ cPrefab::cPrefab(const cBlockArea & a_Image, int a_AllowedRotations) :
m_MergeStrategy(cBlockArea::msOverwrite),
m_ShouldExtendFloor(false),
m_DefaultWeight(1),
m_AddWeightIfSame(0)
m_AddWeightIfSame(0),
m_MoveToGround(false)
{
m_HitBox.p1.Set(0, 0, 0);
m_HitBox.p2.Set(m_Size.x - 1, m_Size.y - 1, m_Size.z - 1);

View File

@ -82,6 +82,10 @@ public:
Can be positive or negative.
This is used e. g. to make nether bridges prefer spanning multiple segments or to penalize turrets next to each other. */
int m_AddWeightIfSame;
/** If true, the piece will be moved Y-wise so that its first connector is sitting on the terrain.
This is used e. g. for village houses. */
bool m_MoveToGround;
};
@ -115,6 +119,10 @@ public:
/** Adds the specified connector to the list of connectors this piece supports. */
void AddConnector(int a_RelX, int a_RelY, int a_RelZ, eBlockFace a_Direction, int a_Type);
/** Returns whether the prefab should be moved Y-wise to ground before drawing, rather than staying
at the coords governed by the connectors. */
bool ShouldMoveToGround(void) const { return m_MoveToGround; }
protected:
/** Packs complete definition of a single block, for per-letter assignment. */
@ -169,6 +177,10 @@ protected:
Can be positive or negative.
This is used e. g. to make nether bridges prefer spanning multiple segments or to penalize turrets next to each other. */
int m_AddWeightIfSame;
/** If true, the piece will be moved Y-wise so that its first connector is sitting on the terrain.
This is used e. g. for village houses. */
bool m_MoveToGround;
// cPiece overrides:

View File

@ -122,6 +122,9 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // Arch
@ -385,10 +388,165 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // Forge
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Garden2:
// The data has been exported from the gallery Plains, area index 147, ID 491, created by Aloe_vera
{
// Size:
16, 5, 16, // SizeX = 16, SizeY = 5, SizeZ = 16
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
15, 4, 15, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a: 3: 0\n" /* dirt */
"b: 8: 0\n" /* water */
"c: 2: 0\n" /* grass */
"d: 17: 1\n" /* tree */
"e: 13: 0\n" /* gravel */
"f: 31: 2\n" /* tallgrass */
"g: 18: 5\n" /* leaves */
"h: 38: 7\n" /* rose */
"i: 17: 9\n" /* tree */
"m: 19: 0\n" /* sponge */,
// Block data:
// Level 0
/* z\x* 111111 */
/* * 0123456789012345 */
/* 0 */ "aaaaaaaaaaaaaaaa"
/* 1 */ "aaaaaaaaaaaaaaaa"
/* 2 */ "aaaaaaaaaaaaaaaa"
/* 3 */ "aaaaaaaaaaaaaaaa"
/* 4 */ "aaaaaaaaaaaaaaaa"
/* 5 */ "aaaaaaaaaaaaaaaa"
/* 6 */ "aaaaaaaaaaaaaaaa"
/* 7 */ "aaaaaaaaaaaaaaaa"
/* 8 */ "aaaaaaaaaaaaaaaa"
/* 9 */ "aaaaaaaaaaaaaaaa"
/* 10 */ "aaaaaaaaaaaaaaaa"
/* 11 */ "aaaaaaaaaaaaaaaa"
/* 12 */ "aaaaaaaaaaaaaaaa"
/* 13 */ "aaaaaaaaaaaaaaaa"
/* 14 */ "aaaaaaaaaaaaaaaa"
/* 15 */ "aaaaaaaaaaaaaaaa"
// Level 1
/* z\x* 111111 */
/* * 0123456789012345 */
/* 0 */ "aaaaaaaaaaaaaaaa"
/* 1 */ "aaaaaaaaaaaaaaaa"
/* 2 */ "aaaaaaaaaaaaaaaa"
/* 3 */ "aaaaaaaaaaaaaaaa"
/* 4 */ "aaaaaaaaaaaaaaaa"
/* 5 */ "aaaaaaaaaaaaaaaa"
/* 6 */ "aaaabbaaaaaaaaaa"
/* 7 */ "aaabbbaaaaaaaaaa"
/* 8 */ "aaabbaaaaaaaaaaa"
/* 9 */ "aaaabaaaaaaaaaaa"
/* 10 */ "aaaaaaaaaaaaaaaa"
/* 11 */ "aaaaaaaaaaaaaaaa"
/* 12 */ "aaaaaaaaaaaaaaaa"
/* 13 */ "aaaaaaaaaaaaaaaa"
/* 14 */ "aaaaaaaaaaaaaaaa"
/* 15 */ "aaaaaaaaaaaaaaaa"
// Level 2
/* z\x* 111111 */
/* * 0123456789012345 */
/* 0 */ "cccccccccccccccc"
/* 1 */ "ccdccccccccdcccc"
/* 2 */ "cccccceecccccdcc"
/* 3 */ "ccccccceeccccccc"
/* 4 */ "cccccccceccccccc"
/* 5 */ "cccbbbbceccccccc"
/* 6 */ "cccbbbbceecccccc"
/* 7 */ "ccbbbbbcceeeeccc"
/* 8 */ "ccbbbbbccccceecc"
/* 9 */ "ccbbbbcccccccecc"
/* 10 */ "ccccbcccccccceec"
/* 11 */ "ccccccccccccccec"
/* 12 */ "ccccccccaaacccec"
/* 13 */ "cccccccccaccccec"
/* 14 */ "ccccccccccccceec"
/* 15 */ "cccccccccccceecc"
// Level 3
/* z\x* 111111 */
/* * 0123456789012345 */
/* 0 */ "......f...gg.g.."
/* 1 */ "..gg.....gggggg."
/* 2 */ "ffgg......ghgggg"
/* 3 */ ".............gg."
/* 4 */ "...........f...."
/* 5 */ "...........h.ff."
/* 6 */ ".............fh."
/* 7 */ "...............f"
/* 8 */ "................"
/* 9 */ ".......ff.f....."
/* 10 */ ".f.....ffggf...."
/* 11 */ ".......gggg.f..."
/* 12 */ ".f......iddg...."
/* 13 */ ".....f..gdgg...."
/* 14 */ "....ff...gg....."
/* 15 */ "................"
// Level 4
/* z\x* 111111 */
/* * 0123456789012345 */
/* 0 */ "................"
/* 1 */ "...........g.g.."
/* 2 */ ".............gg."
/* 3 */ "................"
/* 4 */ "................"
/* 5 */ "................"
/* 6 */ "................"
/* 7 */ "................"
/* 8 */ "................"
/* 9 */ "................"
/* 10 */ ".........g......"
/* 11 */ "........ggg....."
/* 12 */ "........ggg....."
/* 13 */ ".........g......"
/* 14 */ "................"
/* 15 */ "................",
// Connectors:
"-1: 12, 3, 15: 3\n" /* Type -1, direction Z+ */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
true,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // Garden2
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// HouseMid:
// The data has been exported from the gallery Plains, area index 62, ID 119, created by Aloe_vera
@ -558,6 +716,9 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // HouseMid
@ -666,10 +827,137 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // HouseSmall
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// HouseSmallDblWithDoor:
// The data has been exported from the gallery Plains, area index 113, ID 265, created by Aloe_vera
{
// Size:
11, 6, 7, // SizeX = 11, SizeY = 6, SizeZ = 7
// Hitbox (relative to bounding box):
-1, 0, 0, // MinX, MinY, MinZ
11, 5, 7, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a: 5: 2\n" /* wood */
"b: 17: 9\n" /* tree */
"c: 17: 1\n" /* tree */
"d: 35: 0\n" /* wool */
"e: 64: 7\n" /* wooddoorblock */
"f:171:12\n" /* carpet */
"g:135: 1\n" /* 135 */
"h:126: 2\n" /* woodenslab */
"i:135: 2\n" /* 135 */
"j: 50: 4\n" /* torch */
"k: 64:12\n" /* wooddoorblock */
"l: 85: 0\n" /* fence */
"m: 19: 0\n" /* sponge */
"n: 44: 8\n" /* step */
"o: 43: 0\n" /* doubleslab */
"p: 44: 0\n" /* step */,
// Block data:
// Level 0
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ "mmmmmmmmmmm"
/* 1 */ "maaaaaaaaam"
/* 2 */ "maaaabaaaam"
/* 3 */ "maaaabaaaam"
/* 4 */ "maaaabaaaam"
/* 5 */ "maaaaaaaaam"
/* 6 */ "mmmmmmmmmmm"
// Level 1
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ "..........."
/* 1 */ ".cdedcdddc."
/* 2 */ ".dfff.fffd."
/* 3 */ ".dgffdfhfd."
/* 4 */ ".diifdfffd."
/* 5 */ ".cdddcdddc."
/* 6 */ "..........."
// Level 2
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ ".j...j...j."
/* 1 */ ".cdkdclllc."
/* 2 */ ".d.......l."
/* 3 */ ".l...l...l."
/* 4 */ ".d...l...l."
/* 5 */ ".clllclllc."
/* 6 */ "..........."
// Level 3
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ ".nnnnnnnnn."
/* 1 */ "ncdddcdddcn"
/* 2 */ "nd...d...dn"
/* 3 */ "nd...d...dn"
/* 4 */ "nd...d...dn"
/* 5 */ "ncdddcdddcn"
/* 6 */ ".nnnnnnnnn."
// Level 4
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ "op.......po"
/* 1 */ "ppppppppppp"
/* 2 */ ".pooooooop."
/* 3 */ ".ponndnnop."
/* 4 */ ".pooooooop."
/* 5 */ "ppppppppppp"
/* 6 */ "op.......po"
// Level 5
/* z\x* 1 */
/* * 01234567890 */
/* 0 */ "..........."
/* 1 */ "..........."
/* 2 */ "..........."
/* 3 */ "...ppppp..."
/* 4 */ "..........."
/* 5 */ "..........."
/* 6 */ "...........",
// Connectors:
"-1: 3, 1, -1: 2\n" /* Type -1, direction Z- */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
true,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // HouseSmallDblWithDoor
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// HouseSmallDouble:
// The data has been exported from the gallery Plains, area index 72, ID 135, created by Aloe_vera
@ -784,10 +1072,126 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // HouseSmallDouble
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// HouseSmallWithDoor:
// The data has been exported from the gallery Plains, area index 112, ID 264, created by Aloe_vera
{
// Size:
7, 6, 7, // SizeX = 7, SizeY = 6, SizeZ = 7
// Hitbox (relative to bounding box):
-1, 0, 0, // MinX, MinY, MinZ
7, 5, 7, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a: 5: 2\n" /* wood */
"b: 17: 1\n" /* tree */
"c: 35: 0\n" /* wool */
"d: 64: 7\n" /* wooddoorblock */
"e: 50: 4\n" /* torch */
"f: 64:12\n" /* wooddoorblock */
"g: 85: 0\n" /* fence */
"h: 44: 8\n" /* step */
"i: 43: 0\n" /* doubleslab */
"j: 44: 0\n" /* step */
"m: 19: 0\n" /* sponge */,
// Block data:
// Level 0
/* z\x* 0123456 */
/* 0 */ "mmmmmmm"
/* 1 */ "maaaaam"
/* 2 */ "maaaaam"
/* 3 */ "maaaaam"
/* 4 */ "maaaaam"
/* 5 */ "maaaaam"
/* 6 */ "mmmmmmm"
// Level 1
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ ".bcdcb."
/* 2 */ ".c...c."
/* 3 */ ".c...c."
/* 4 */ ".c...c."
/* 5 */ ".bcccb."
/* 6 */ "......."
// Level 2
/* z\x* 0123456 */
/* 0 */ ".....e."
/* 1 */ ".bcfcb."
/* 2 */ ".g...g."
/* 3 */ ".g...g."
/* 4 */ ".g...g."
/* 5 */ ".bgggb."
/* 6 */ "......."
// Level 3
/* z\x* 0123456 */
/* 0 */ ".hhhhh."
/* 1 */ "hbcccbh"
/* 2 */ "hc...ch"
/* 3 */ "hc...ch"
/* 4 */ "hc...ch"
/* 5 */ "hbcccbh"
/* 6 */ ".hhhhh."
// Level 4
/* z\x* 0123456 */
/* 0 */ "ij...ji"
/* 1 */ "jjjjjjj"
/* 2 */ ".jiiij."
/* 3 */ ".jiiij."
/* 4 */ ".jiiij."
/* 5 */ "jjjjjjj"
/* 6 */ "ij...ji"
// Level 5
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "......."
/* 2 */ "......."
/* 3 */ "...j..."
/* 4 */ "......."
/* 5 */ "......."
/* 6 */ ".......",
// Connectors:
"-1: 3, 1, 0: 2\n" /* Type -1, direction Z- */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
true,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // HouseSmallWithDoor
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// HouseWide:
// The data has been exported from the gallery Plains, area index 64, ID 121, created by STR_Warrior
@ -929,6 +1333,9 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // HouseWide
@ -1172,6 +1579,9 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // HouseWithGarden
@ -1363,10 +1773,375 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // HouseWithSakura1
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// HouseWithSpa:
// The data has been exported from the gallery Plains, area index 73, ID 139, created by Aloe_vera
{
// Size:
16, 8, 14, // SizeX = 16, SizeY = 8, SizeZ = 14
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
15, 7, 13, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a: 5: 2\n" /* wood */
"b: 3: 0\n" /* dirt */
"c: 2: 0\n" /* grass */
"d: 8: 0\n" /* water */
"e:135: 3\n" /* 135 */
"f:135: 1\n" /* 135 */
"g:113: 0\n" /* netherbrickfence */
"h: 17: 1\n" /* tree */
"i: 35: 0\n" /* wool */
"j:171:12\n" /* carpet */
"k: 64: 6\n" /* wooddoorblock */
"l:126: 2\n" /* woodenslab */
"m: 19: 0\n" /* sponge */
"n:135: 2\n" /* 135 */
"o: 64: 7\n" /* wooddoorblock */
"p: 50: 4\n" /* torch */
"q: 85: 0\n" /* fence */
"r: 64:12\n" /* wooddoorblock */
"s: 50: 3\n" /* torch */
"t: 44: 8\n" /* step */
"u: 43: 0\n" /* doubleslab */
"v: 44: 0\n" /* step */,
// Block data:
// Level 0
/* z\x* 111111 */
/* * 0123456789012345 */
/* 0 */ "................"
/* 1 */ ".aaaaaaaaaaaaaa."
/* 2 */ ".aaaaaaaaaaaaaa."
/* 3 */ ".aaaaaaaaaaaaaa."
/* 4 */ ".aaaaaaaaaaaaaa."
/* 5 */ ".aaaaaaaaaaaaaa."
/* 6 */ ".aaaaaaaaaaaaaa."
/* 7 */ ".aaaaaabbbbbbbbb"
/* 8 */ ".aaaaaabbbbbbbbb"
/* 9 */ ".aaaaaabbbbbbbbb"
/* 10 */ ".aaaaaabbbbbbbbb"
/* 11 */ ".aaaaaabbbbbbbbb"
/* 12 */ ".aaaaaabbbbbbbbb"
/* 13 */ ".......bbbbbbbbb"
// Level 1
/* z\x* 111111 */
/* * 0123456789012345 */
/* 0 */ "mmmmmmmmmmmmmmmm"
/* 1 */ "maaaaaaaaaaaaaam"
/* 2 */ "maaaaaaaaaaaaaam"
/* 3 */ "maaaaaaaaaaaaaam"
/* 4 */ "maaaaaaaaaaaaaam"
/* 5 */ "maaaaaaaaaaaaaam"
/* 6 */ "maaaaaaaaaaaaaam"
/* 7 */ "maaaaaaaaaaccccc"
/* 8 */ "maaaaaaacccccccc"
/* 9 */ "maaaaaaacccccccc"
/* 10 */ "maaaaaaacccccccc"
/* 11 */ "maaaaaaccccccccc"
/* 12 */ "maaaaaaccccccccc"
/* 13 */ "mmmmmmmccccccccc"
// Level 2
/* z\x* 111111 */
/* * 0123456789012345 */
/* 0 */ "................"
/* 1 */ ".aaaaaaaaaaaaaa."
/* 2 */ ".aaaaaaaaaaaaaa."
/* 3 */ ".aaaaaaaaaaaaaa."
/* 4 */ ".aaaaaaaaaaaaaa."
/* 5 */ ".aaaaaaaaaaaaaa."
/* 6 */ ".aaddaaaaaaaaaa."
/* 7 */ ".aaddaaeeef....."
/* 8 */ ".aaddaaf........"
/* 9 */ ".aaddaaf........"
/* 10 */ ".aaddaae........"
/* 11 */ ".aaddaa........."
/* 12 */ ".aaaaaa........."
/* 13 */ "................"
// Level 3
/* z\x* 111111 */
/* * 0123456789012345 */
/* 0 */ "................"
/* 1 */ ".ggggghiiihiiih."
/* 2 */ ".geee.ijjjjjjji."
/* 3 */ ".gf...kjjjijlji."
/* 4 */ ".gf...innjijjji."
/* 5 */ ".g....hiiohiiih."
/* 6 */ ".g....g........."
/* 7 */ ".g.............."
/* 8 */ ".g.............."
/* 9 */ ".g.............."
/* 10 */ ".g....g........."
/* 11 */ ".g....g........."
/* 12 */ ".gggggg........."
/* 13 */ "................"
// Level 4
/* z\x* 111111 */
/* * 0123456789012345 */
/* 0 */ "......p...p...p."
/* 1 */ ".g....hqqqhqqqh."
/* 2 */ "......i.......i."
/* 3 */ "......r...q...q."
/* 4 */ "......i...q...i."
/* 5 */ "......hqqrhqqqh."
/* 6 */ "......g...s....."
/* 7 */ "................"
/* 8 */ "................"
/* 9 */ "................"
/* 10 */ "................"
/* 11 */ "................"
/* 12 */ ".g....g........."
/* 13 */ "................"
// Level 5
/* z\x* 111111 */
/* * 0123456789012345 */
/* 0 */ ".tttttttttttttt."
/* 1 */ "tggggghqqqhqqqht"
/* 2 */ "tg....i.......it"
/* 3 */ "tg....i...i...it"
/* 4 */ "tg....i...i...it"
/* 5 */ "tg....hiiihiiiht"
/* 6 */ "tg....gtttttttt."
/* 7 */ "tg....gt........"
/* 8 */ "tg....gt........"
/* 9 */ "tg....gt........"
/* 10 */ "tg....gt........"
/* 11 */ "tg....gt........"
/* 12 */ "tggggggt........"
/* 13 */ ".tttttt........."
// Level 6
/* z\x* 111111 */
/* * 0123456789012345 */
/* 0 */ "uv............vu"
/* 1 */ "vvvvvvvvvvvvvvvv"
/* 2 */ ".vuuuuuuuuuuuuv."
/* 3 */ ".vuuuuuutuuuuuv."
/* 4 */ ".vuuuuuuuuuuuuv."
/* 5 */ ".vuuuuvvvvvvvvvv"
/* 6 */ ".vuuuuv.......vu"
/* 7 */ ".vuuuuv........."
/* 8 */ ".vuuuuv........."
/* 9 */ ".vuuuuv........."
/* 10 */ ".vuuuuv........."
/* 11 */ ".vuuuuv........."
/* 12 */ "vvvvvvvv........"
/* 13 */ "uv....vu........"
// Level 7
/* z\x* 111111 */
/* * 0123456789012345 */
/* 0 */ "................"
/* 1 */ "................"
/* 2 */ "................"
/* 3 */ "...vvvvvvvvvv..."
/* 4 */ "...vv..........."
/* 5 */ "...vv..........."
/* 6 */ "...vv..........."
/* 7 */ "...vv..........."
/* 8 */ "...vv..........."
/* 9 */ "...vv..........."
/* 10 */ "...vv..........."
/* 11 */ "................"
/* 12 */ "................"
/* 13 */ "................",
// Connectors:
"",
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
true,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // HouseWithSpa
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// MediumSakuraTree:
// The data has been exported from the gallery Plains, area index 146, ID 490, created by STR_Warrior
{
// Size:
7, 10, 7, // SizeX = 7, SizeY = 10, SizeZ = 7
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
6, 9, 6, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a: 3: 0\n" /* dirt */
"b: 2: 0\n" /* grass */
"c: 31: 1\n" /* tallgrass */
"d: 38: 7\n" /* rose */
"e: 17: 1\n" /* tree */
"f: 38: 0\n" /* rose */
"g: 38: 8\n" /* rose */
"h: 38: 5\n" /* rose */
"i: 35: 6\n" /* wool */
"m: 19: 0\n" /* sponge */,
// Block data:
// Level 0
/* z\x* 0123456 */
/* 0 */ "aaaaaaa"
/* 1 */ "aaaaaaa"
/* 2 */ "aaaaaaa"
/* 3 */ "aaaaaaa"
/* 4 */ "aaaaaaa"
/* 5 */ "aaaaaaa"
/* 6 */ "aaaaaaa"
// Level 1
/* z\x* 0123456 */
/* 0 */ "bbbbbbb"
/* 1 */ "bbbbbbb"
/* 2 */ "bbbbbbb"
/* 3 */ "bbbabbb"
/* 4 */ "bbbbbbb"
/* 5 */ "bbbbbbb"
/* 6 */ "bbbbbbb"
// Level 2
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "..c.c.."
/* 2 */ ".dccdc."
/* 3 */ "..cefc."
/* 4 */ ".ccfgh."
/* 5 */ "..ccc.."
/* 6 */ "......."
// Level 3
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "......."
/* 2 */ "......."
/* 3 */ "...e..."
/* 4 */ "......."
/* 5 */ "......."
/* 6 */ "......."
// Level 4
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "..i...."
/* 2 */ "......."
/* 3 */ "...e.i."
/* 4 */ ".i....."
/* 5 */ "......."
/* 6 */ "......."
// Level 5
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "..i...."
/* 2 */ "...i..."
/* 3 */ "..ieii."
/* 4 */ ".i.ii.."
/* 5 */ "...i..."
/* 6 */ "......."
// Level 6
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "..ii..."
/* 2 */ "..iii.."
/* 3 */ ".iieii."
/* 4 */ ".iiii.."
/* 5 */ "..iii.."
/* 6 */ "......."
// Level 7
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "..iii.."
/* 2 */ ".iiiii."
/* 3 */ ".iieii."
/* 4 */ ".iiiii."
/* 5 */ "..iii.."
/* 6 */ "......."
// Level 8
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "...i..."
/* 2 */ "..iiii."
/* 3 */ ".iiiii."
/* 4 */ "..iii.."
/* 5 */ "...i..."
/* 6 */ "......."
// Level 9
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "......."
/* 2 */ "...i..."
/* 3 */ "..iii.."
/* 4 */ "...i..."
/* 5 */ "......."
/* 6 */ ".......",
// Connectors:
"-1: 3, 2, 0: 2\n" /* Type -1, direction Z- */
"3: 6, 2, 3: 5\n" /* Type 3, direction X+ */
"-3: 0, 2, 3: 4\n" /* Type -3, direction X- */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
true,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // MediumSakuraTree
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Restaurant:
// The data has been exported from the gallery Plains, area index 61, ID 117, created by Aloe_vera
@ -1614,6 +2389,9 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // Restaurant
@ -1626,8 +2404,8 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
12, 8, 6, // SizeX = 12, SizeY = 8, SizeZ = 6
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
11, 7, 5, // MaxX, MaxY, MaxZ
-1, 0, -1, // MinX, MinY, MinZ
12, 7, 6, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
@ -1719,7 +2497,11 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
/* 5 */ "............",
// Connectors:
"-1: 0, 2, 2: 4\n" /* Type -1, direction X- */,
"-1: -1, 2, 2: 4\n" /* Type -1, direction X- */
"3: 5, 2, 6: 3\n" /* Type 3, direction Z+ */
"-3: 6, 2, -1: 2\n" /* Type -3, direction Z- */
"-3: 12, 2, 2: 5\n" /* Type -3, direction X+ */
"3: 12, 2, 2: 5\n" /* Type 3, direction X+ */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
@ -1738,6 +2520,9 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // SakuraDouble
@ -1750,8 +2535,8 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
5, 7, 5, // SizeX = 5, SizeY = 7, SizeZ = 5
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
4, 6, 4, // MaxX, MaxY, MaxZ
-1, 0, -1, // MinX, MinY, MinZ
5, 6, 5, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
@ -1819,7 +2604,9 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
/* 4 */ ".....",
// Connectors:
"-1: 2, 2, 0: 2\n" /* Type -1, direction Z- */,
"-1: 2, 2, -1: 2\n" /* Type -1, direction Z- */
"3: 5, 2, 2: 5\n" /* Type 3, direction X+ */
"-3: -1, 2, 2: 4\n" /* Type -3, direction X- */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
@ -1838,6 +2625,9 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // SakuraSmall
}; // g_JapaneseVillagePrefabs
@ -2192,6 +2982,9 @@ const cPrefab::sDef g_JapaneseVillageStartingPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // HighTemple
@ -2389,6 +3182,9 @@ const cPrefab::sDef g_JapaneseVillageStartingPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // Well
};

View File

@ -155,6 +155,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // BalconyCorridor
@ -315,6 +318,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // BalconyTee2
@ -435,6 +441,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // BlazePlatform
@ -605,6 +614,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // BlazePlatformOverhang
@ -805,6 +817,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
-1000,
// MoveToGround:
false,
}, // BridgeCircleCrossing
@ -1006,6 +1021,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // BridgeCrossing
@ -1100,6 +1118,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // BridgeCrumble1
@ -1200,6 +1221,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // BridgeCrumble2
@ -1379,6 +1403,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
1000,
// MoveToGround:
false,
}, // BridgeDoubleCrumble
@ -1619,6 +1646,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // BridgeFunnelDown
@ -1948,6 +1978,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // BridgeLevelCrossing
@ -2067,6 +2100,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
1000,
// MoveToGround:
false,
}, // BridgeSegment
@ -2227,6 +2263,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // BridgeTee
@ -2328,6 +2367,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // Corridor11
@ -2429,6 +2471,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // Corridor13
@ -2524,6 +2569,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
500,
// MoveToGround:
false,
}, // Corridor5
@ -2663,6 +2711,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // CorridorCorner5
@ -2803,6 +2854,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // CorridorCornerChest5
@ -2928,6 +2982,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
-50,
// MoveToGround:
false,
}, // CorridorCrossing
@ -3080,6 +3137,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // CorridorStairs
@ -3181,6 +3241,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // DarkCorridor
@ -3438,6 +3501,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // LavaStaircase
@ -3769,6 +3835,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
-1000,
// MoveToGround:
false,
}, // LavaStaircaseBig
@ -4047,6 +4116,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // LavaStairsBridge
@ -4235,6 +4307,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
-1000,
// MoveToGround:
false,
}, // MidStaircase
@ -4378,6 +4453,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // StairsToOpen1
@ -4521,6 +4599,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // StairsToOpen2
@ -4638,6 +4719,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // Tee2x4
@ -4767,6 +4851,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // Tee4x4
@ -4863,6 +4950,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
-50,
// MoveToGround:
false,
}, // TinyCorridorCorner
@ -4960,6 +5050,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // TinyCorridorCornerChest
@ -5059,6 +5152,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
-50,
// MoveToGround:
false,
}, // TinyCorridorCrossing
@ -5174,6 +5270,9 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
// AddWeightIfSame:
-99,
// MoveToGround:
false,
}, // Turret
}; // g_NetherFortPrefabs
@ -5378,6 +5477,9 @@ const cPrefab::sDef g_NetherFortStartingPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
false,
}, // CentralRoom
};

File diff suppressed because it is too large Load Diff

View File

@ -141,6 +141,9 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // Forge
@ -264,6 +267,9 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House11x7
@ -363,6 +369,9 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House5x4
@ -468,6 +477,9 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House5x5
@ -573,6 +585,9 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House7x5
@ -683,6 +698,9 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House8x5
@ -805,6 +823,9 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House8x7
@ -928,6 +949,9 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House9x7
@ -1078,6 +1102,9 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // HouseL13x12
@ -1087,75 +1114,86 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
// The data has been exported from the gallery Desert, area index 34, ID 175, created by Aloe_vera
{
// Size:
7, 5, 7, // SizeX = 7, SizeY = 5, SizeZ = 7
7, 6, 7, // SizeX = 7, SizeY = 6, SizeZ = 7
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
6, 4, 6, // MaxX, MaxY, MaxZ
6, 5, 6, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a: 85: 0\n" /* fence */
"b:171:14\n" /* carpet */
"c:171:15\n" /* carpet */
"d:171: 0\n" /* carpet */
"e: 35:14\n" /* wool */
"f: 35: 0\n" /* wool */
"a: 12: 0\n" /* sand */
"b: 85: 0\n" /* fence */
"c:171:14\n" /* carpet */
"d:171:15\n" /* carpet */
"e:171: 0\n" /* carpet */
"f: 35:14\n" /* wool */
"g: 35: 0\n" /* wool */
"m: 19: 0\n" /* sponge */,
// Block data:
// Level 0
/* z\x* 0123456 */
/* 0 */ "a.....a"
/* 1 */ "bccdccb"
/* 2 */ "bcdddcb"
/* 3 */ "bcdddcb"
/* 4 */ "bccdccb"
/* 5 */ "a.....a"
/* 6 */ "......."
/* 0 */ "aaaaaaa"
/* 1 */ "aaaaaaa"
/* 2 */ "aaaaaaa"
/* 3 */ "aaaaaaa"
/* 4 */ "aaaaaaa"
/* 5 */ "aaaaaaa"
/* 6 */ "aaaaaaa"
// Level 1
/* z\x* 0123456 */
/* 0 */ "a.....a"
/* 1 */ "......."
/* 2 */ "......."
/* 3 */ "......."
/* 4 */ "......."
/* 5 */ "a.....a"
/* 0 */ "b.....b"
/* 1 */ "cddeddc"
/* 2 */ "cdeeedc"
/* 3 */ "cdeeedc"
/* 4 */ "cddeddc"
/* 5 */ "b.....b"
/* 6 */ "......."
// Level 2
/* z\x* 0123456 */
/* 0 */ "a.....a"
/* 0 */ "b.....b"
/* 1 */ "......."
/* 2 */ "......."
/* 3 */ "......."
/* 4 */ "......."
/* 5 */ "a.....a"
/* 6 */ "efefefe"
/* 5 */ "b.....b"
/* 6 */ "......."
// Level 3
/* z\x* 0123456 */
/* 0 */ "efefefe"
/* 0 */ "b.....b"
/* 1 */ "......."
/* 2 */ "......."
/* 3 */ "......."
/* 4 */ "......."
/* 5 */ "efefefe"
/* 6 */ "......."
/* 5 */ "b.....b"
/* 6 */ "fgfgfgf"
// Level 4
/* z\x* 0123456 */
/* 0 */ "fgfgfgf"
/* 1 */ "......."
/* 2 */ "......."
/* 3 */ "......."
/* 4 */ "......."
/* 5 */ "fgfgfgf"
/* 6 */ "......."
// Level 5
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "efefefe"
/* 2 */ "efefefe"
/* 3 */ "efefefe"
/* 4 */ "efefefe"
/* 1 */ "fgfgfgf"
/* 2 */ "fgfgfgf"
/* 3 */ "fgfgfgf"
/* 4 */ "fgfgfgf"
/* 5 */ "......."
/* 6 */ ".......",
// Connectors:
"-1: 2, -1, 0: 2\n" /* Type -1, direction Z- */,
"-1: 2, 0, 0: 2\n" /* Type -1, direction Z- */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
@ -1167,13 +1205,16 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
true,
// DefaultWeight:
100,
5,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // MarketStall
@ -1300,13 +1341,16 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
true,
// DefaultWeight:
100,
20,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // Marketplace
}; // g_SandFlatRoofVillagePrefabs
@ -1496,6 +1540,9 @@ const cPrefab::sDef g_SandFlatRoofVillageStartingPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // Well
};

View File

@ -82,6 +82,9 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // DoubleField
@ -202,6 +205,9 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House11x7
@ -345,6 +351,9 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House11x9
@ -463,6 +472,9 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House13x7
@ -606,6 +618,9 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House13x9
@ -749,6 +764,9 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House15x9
@ -892,6 +910,9 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House16x9
@ -1003,6 +1024,9 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House7x7
@ -1115,6 +1139,9 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // House9x7
@ -1251,159 +1278,10 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
// AddWeightIfSame:
0,
}, // House9x9
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// HouseL14x12:
// The data has been exported from the gallery Desert, area index 7, ID 82, created by Aloe_vera
{
// Size:
14, 6, 12, // SizeX = 14, SizeY = 6, SizeZ = 12
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
13, 5, 11, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a:128: 0\n" /* sandstonestairs */
"b:128: 2\n" /* sandstonestairs */
"c:128: 1\n" /* sandstonestairs */
"d: 24: 0\n" /* sandstone */
"e:128: 3\n" /* sandstonestairs */
"f: 64: 7\n" /* wooddoorblock */
"g: 64: 5\n" /* wooddoorblock */
"h:102: 0\n" /* glasspane */
"i: 64:12\n" /* wooddoorblock */
"j:128: 7\n" /* sandstonestairs */
"k: 50: 3\n" /* torch */
"l: 50: 4\n" /* torch */
"m: 19: 0\n" /* sponge */
"n:128: 6\n" /* sandstonestairs */
"o:128: 5\n" /* sandstonestairs */
"p:128: 4\n" /* sandstonestairs */
"q: 50: 1\n" /* torch */,
// Block data:
// Level 0
/* z\x* 1111 */
/* * 01234567890123 */
/* 0 */ ".......abc...."
/* 1 */ ".dddddddddddd."
/* 2 */ ".dddddddddddd."
/* 3 */ ".dddddddddddd."
/* 4 */ ".dddddddddddd."
/* 5 */ ".dddddddddddd."
/* 6 */ "....aec.ddddd."
/* 7 */ "mmmmmmm.ddddd."
/* 8 */ "mmmmmmm.ddddd."
/* 9 */ "mmmmmmm.ddddd."
/* 10 */ "mmmmmmm.ddddd."
/* 11 */ "mmmmmmm......."
// Level 1
/* z\x* 1111 */
/* * 01234567890123 */
/* 0 */ ".............."
/* 1 */ ".dddddddfdddd."
/* 2 */ ".d..........d."
/* 3 */ ".d..........d."
/* 4 */ ".d..........d."
/* 5 */ ".ddddgddd...d."
/* 6 */ "........d...d."
/* 7 */ "mmmmmmm.d...d."
/* 8 */ "mmmmmmm.d...d."
/* 9 */ "mmmmmmm.d...d."
/* 10 */ "mmmmmmm.ddddd."
/* 11 */ "mmmmmmm......."
// Level 2
/* z\x* 1111 */
/* * 01234567890123 */
/* 0 */ ".............."
/* 1 */ ".dhhdhhdidhhd."
/* 2 */ ".h..........h."
/* 3 */ ".h..........h."
/* 4 */ ".h..........d."
/* 5 */ ".dhhdidhh...h."
/* 6 */ "........h...h."
/* 7 */ "mmmmmmm.d...d."
/* 8 */ "mmmmmmm.h...h."
/* 9 */ "mmmmmmm.h...h."
/* 10 */ "mmmmmmm.dhhhd."
/* 11 */ "mmmmmmm......."
// Level 3
/* z\x* 1111 */
/* * 01234567890123 */
/* 0 */ "bbbbbbbbbbbbbb"
/* 1 */ "jddddddddddddc"
/* 2 */ ".d.....k.k..dc"
/* 3 */ ".d..........dc"
/* 4 */ ".d..l.l.....dc"
/* 5 */ "ndddddddd...dc"
/* 6 */ "eeeeeeead...dc"
/* 7 */ "mmmmmmmad...dc"
/* 8 */ "mmmmmmmad...dc"
/* 9 */ "mmmmmmmad...dc"
/* 10 */ "mmmmmmmadddddc"
/* 11 */ "mmmmmmmao...pc"
// Level 4
/* z\x* 1111 */
/* * 01234567890123 */
/* 0 */ ".............."
/* 1 */ "bbbbbbbbbbbbb."
/* 2 */ "jdddddddddddc."
/* 3 */ ".dq........dc."
/* 4 */ "nddddddddd.dc."
/* 5 */ "eeeeeeeead.dc."
/* 6 */ "........ad.dc."
/* 7 */ "mmmmmmm.ad.dc."
/* 8 */ "mmmmmmm.ad.dc."
/* 9 */ "mmmmmmm.adldc."
/* 10 */ "mmmmmmm.adddc."
/* 11 */ "mmmmmmm.ao.pc."
// Level 5
/* z\x* 1111 */
/* * 01234567890123 */
/* 0 */ ".............."
/* 1 */ ".............."
/* 2 */ "bbbbbbbbbbbb.."
/* 3 */ "dddddddddddc.."
/* 4 */ "eeeeeeeeeadc.."
/* 5 */ ".........adc.."
/* 6 */ ".........adc.."
/* 7 */ "mmmmmmm..adc.."
/* 8 */ "mmmmmmm..adc.."
/* 9 */ "mmmmmmm..adc.."
/* 10 */ "mmmmmmm..adc.."
/* 11 */ "mmmmmmm..adc..",
// Connectors:
"-1: 8, 0, 0: 2\n" /* Type -1, direction Z- */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
// MoveToGround:
true,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
}, // HouseL14x12
}, // House9x9
@ -1571,6 +1449,164 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // HouseL14x12
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// HouseL14x12:
// The data has been exported from the gallery Desert, area index 7, ID 82, created by Aloe_vera
{
// Size:
14, 6, 12, // SizeX = 14, SizeY = 6, SizeZ = 12
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
13, 5, 11, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a:128: 0\n" /* sandstonestairs */
"b:128: 2\n" /* sandstonestairs */
"c:128: 1\n" /* sandstonestairs */
"d: 24: 0\n" /* sandstone */
"e:128: 3\n" /* sandstonestairs */
"f: 64: 7\n" /* wooddoorblock */
"g: 64: 5\n" /* wooddoorblock */
"h:102: 0\n" /* glasspane */
"i: 64:12\n" /* wooddoorblock */
"j:128: 7\n" /* sandstonestairs */
"k: 50: 3\n" /* torch */
"l: 50: 4\n" /* torch */
"m: 19: 0\n" /* sponge */
"n:128: 6\n" /* sandstonestairs */
"o:128: 5\n" /* sandstonestairs */
"p:128: 4\n" /* sandstonestairs */
"q: 50: 1\n" /* torch */,
// Block data:
// Level 0
/* z\x* 1111 */
/* * 01234567890123 */
/* 0 */ ".......abc...."
/* 1 */ ".dddddddddddd."
/* 2 */ ".dddddddddddd."
/* 3 */ ".dddddddddddd."
/* 4 */ ".dddddddddddd."
/* 5 */ ".dddddddddddd."
/* 6 */ "....aec.ddddd."
/* 7 */ "mmmmmmm.ddddd."
/* 8 */ "mmmmmmm.ddddd."
/* 9 */ "mmmmmmm.ddddd."
/* 10 */ "mmmmmmm.ddddd."
/* 11 */ "mmmmmmm......."
// Level 1
/* z\x* 1111 */
/* * 01234567890123 */
/* 0 */ ".............."
/* 1 */ ".dddddddfdddd."
/* 2 */ ".d..........d."
/* 3 */ ".d..........d."
/* 4 */ ".d..........d."
/* 5 */ ".ddddgddd...d."
/* 6 */ "........d...d."
/* 7 */ "mmmmmmm.d...d."
/* 8 */ "mmmmmmm.d...d."
/* 9 */ "mmmmmmm.d...d."
/* 10 */ "mmmmmmm.ddddd."
/* 11 */ "mmmmmmm......."
// Level 2
/* z\x* 1111 */
/* * 01234567890123 */
/* 0 */ ".............."
/* 1 */ ".dhhdhhdidhhd."
/* 2 */ ".h..........h."
/* 3 */ ".h..........h."
/* 4 */ ".h..........d."
/* 5 */ ".dhhdidhh...h."
/* 6 */ "........h...h."
/* 7 */ "mmmmmmm.d...d."
/* 8 */ "mmmmmmm.h...h."
/* 9 */ "mmmmmmm.h...h."
/* 10 */ "mmmmmmm.dhhhd."
/* 11 */ "mmmmmmm......."
// Level 3
/* z\x* 1111 */
/* * 01234567890123 */
/* 0 */ "bbbbbbbbbbbbbb"
/* 1 */ "jddddddddddddc"
/* 2 */ ".d.....k.k..dc"
/* 3 */ ".d..........dc"
/* 4 */ ".d..l.l.....dc"
/* 5 */ "ndddddddd...dc"
/* 6 */ "eeeeeeead...dc"
/* 7 */ "mmmmmmmad...dc"
/* 8 */ "mmmmmmmad...dc"
/* 9 */ "mmmmmmmad...dc"
/* 10 */ "mmmmmmmadddddc"
/* 11 */ "mmmmmmmao...pc"
// Level 4
/* z\x* 1111 */
/* * 01234567890123 */
/* 0 */ ".............."
/* 1 */ "bbbbbbbbbbbbb."
/* 2 */ "jdddddddddddc."
/* 3 */ ".dq........dc."
/* 4 */ "nddddddddd.dc."
/* 5 */ "eeeeeeeead.dc."
/* 6 */ "........ad.dc."
/* 7 */ "mmmmmmm.ad.dc."
/* 8 */ "mmmmmmm.ad.dc."
/* 9 */ "mmmmmmm.adldc."
/* 10 */ "mmmmmmm.adddc."
/* 11 */ "mmmmmmm.ao.pc."
// Level 5
/* z\x* 1111 */
/* * 01234567890123 */
/* 0 */ ".............."
/* 1 */ ".............."
/* 2 */ "bbbbbbbbbbbb.."
/* 3 */ "dddddddddddc.."
/* 4 */ "eeeeeeeeeadc.."
/* 5 */ ".........adc.."
/* 6 */ ".........adc.."
/* 7 */ "mmmmmmm..adc.."
/* 8 */ "mmmmmmm..adc.."
/* 9 */ "mmmmmmm..adc.."
/* 10 */ "mmmmmmm..adc.."
/* 11 */ "mmmmmmm..adc..",
// Connectors:
"-1: 8, 0, 0: 2\n" /* Type -1, direction Z- */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
true,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // HouseL14x12
@ -1638,6 +1674,9 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // SingleField
@ -1731,6 +1770,9 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // SmallHut
}; // g_SandVillagePrefabs
@ -1741,6 +1783,204 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
const cPrefab::sDef g_SandVillageStartingPrefabs[] =
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// RoofedWell:
// The data has been exported from the gallery Desert, area index 43, ID 274, created by Aloe_vera
{
// Size:
7, 14, 7, // SizeX = 7, SizeY = 14, SizeZ = 7
// Hitbox (relative to bounding box):
0, 0, 0, // MinX, MinY, MinZ
6, 13, 6, // MaxX, MaxY, MaxZ
// Block definitions:
".: 0: 0\n" /* air */
"a: 1: 0\n" /* stone */
"b: 24: 0\n" /* sandstone */
"c: 8: 0\n" /* water */
"d: 12: 0\n" /* sand */
"e:118: 3\n" /* cauldronblock */
"f: 85: 0\n" /* fence */
"g:128: 2\n" /* sandstonestairs */
"h:128: 7\n" /* sandstonestairs */
"i:128: 4\n" /* sandstonestairs */
"j:128: 5\n" /* sandstonestairs */
"k:128: 6\n" /* sandstonestairs */
"l:128: 3\n" /* sandstonestairs */
"m: 19: 0\n" /* sponge */,
// Block data:
// Level 0
/* z\x* 0123456 */
/* 0 */ "aaaaaaa"
/* 1 */ "aaaaaaa"
/* 2 */ "aaaaaaa"
/* 3 */ "aaaaaaa"
/* 4 */ "aaaaaaa"
/* 5 */ "aaaaaaa"
/* 6 */ "aaaaaaa"
// Level 1
/* z\x* 0123456 */
/* 0 */ "aaaaaaa"
/* 1 */ "abbbbba"
/* 2 */ "abcccba"
/* 3 */ "abcccba"
/* 4 */ "abcccba"
/* 5 */ "abbbbba"
/* 6 */ "aaaaaaa"
// Level 2
/* z\x* 0123456 */
/* 0 */ "aaaaaaa"
/* 1 */ "abbbbba"
/* 2 */ "abcccba"
/* 3 */ "abcccba"
/* 4 */ "abcccba"
/* 5 */ "abbbbba"
/* 6 */ "aaaaaaa"
// Level 3
/* z\x* 0123456 */
/* 0 */ "aaaaaaa"
/* 1 */ "abbbbba"
/* 2 */ "abcccba"
/* 3 */ "abcccba"
/* 4 */ "abcccba"
/* 5 */ "abbbbba"
/* 6 */ "aaaaaaa"
// Level 4
/* z\x* 0123456 */
/* 0 */ "ddddddd"
/* 1 */ "dbbbbbd"
/* 2 */ "dbcccbd"
/* 3 */ "dbcccbd"
/* 4 */ "dbcccbd"
/* 5 */ "dbbbbbd"
/* 6 */ "ddddddd"
// Level 5
/* z\x* 0123456 */
/* 0 */ "ddddddd"
/* 1 */ "dbbbbbd"
/* 2 */ "dbcccbd"
/* 3 */ "dbcccbd"
/* 4 */ "dbcccbd"
/* 5 */ "dbbbbbd"
/* 6 */ "ddddddd"
// Level 6
/* z\x* 0123456 */
/* 0 */ "ddddddd"
/* 1 */ "dbbbbbd"
/* 2 */ "dbcccbd"
/* 3 */ "dbcccbd"
/* 4 */ "dbcccbd"
/* 5 */ "dbbbbbd"
/* 6 */ "ddddddd"
// Level 7
/* z\x* 0123456 */
/* 0 */ "ddbbbdd"
/* 1 */ "dbbbbbd"
/* 2 */ "bbcccbb"
/* 3 */ "bbcccbb"
/* 4 */ "bbcccbb"
/* 5 */ "dbbbbbd"
/* 6 */ "ddbbbdd"
// Level 8
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ ".bbbbb."
/* 2 */ ".b...b."
/* 3 */ ".b.e.b."
/* 4 */ ".b...b."
/* 5 */ ".bbbbb."
/* 6 */ "......."
// Level 9
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ ".f...f."
/* 2 */ "......."
/* 3 */ "...f..."
/* 4 */ "......."
/* 5 */ ".f...f."
/* 6 */ "......."
// Level 10
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ ".f...f."
/* 2 */ "......."
/* 3 */ "...f..."
/* 4 */ "......."
/* 5 */ ".f...f."
/* 6 */ "......."
// Level 11
/* z\x* 0123456 */
/* 0 */ "ggggggg"
/* 1 */ "hbhhhbh"
/* 2 */ ".i...j."
/* 3 */ ".i.f.j."
/* 4 */ ".i...j."
/* 5 */ "kbkkkbk"
/* 6 */ "lllllll"
// Level 12
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "ggggggg"
/* 2 */ "hb...bh"
/* 3 */ ".b.f.b."
/* 4 */ "kb...bk"
/* 5 */ "lllllll"
/* 6 */ "......."
// Level 13
/* z\x* 0123456 */
/* 0 */ "......."
/* 1 */ "......."
/* 2 */ "ggggggg"
/* 3 */ "bbbbbbb"
/* 4 */ "lllllll"
/* 5 */ "......."
/* 6 */ ".......",
// Connectors:
"2: 6, 8, 3: 5\n" /* Type 2, direction X+ */
"2: 3, 8, 6: 3\n" /* Type 2, direction Z+ */
"2: 0, 8, 3: 4\n" /* Type 2, direction X- */
"2: 3, 8, 0: 2\n" /* Type 2, direction Z- */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
// Merge strategy:
cBlockArea::msSpongePrint,
// ShouldExtendFloor:
true,
// DefaultWeight:
100,
// DepthWeight:
"",
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // RoofedWell
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Well:
// The data has been exported from the gallery Desert, area index 0, ID 1, created by Aloe_vera
@ -1875,6 +2115,9 @@ const cPrefab::sDef g_SandVillageStartingPrefabs[] =
// AddWeightIfSame:
0,
// MoveToGround:
true,
}, // Well
};

View File

@ -127,10 +127,23 @@ public:
m_HeightGen(a_HeightGen),
m_RoadBlock(a_RoadBlock)
{
// Generate the pieces for this village; don't care about the Y coord:
cBFSPieceGenerator pg(*this, a_Seed);
// Generate the pieces at very negative Y coords, so that we can later test
// Piece has negative Y coord -> hasn't been height-adjusted yet
pg.PlacePieces(a_OriginX, -1000, a_OriginZ, a_MaxRoadDepth + 1, m_Pieces);
pg.PlacePieces(a_OriginX, 0, a_OriginZ, a_MaxRoadDepth + 1, m_Pieces);
if (m_Pieces.empty())
{
return;
}
// If the central piece should be moved to ground, move it, and
// check all of its dependents and move those that are strictly connector-driven based on its new Y coord:
if (((cPrefab &)m_Pieces[0]->GetPiece()).ShouldMoveToGround())
{
int OrigPosY = m_Pieces[0]->GetCoords().y;
PlacePieceOnGround(*m_Pieces[0]);
int NewPosY = m_Pieces[0]->GetCoords().y;
MoveAllDescendants(m_Pieces, 0, NewPosY - OrigPosY);
}
}
protected:
@ -179,7 +192,7 @@ protected:
DrawRoad(a_Chunk, **itr, HeightMap);
continue;
}
if ((*itr)->GetCoords().y < 0)
if (Prefab.ShouldMoveToGround() && !(*itr)->HasBeenMovedToGround())
{
PlacePieceOnGround(**itr);
}
@ -201,7 +214,7 @@ protected:
cChunkDef::HeightMap HeightMap;
m_HeightGen.GenHeightMap(ChunkX, ChunkZ, HeightMap);
int TerrainHeight = cChunkDef::GetHeight(HeightMap, BlockX, BlockZ);
a_Piece.GetCoords().y += TerrainHeight - FirstConnector.m_Pos.y + 1;
a_Piece.MoveToGroundBy(TerrainHeight - FirstConnector.m_Pos.y + 1);
}
@ -232,11 +245,13 @@ protected:
return m_Prefabs.GetPiecesWithConnector(a_ConnectorType);
}
virtual cPieces GetStartingPieces(void)
{
return m_Prefabs.GetStartingPieces();
}
virtual int GetPieceWeight(
const cPlacedPiece & a_PlacedPiece,
const cPiece::cConnector & a_ExistingConnector,
@ -258,15 +273,35 @@ protected:
return m_Prefabs.GetPieceWeight(a_PlacedPiece, a_ExistingConnector, a_NewPiece);
}
virtual void PiecePlaced(const cPiece & a_Piece) override
{
m_Prefabs.PiecePlaced(a_Piece);
}
virtual void Reset(void) override
{
m_Prefabs.Reset();
}
void MoveAllDescendants(cPlacedPieces & a_PlacedPieces, size_t a_Pivot, int a_HeightDifference)
{
size_t num = a_PlacedPieces.size();
cPlacedPiece * Pivot = a_PlacedPieces[a_Pivot];
for (size_t i = a_Pivot + 1; i < num; i++)
{
if (
(a_PlacedPieces[i]->GetParent() == Pivot) && // It is a direct dependant of the pivot
!((const cPrefab &)a_PlacedPieces[i]->GetPiece()).ShouldMoveToGround() // It attaches strictly by connectors
)
{
a_PlacedPieces[i]->MoveToGroundBy(a_HeightDifference);
MoveAllDescendants(a_PlacedPieces, i, a_HeightDifference);
}
} // for i - a_PlacedPieces[]
}
} ;