From 8b8d24cdb1126dc554b40ad247ed65be08deaeb5 Mon Sep 17 00:00:00 2001 From: "Clarence \"Sparr\" Risher" Date: Sat, 19 Oct 2024 12:35:09 -0400 Subject: [PATCH] Deconstruct simple furniture in the dark --- src/construction.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/construction.cpp b/src/construction.cpp index 02e73730a1307..7a26b1de0790a 100644 --- a/src/construction.cpp +++ b/src/construction.cpp @@ -83,8 +83,12 @@ static const construction_category_id construction_category_APPLIANCE( "APPLIANC static const construction_category_id construction_category_FILTER( "FILTER" ); static const construction_category_id construction_category_REPAIR( "REPAIR" ); +static const construction_group_str_id +construction_group_deconstruct_simple_furniture( "deconstruct_simple_furniture" ); + static const construction_str_id construction_constr_veh( "constr_veh" ); + static const flag_id json_flag_FILTHY( "FILTHY" ); static const flag_id json_flag_PIT( "PIT" ); @@ -1027,7 +1031,8 @@ construction_id construction_menu( const bool blueprint ) } if( !blueprint ) { if( player_can_build( player_character, total_inv, constructs[select] ) ) { - if( !player_can_see_to_build( player_character, constructs[select] ) ) { + if( constructs[select] != construction_group_deconstruct_simple_furniture && + !player_can_see_to_build( player_character, constructs[select] ) ) { add_msg( m_info, _( "It is too dark to construct right now." ) ); } else { draw_preview.reset();