| 1311 | *************/ |
| 1312 | |
| 1313 | DFhackCExport command_result plugin_enable(color_ostream &out, bool enable) |
| 1314 | { |
| 1315 | if (!Core::getInstance().isWorldLoaded()) { |
| 1316 | out.printerr("World is not loaded: please load a game first.\n"); |
| 1317 | return CR_FAILURE; |
| 1318 | } |
| 1319 | |
| 1320 | if (enable && !enabled) |
| 1321 | { |
| 1322 | enable_plugin(out); |
| 1323 | } |
| 1324 | else if (!enable && enabled) |
| 1325 | { |
| 1326 | enabled = false; |
| 1327 | setOptionEnabled(CF_ENABLED, false); |
| 1328 | stop_protect(out); |
| 1329 | } |
| 1330 | |
| 1331 | return CR_OK; |
| 1332 | } |
| 1333 | |
| 1334 | static void push_count_history(lua_State *L, ItemConstraint *icv) |
| 1335 | { |
nothing calls this directly
no test coverage detected