| 346 | // |
| 347 | |
| 348 | static void set_target(color_ostream &out, int32_t id, int32_t target) { |
| 349 | if (target == 0) |
| 350 | remove_seed_config(out, id); |
| 351 | else { |
| 352 | if (id < 0 || (size_t)id >= world->raws.plants.all.size()) { |
| 353 | WARN(control,out).print( |
| 354 | "cannot set target for unknown plant id: {}\n", id); |
| 355 | return; |
| 356 | } |
| 357 | PersistentDataItem &c = ensure_seed_config(out, id); |
| 358 | c.set_int(SEED_CONFIG_TARGET, target); |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | // searches abbreviations, returns expansion if so, returns original if not |
| 363 | static string searchAbbreviations(string in) { |
no test coverage detected