https://imgur.com/wQuDOi5 static bool GrowingOnWateredTile(TileIndex tile) { TrackBits water_track = TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_WATER, 0)); if (water_track != TRACK_BIT_NONE) { if (water_track == TRACK_BIT_UPPER || water_track == TRACK_BIT_LOWER || water_track == TRACK_BIT_LEFT || water_track == TRACK_BIT_RIGHT) { if (water_track == TRACK_BIT_UPPER) { TileIndex opposite_tile = TileAddWrap(tile, -1, -1); TrackBits opposite_track = TRACK_BIT_LOWER; TileIndex next_tile_1 = TileAddWrap(tile, -1, 0); TrackBits next_track_1 = _settings_game.pf.forbid_90_deg ? TRACK_BIT_Y | TRACK_BIT_UPPER : TRACK_BIT_3WAY_NW; TileIndex next_tile_2 = TileAddWrap(tile, 0, -1); TrackBits next_track_2 = _settings_game.pf.forbid_90_deg ? TRACK_BIT_X | TRACK_BIT_UPPER : TRACK_BIT_3WAY_NE; } else if (water_track == TRACK_BIT_LOWER) { TileIndex opposite_tile = TileAddWrap(tile, 1, 1); TrackBits opposite_track = TRACK_BIT_UPPER; TileIndex next_tile_1 = TileAddWrap(tile, 1, 0); TrackBits next_track_1 = _settings_game.pf.forbid_90_deg ? TRACK_BIT_Y | TRACK_BIT_LOWER : TRACK_BIT_3WAY_SE; TileIndex next_tile_2 = TileAddWrap(tile, 0, 1); TrackBits next_track_2 = _settings_game.pf.forbid_90_deg ? TRACK_BIT_X | TRACK_BIT_LOWER : TRACK_BIT_3WAY_SW; } else if (water_track == TRACK_BIT_LEFT) { TileIndex opposite_tile = TileAddWrap(tile, 1, -1); TrackBits opposite_track = TRACK_BIT_RIGHT; TileIndex next_tile_1 = TileAddWrap(tile, 0, -1); TrackBits next_track_1 = _settings_game.pf.forbid_90_deg ? TRACK_BIT_X | TRACK_BIT_LEFT : TRACK_BIT_3WAY_SW; TileIndex next_tile_2 = TileAddWrap(tile, 1, 0); TrackBits next_track_2 = _settings_game.pf.forbid_90_deg ? TRACK_BIT_Y | TRACK_BIT_LEFT : TRACK_BIT_3WAY_NW; } else if (water_track == TRACK_BIT_RIGHT) { TileIndex opposite_tile = TileAddWrap(tile, -1, 1); TrackBits opposite_track = TRACK_BIT_LEFT; TileIndex next_tile_1 = TileAddWrap(tile, 0, 1); TrackBits next_track_1 = _settings_game.pf.forbid_90_deg ? TRACK_BIT_X | TRACK_BIT_RIGHT : TRACK_BIT_3WAY_NE; TileIndex next_tile_2 = TileAddWrap(tile, -1, 0); TrackBits next_track_2 = _settings_game.pf.forbid_90_deg ? TRACK_BIT_Y | TRACK_BIT_RIGHT : TRACK_BIT_3WAY_SE; } return false; } return false; } return false; }