| 2310 | IMPLEMENT_VMETHOD_INTERPOSE(unitlist_hook, render); |
| 2311 | |
| 2312 | DFhackCExport command_result plugin_enable(color_ostream &out, bool enable) |
| 2313 | { |
| 2314 | if (!gps) |
| 2315 | return CR_FAILURE; |
| 2316 | |
| 2317 | if (enable != is_enabled) |
| 2318 | { |
| 2319 | if (!INTERPOSE_HOOK(unitlist_hook, feed).apply(enable) || |
| 2320 | !INTERPOSE_HOOK(unitlist_hook, render).apply(enable)) |
| 2321 | return CR_FAILURE; |
| 2322 | |
| 2323 | is_enabled = enable; |
| 2324 | } |
| 2325 | |
| 2326 | return CR_OK; |
| 2327 | } |
| 2328 | |
| 2329 | DFhackCExport command_result plugin_init ( color_ostream &out, vector <PluginCommand> &commands) |
| 2330 | { |