Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deconstruct simple furniture in the dark #77165

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading