From a90be6318d738f3736d7b1be2a09797d36b93d16 Mon Sep 17 00:00:00 2001 From: Fris0uman <41293484+Fris0uman@users.noreply.github.com> Date: Mon, 30 Sep 2019 19:59:14 +0200 Subject: [PATCH] Can't manual install filthy/fauly/non sterile bionic (#34334) * can't manual install filthy/fauly/non sterile bionic * Update src/iuse_actor.cpp Co-Authored-By: Anton Burmistrov --- src/iuse_actor.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/iuse_actor.cpp b/src/iuse_actor.cpp index d0de5517c59d7..da0ff9f5fdf6e 100644 --- a/src/iuse_actor.cpp +++ b/src/iuse_actor.cpp @@ -4081,6 +4081,15 @@ ret_val install_bionic_actor::can_use( const player &p, const item &it, bo if( !get_option( "MANUAL_BIONIC_INSTALLATION" ) && !p.has_trait( trait_id( "DEBUG_BIONICS" ) ) ) { return ret_val::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::make_failure( _( "You can't install a filthy CBM!" ) ); + } else if( it.has_flag( "NO_STERILE" ) ) { + return ret_val::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::make_failure( + _( "This CBM is already deployed. You need to reset it to factory state." ) ); + } } const bionic_id &bid = it.type->bionic->id;