Changeset - r5684:bf10752932b9
[Not reviewed]
master
0 1 0
belugas - 17 years ago 2007-01-15 16:31:46
belugas@openttd.org
(svn r8145) -Featurette: Allow for Tropic Farm to plant fields after producing cargo, like its counterpart in temperate climate.
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -747,22 +747,22 @@ static void ChangeTileOwner_Industry(Til
 

	
 
static const byte _plantfarmfield_type[] = {1, 1, 1, 1, 1, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6};
 

	
 
static bool IsBadFarmFieldTile(TileIndex tile)
 
{
 
	switch (GetTileType(tile)) {
 
		case MP_CLEAR: return IsClearGround(tile, CLEAR_FIELDS) || IsClearGround(tile, CLEAR_SNOW);
 
		case MP_CLEAR: return IsClearGround(tile, CLEAR_FIELDS) || IsClearGround(tile, CLEAR_SNOW) || IsClearGround(tile, CLEAR_DESERT);
 
		case MP_TREES: return false;
 
		default:       return true;
 
	}
 
}
 

	
 
static bool IsBadFarmFieldTile2(TileIndex tile)
 
{
 
	switch (GetTileType(tile)) {
 
		case MP_CLEAR: return IsClearGround(tile, CLEAR_SNOW);
 
		case MP_CLEAR: return IsClearGround(tile, CLEAR_SNOW) || IsClearGround(tile, CLEAR_DESERT);
 
		case MP_TREES: return false;
 
		default:       return true;
 
	}
 
}
 

	
 
static void SetupFarmFieldFence(TileIndex tile, int size, byte type, Axis direction)
 
@@ -957,13 +957,13 @@ static void ProduceIndustryGoods(Industr
 

	
 
	/* produce some cargo */
 
	if ((i->counter & 0xFF) == 0) {
 
		i->cargo_waiting[0] = min(0xffff, i->cargo_waiting[0] + i->production_rate[0]);
 
		i->cargo_waiting[1] = min(0xffff, i->cargo_waiting[1] + i->production_rate[1]);
 

	
 
		if (i->type == IT_FARM) {
 
		if (i->type == IT_FARM || i->type == IT_FARM_2) {
 
			MaybePlantFarmField(i);
 
		} else if (i->type == IT_LUMBER_MILL && (i->counter & 0x1FF) == 0) {
 
			ChopLumberMillTrees(i);
 
		}
 
	}
 
}
0 comments (0 inline, 0 general)