Formula for determination of the variance in plant growth maturation time, determined via disassembly. The coordinates are relative to the embark region.
| 216 | // Formula for determination of the variance in plant growth maturation time, determined via disassembly. |
| 217 | // The coordinates are relative to the embark region. |
| 218 | bool ripe(int32_t x, int32_t y, int32_t z, int32_t start, int32_t end) { |
| 219 | DFHack::Random::SplitmixRNG rng((world->map.region_x * 48 + x) + (world->map.region_y * 48 + y) * 10000 + (world->map.region_z + z) * 100000000); |
| 220 | int32_t time = (rng.df_trandom(2000) + *cur_year_tick) % 403200; |
| 221 | |
| 222 | return time >= start && (end == -1 || time <= end); |
| 223 | } |
| 224 | |
| 225 | // Looks in the local creation zone's picked growths vector to see if a matching growth has been marked as picked. |
| 226 | bool picked(const df::plant* plant, int32_t growth_subtype, int32_t growth_density) { |