feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a4399472.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
This commit is contained in:
@@ -40,18 +40,20 @@ void CropTile::tick(Level *level, int x, int y, int z, Random *random)
|
||||
{
|
||||
float growthSpeed = getGrowthSpeed(level, x, y, z);
|
||||
|
||||
if (random->nextInt((int) (25 / growthSpeed) + 1) == 0)
|
||||
if (random->nextInt((int) (25 / growthSpeed) + 1) == 0)
|
||||
{
|
||||
age++;
|
||||
level->setData(x, y, z, age);
|
||||
level->setData(x, y, z, age, Tile::UPDATE_CLIENTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CropTile::growCropsToMax(Level *level, int x, int y, int z)
|
||||
void CropTile::growCrops(Level *level, int x, int y, int z)
|
||||
{
|
||||
level->setData(x, y, z, 7);
|
||||
int stage = level->getData(x, y, z) + Mth::nextInt(level->random, 2, 5);
|
||||
if (stage > 7) stage = 7;
|
||||
level->setData(x, y, z, stage, Tile::UPDATE_CLIENTS);
|
||||
}
|
||||
|
||||
float CropTile::getGrowthSpeed(Level *level, int x, int y, int z)
|
||||
@@ -68,9 +70,9 @@ float CropTile::getGrowthSpeed(Level *level, int x, int y, int z)
|
||||
int d2 = level->getTile(x + 1, y, z + 1);
|
||||
int d3 = level->getTile(x - 1, y, z + 1);
|
||||
|
||||
bool horizontal = w == this->id || e == this->id;
|
||||
bool vertical = n == this->id || s == this->id;
|
||||
bool diagonal = d0 == this->id || d1 == this->id || d2 == this->id || d3 == this->id;
|
||||
bool horizontal = w == id || e == id;
|
||||
bool vertical = n == id || s == id;
|
||||
bool diagonal = d0 == id || d1 == id || d2 == id || d3 == id;
|
||||
|
||||
for (int xx = x - 1; xx <= x + 1; xx++)
|
||||
for (int zz = z - 1; zz <= z + 1; zz++)
|
||||
@@ -89,9 +91,9 @@ float CropTile::getGrowthSpeed(Level *level, int x, int y, int z)
|
||||
speed += tileSpeed;
|
||||
}
|
||||
|
||||
if (diagonal || (horizontal && vertical)) speed /= 2;
|
||||
if (diagonal || (horizontal && vertical)) speed /= 2;
|
||||
|
||||
return speed;
|
||||
return speed;
|
||||
|
||||
}
|
||||
|
||||
@@ -117,9 +119,9 @@ int CropTile::getBasePlantId()
|
||||
}
|
||||
|
||||
/**
|
||||
* Using this method instead of destroy() to determine if seeds should be
|
||||
* dropped
|
||||
*/
|
||||
* Using this method instead of destroy() to determine if seeds should be
|
||||
* dropped
|
||||
*/
|
||||
void CropTile::spawnResources(Level *level, int x, int y, int z, int data, float odds, int playerBonus)
|
||||
{
|
||||
Bush::spawnResources(level, x, y, z, data, odds, 0);
|
||||
@@ -128,7 +130,8 @@ void CropTile::spawnResources(Level *level, int x, int y, int z, int data, float
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (data >= 7) {
|
||||
if (data >= 7)
|
||||
{
|
||||
int count = 3 + playerBonus;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user