Skip to content

Commit

Permalink
Warn of loss of folding
Browse files Browse the repository at this point in the history
  • Loading branch information
AMurkin committed Jun 20, 2019
1 parent 0f5bd17 commit f3f5e64
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/veh_interact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,10 @@ bool veh_interact::do_install( std::string &msg )
}
if( action == "INSTALL" || action == "CONFIRM" ) {
if( can_install ) {
if( veh->is_foldable() && !sel_vpart_info->has_flag( "FOLDABLE" ) &&
!query_yn( _( "%s is not foldable. Continue?" ), sel_vpart_info->name() ) ) {
return false;
}
const auto &shapes = vpart_shapes[ sel_vpart_info->name() + sel_vpart_info->item ];
int selected_shape = -1;
if( shapes.size() > 1 ) { // more than one shape available, display selection
Expand Down

0 comments on commit f3f5e64

Please sign in to comment.