diff options
Diffstat (limited to '091run_interactive.cc')
-rw-r--r-- | 091run_interactive.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/091run_interactive.cc b/091run_interactive.cc index a883a5ae..44fe5736 100644 --- a/091run_interactive.cc +++ b/091run_interactive.cc @@ -426,6 +426,23 @@ case RELOAD: { Type_ordinal.erase(get(Type, recently_added_types.at(i)).name); Type.erase(recently_added_types.at(i)); } + for (map<string, vector<recipe_ordinal> >::iterator p = Recipe_variants.begin(); p != Recipe_variants.end(); ++p) { +//? cerr << p->first << ":\n"; + vector<recipe_ordinal>& variants = p->second; + for (long long int i = 0; i < SIZE(p->second); ++i) { + if (variants.at(i) == -1) continue; + if (find(recently_added_shape_shifting_recipes.begin(), recently_added_shape_shifting_recipes.end(), variants.at(i)) != recently_added_shape_shifting_recipes.end()) { +//? cerr << " " << variants.at(i) << ' ' << get(Recipe, variants.at(i)).name << '\n'; + variants.at(i) = -1; // ghost + } + } + } + for (long long int i = 0; i < SIZE(recently_added_shape_shifting_recipes); ++i) { +//? cerr << "erasing " << get(Recipe, recently_added_shape_shifting_recipes.at(i)).name << '\n'; + Recipe_ordinal.erase(get(Recipe, recently_added_shape_shifting_recipes.at(i)).name); + Recipe.erase(recently_added_shape_shifting_recipes.at(i)); + } + recently_added_shape_shifting_recipes.clear(); string code = read_mu_string(ingredients.at(0).at(0)); run_code_begin(); routine* save_current_routine = Current_routine; |