diff --git a/fs_edit_general.lua b/fs_edit_general.lua index 20aa821..5aae23c 100644 --- a/fs_edit_general.lua +++ b/fs_edit_general.lua @@ -897,6 +897,14 @@ yl_speak_up.get_fs_edit_option_related = function(player, table_click_result, "Use the edit options or dialog menu to change the target dialog.]".. "button[1.5,1.5;2,0.9;back_from_cannot_be_edited;Back]" end + if( id_prefix == "p_" and e[ "p_type" ] == "item") then + -- the staff-based item precondition can be translated to an editable + -- inventory precondition which is equal + e[ "p_type" ] = "player_inv" + e[ "p_itemstack" ] = e[ "p_value"] + e[ "p_value" ] = "inv_contains" + end + data.what = table.indexof(values_what, e[ id_prefix.."type" ]) if(data.what == -1) then data.what = 1