From 2cfbfe3b765e6bafe5bf40950643814c006e5659 Mon Sep 17 00:00:00 2001 From: Valiant Date: Fri, 18 Oct 2024 19:42:08 +0400 Subject: [PATCH] Added check for stealing prior to unloading containers --- src/inventory_ui.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/inventory_ui.cpp b/src/inventory_ui.cpp index 4b1b225026df0..3a5e6cb50cdfc 100644 --- a/src/inventory_ui.cpp +++ b/src/inventory_ui.cpp @@ -4517,6 +4517,10 @@ std::pair unload_selector::execute() } else if( input.action == "CONFIRM" ) { const inventory_entry &highlighted = get_active_column().get_highlighted(); if( highlighted && highlighted.is_selectable() ) { + item to_unload = *highlighted.any_item(); + if( !avatar_action::check_stealing( get_player_character(), to_unload ) ) { + return { item_location(), uistate.unload_auto_contain }; + } return { highlighted.any_item(), uistate.unload_auto_contain }; } } else if( input.action == "CONTAIN_MODE" ) {