diff --git a/docs/plugins/automelt.rst b/docs/plugins/automelt.rst index 45f51561a..6b14d9dc4 100644 --- a/docs/plugins/automelt.rst +++ b/docs/plugins/automelt.rst @@ -52,4 +52,4 @@ Commands ``(no)monitor `` Enable/disable monitoring of a given stockpile. Works with either the stockpile's name (if set) or ID. If the stockpile has no custom name set, you may designate it by either the full name as reported by - the status command, or by just the number. \ No newline at end of file + the status command, or by just the number. diff --git a/plugins/automelt.cpp b/plugins/automelt.cpp index c0d80532a..c78f36f51 100644 --- a/plugins/automelt.cpp +++ b/plugins/automelt.cpp @@ -696,7 +696,7 @@ static int automelt_getStockpileConfig(lua_State *L) { if (lua_isnumber(L, -1)) { bool found = false; id = lua_tointeger(L, -1); - + for (auto &stockpile : world->buildings.other.STOCKPILE) { if (!isStockpile(stockpile)) continue; if (id == stockpile->stockpile_number){ @@ -706,7 +706,7 @@ static int automelt_getStockpileConfig(lua_State *L) { } } - + if (!found) return 0;