Skip to content

Commit

Permalink
Deconstruct simple furniture in the dark (#77165)
Browse files Browse the repository at this point in the history
  • Loading branch information
sparr authored Oct 21, 2024
1 parent 574da5f commit d5b7e72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/construction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" );

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit d5b7e72

Please sign in to comment.