| 86 | // it can be removed once saves from 50.09 are no longer loadable |
| 87 | |
| 88 | static bool validate_seed_config(color_ostream& out, PersistentDataItem c) |
| 89 | { |
| 90 | int seed_id = c.get_int(SEED_CONFIG_ID); |
| 91 | auto plant = df::plant_raw::find(seed_id); |
| 92 | if (!plant) { |
| 93 | WARN(control,out).print("discarded invalid seed id: {}\n", seed_id); |
| 94 | return false; |
| 95 | } |
| 96 | bool valid = (!plant->flags.is_set(df::enums::plant_raw_flags::TREE)); |
| 97 | if (!valid) { |
| 98 | DEBUG(control, out).print("invalid configuration for {} discarded\n", plant->id); |
| 99 | } |
| 100 | return valid; |
| 101 | } |
| 102 | |
| 103 | static const int32_t CYCLE_TICKS = 1229; |
| 104 | static int32_t cycle_timestamp = 0; // world->frame_counter at last cycle |
no test coverage detected