Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed formula for character strength required to install something in a vehicle #22980

Merged

Conversation

Projects
None yet
3 participants
@Night-Pryanik
Copy link
Member

commented Feb 18, 2018

If item weight is less than 10 kilograms, then required strength is 1. Else - 1 strength per 10 kilograms (based on comment for STR_LIFT_FACTOR (now deleted) from `game_constants.h).

Before: 300-kg V12 engine can be installed by a weakling with only 6 strength.
After: 300-kg V12 engine requires a 30-strength superhuman to install.

Night-Pryanik added some commits Feb 18, 2018

Changed formula for character strength required to lift something
If item weight is less than 10 kilograms, then strength required is 1. Else - 1 strength per 10 kilograms.
@AMurkin

This comment has been minimized.

Copy link
Contributor

commented Feb 18, 2018

Why not weight() <= 10000_gram for conditional part?

@AMurkin

This comment has been minimized.

Copy link
Contributor

commented Feb 18, 2018

Or even better: return std::max( weight() / 10000_gram, 1 );

@AMurkin

This comment has been minimized.

Copy link
Contributor

commented Feb 18, 2018

Question: why not change STR_LIFT_FACTOR value?
Than only one usage of STR_LIFT_FACTOR left: in item::lift_strength().

@Night-Pryanik

This comment has been minimized.

Copy link
Member Author

commented Feb 18, 2018

Why not change STR_LIFT_FACTOR value?

It's meant to be constant. We probably should get rid of it.

Night-Pryanik added some commits Feb 18, 2018

@kevingranade kevingranade merged commit 19ee7ad into CleverRaven:master Mar 1, 2018

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.07%) to 23.502%
Details
gorgon-ghprb Build finished.
Details

@Night-Pryanik Night-Pryanik deleted the Night-Pryanik:fix-str-required-for-lift branch Mar 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.