diff --git a/plugins/lua/tailor.lua b/plugins/lua/tailor.lua index 5c748fbfa..bcfd8bc10 100644 --- a/plugins/lua/tailor.lua +++ b/plugins/lua/tailor.lua @@ -15,7 +15,7 @@ local function process_args(opts, args) end function status() - print(('tailor is %s'):format(enabled and "enabled" or "disabled")) + print(('tailor is %s'):format(isEnabled() and "enabled" or "disabled")) print('materials preference order:') for _,name in ipairs(tailor_getMaterialPreferences()) do print((' %s'):format(name)) diff --git a/plugins/tailor.cpp b/plugins/tailor.cpp index b35f434b8..8b132397a 100644 --- a/plugins/tailor.cpp +++ b/plugins/tailor.cpp @@ -3,7 +3,6 @@ */ #include -#include #include #include "df/creature_raw.h" @@ -695,10 +694,10 @@ static void tailor_setMaterialPreferences(color_ostream &out, int32_t silkIdx, // it doesn't really matter if these are invalid. set_material_order will do // the right thing. - set_config_val(config, CONFIG_SILK_IDX, silkIdx); - set_config_val(config, CONFIG_CLOTH_IDX, clothIdx); - set_config_val(config, CONFIG_YARN_IDX, yarnIdx); - set_config_val(config, CONFIG_LEATHER_IDX, leatherIdx); + set_config_val(config, CONFIG_SILK_IDX, silkIdx - 1); + set_config_val(config, CONFIG_CLOTH_IDX, clothIdx - 1); + set_config_val(config, CONFIG_YARN_IDX, yarnIdx - 1); + set_config_val(config, CONFIG_LEATHER_IDX, leatherIdx - 1); set_material_order(); }