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

Replace chop logs construction with long action #22939

Merged
merged 2 commits into from Feb 16, 2018

Conversation

Projects
None yet
4 participants
@boydkr
Copy link
Contributor

commented Feb 14, 2018

Builds on #22730, moving forestry actions to items instead of construction.

Fixes #22931

Time required to chop down a tree depends on tool quality and player's strength:

  • character with 10 str and an axe with tree-cutting 2 will take an hour
  • takes twice as long to chop logs as to cut down the tree (generates 2-3 logs)

@boydkr boydkr force-pushed the boydkr:chop-logs-action branch to 09e6aa3 Feb 15, 2018

const ter_id ter = g->m.ter( dirp );
if( ter == t_trunk ) {
/** @EFFECT_STR reduces time required to chop down a tree */
moves = MINUTES( 70 - p->str_cur ) * 2 / it->get_quality( AXE ) * 100;

This comment has been minimized.

Copy link
@boydkr

boydkr Feb 15, 2018

Author Contributor

I think this equation (used here and in chop_tree) could use some balance love.

Strength has a tiny effect (1 minute per cut for each strength). Quality has a massive effect. It could also probably use some randomness to simulate different sized trees

This comment has been minimized.

Copy link
@Night-Pryanik

Night-Pryanik Feb 15, 2018

Member

Do you have something exact in mind?

This comment has been minimized.

Copy link
@kevingranade

kevingranade Feb 16, 2018

Member

Maybe move strength to the denominator, something like:
MINUTES( 70 ) / ( ( it->get_quality( AXE ) * 10) + p->str_cur );

@boydkr boydkr changed the title [WIP] Replace chop logs construction with long action Replace chop logs construction with long action Feb 15, 2018

@Night-Pryanik

This comment has been minimized.

Copy link
Member

commented Feb 15, 2018

You can also add do_turn function to handle messages appearing during the process describing how much time the process will take.

@boydkr

This comment has been minimized.

Copy link
Contributor Author

commented Feb 15, 2018

It reuses the do_turn for tree chopping. It seemed appropriate

@smolbird

This comment has been minimized.

Copy link
Contributor

commented Feb 15, 2018

Competes with #22933

void activity_handlers::chop_logs_finish( player_activity *act, player *p ) {
const tripoint &pos = act->placement;

g->m.ter_set( pos, t_dirt );

This comment has been minimized.

Copy link
@kevingranade

kevingranade Feb 16, 2018

Member

Not necessary here, but just realized it'd be neat to have a stump item here, might even be useful, it could have the flag for resting a longarm on.

@kevingranade kevingranade merged commit 09e6aa3 into CleverRaven:master Feb 16, 2018

2 of 3 checks passed

gorgon-ghprb Build triggered. sha1 is merged.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 23.348%
Details
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.