| 79 | } |
| 80 | |
| 81 | bool reset(color_ostream &out, bool load) { |
| 82 | stockpile_id = -1; |
| 83 | bookkeeping = false; |
| 84 | if (load) { |
| 85 | return initialized = command_method("initialize_world", out); |
| 86 | } else if (initialized) { |
| 87 | initialized = false; |
| 88 | return command_method("clear_caches", out); |
| 89 | } |
| 90 | |
| 91 | return true; |
| 92 | } |
| 93 | |
| 94 | bool command_method(const char *method, color_ostream &out) { |
| 95 | // Calls a lua function with no parameters. |
no outgoing calls
no test coverage detected