Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upMore ways that can negate the check for painkillers when installing CBMs #21433
Conversation
This comment has been minimized.
This comment has been minimized.
|
Regular masochist is a 1 point trait that gives minor (up to 20 or so) morale. It would be unlikely to negate even a single point of the intelligence loss from pain. |
Coolthulhu
reviewed
Jul 17, 2017
src/bionics.cpp
Outdated
| if( !has_trait( trait_id( "NOPAIN" ) ) && !has_trait( trait_id( "CENOBITE" ) ) ) { | ||
| if( !has_trait( trait_id( "NOPAIN" ) ) && !has_trait( trait_id( "CENOBITE" ) ) && | ||
| !has_trait( trait_id( "MASOCHIST" ) ) && !has_trait( trait_id( "MASOCHIST_MED" ) ) && | ||
| !has_active_bionic( "bio_painkiller" ) ) { |
This comment has been minimized.
This comment has been minimized.
Coolthulhu
Jul 17, 2017
Contributor
Since you don't actually trigger any pain effect, it shouldn't need to be active. Activating a bio_painkiller is not an action and costs nothing so it should be treated as if done automatically.
This comment has been minimized.
This comment has been minimized.
Coolthulhu
reviewed
Jul 17, 2017
src/bionics.cpp
Outdated
| @@ -971,13 +975,14 @@ bool player::install_bionics( const itype &type, int skill_level ) | |||
|
|
|||
| const int pk = get_painkiller(); | |||
| int pain_cap = 100; | |||
| if( has_trait( trait_id( "PAINRESIST_TROGLO" ) ) ) { | |||
| if( has_trait( "PAINRESIST_TROGLO" ) ) { | |||
This comment has been minimized.
This comment has been minimized.
Coolthulhu
Jul 17, 2017
Contributor
You want to use the constants above, like this:
has_trait( trait_PAINRESIST_TROGLO )
Night-Pryanik
added some commits
Jul 17, 2017
BorkBorkGoesTheCode
reviewed
Jul 18, 2017
| @@ -66,9 +66,13 @@ const efftype_id effect_took_xanax( "took_xanax" ); | |||
| const efftype_id effect_visuals( "visuals" ); | |||
| const efftype_id effect_weed_high( "weed_high" ); | |||
|
|
|||
| static const trait_id trait_HYPEROPIC( "HYPEROPIC" ); | |||
| static const trait_id trait_MYOPIC( "MYOPIC" ); | |||
| static const trait_id trait_PROF_MED( "PROF_MED" ); | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Night-Pryanik
Jul 18, 2017
Author
Member
These constants aren't used anywhere in bionics.cpp, so removing them shouldn't do any harm.
Night-Pryanik
referenced this pull request
Jul 21, 2017
Merged
Added more informative text when trying to install bionics depending on player's first aid skill #21458
kevingranade
merged commit 5d48512
into
CleverRaven:master
Jul 22, 2017
Night-Pryanik
deleted the
Night-Pryanik:more-ways-to-ignore-check-for-pks
branch
Jul 23, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Night-Pryanik commentedJul 17, 2017
No description provided.