| 75 | const int32_t sapling_to_tree_threshold = 120 * 28 * 12 * 3 - 1; // 3 years minus 1; let the game handle the actual growing-up |
| 76 | |
| 77 | static bool tile_muddy(const df::coord &pos) |
| 78 | { // True if tile has mud spatter |
| 79 | auto block = Maps::getTileBlock(pos); |
| 80 | if (!block) |
| 81 | return false; |
| 82 | |
| 83 | for (auto blev : block->block_events) |
| 84 | { |
| 85 | if (blev->getType() != block_square_event_type::material_spatter) |
| 86 | continue; |
| 87 | |
| 88 | auto &ms_ev = *(df::block_square_event_material_spatterst *)blev; |
| 89 | if (ms_ev.mat_type == builtin_mats::MUD) |
| 90 | return ms_ev.amount[pos.x&15][pos.y&15] > 0; |
| 91 | } |
| 92 | |
| 93 | return false; |
| 94 | } |
| 95 | |
| 96 | static bool tile_watery(const df::coord &pos) |
| 97 | { // Determines if plant should be in wet or dry vector |
no test coverage detected