Skip to content

Commit

Permalink
Can't manual install filthy/fauly/non sterile bionic (#34334)
Browse files Browse the repository at this point in the history
* can't manual install filthy/fauly/non sterile bionic

* Update src/iuse_actor.cpp

Co-Authored-By: Anton Burmistrov <Night_Pryanik@mail.ru>
  • Loading branch information
2 people authored and ZhilkinSerg committed Sep 30, 2019
1 parent c9b2d41 commit a90be63
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/iuse_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4081,6 +4081,15 @@ ret_val<bool> install_bionic_actor::can_use( const player &p, const item &it, bo
if( !get_option<bool>( "MANUAL_BIONIC_INSTALLATION" ) &&
!p.has_trait( trait_id( "DEBUG_BIONICS" ) ) ) {
return ret_val<bool>::make_failure( _( "You can't self-install bionics." ) );
} else if( !p.has_trait( trait_id( "DEBUG_BIONICS" ) ) ) {
if( it.has_flag( "FILTHY" ) ) {
return ret_val<bool>::make_failure( _( "You can't install a filthy CBM!" ) );
} else if( it.has_flag( "NO_STERILE" ) ) {
return ret_val<bool>::make_failure( _( "This CBM is not sterile, you can't install it." ) );
} else if( it.has_fault( fault_id( "fault_bionic_salvaged" ) ) ) {
return ret_val<bool>::make_failure(
_( "This CBM is already deployed. You need to reset it to factory state." ) );
}
}

const bionic_id &bid = it.type->bionic->id;
Expand Down

0 comments on commit a90be63

Please sign in to comment.