diff --git a/src/bionics.cpp b/src/bionics.cpp index 4ec2ce39c3254..64c413d6ce957 100644 --- a/src/bionics.cpp +++ b/src/bionics.cpp @@ -2290,7 +2290,7 @@ bool Character::uninstall_bionic( const bionic &target_cbm, monster &installer, return false; } -bool Character::can_install_bionics( const itype &type, player &installer, bool autodoc, +bool Character::can_install_bionics( const itype &type, Character &installer, bool autodoc, int skill_level ) { if( !type.bionic ) { @@ -2306,7 +2306,7 @@ bool Character::can_install_bionics( const itype &type, player &installer, bool float adjusted_skill; // if we're doing self install - if( !autodoc ) { + if( !autodoc && installer.is_avatar() ) { return installer.has_enough_anesth( type ) && installer.has_installation_requirment( bioid ); } @@ -2393,7 +2393,6 @@ bool Character::install_bionics( const itype &type, player &installer, bool auto const int difficulty = type.bionic->difficulty; float adjusted_skill; int pl_skill; - if( autodoc ) { adjusted_skill = installer.bionics_adjusted_skill( skill_firstaid, skill_computer, diff --git a/src/character.h b/src/character.h index b6e9f2a53b089..8055254224f47 100644 --- a/src/character.h +++ b/src/character.h @@ -1073,7 +1073,7 @@ class Character : public Creature, public visitable const skill_id &least_important_skill, int skill_level = -1 ); /**Is the installation possible*/ - bool can_install_bionics( const itype &type, player &installer, bool autodoc = false, + bool can_install_bionics( const itype &type, Character &installer, bool autodoc = false, int skill_level = -1 ); std::map bionic_installation_issues( const bionic_id &bioid ); /** Initialize all the values needed to start the operation player_activity */