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

Make shaving/haircut interruptable #24384

Merged
merged 3 commits into from Jul 20, 2018

Conversation

Projects
None yet
4 participants
@lucasmr
Copy link
Contributor

commented Jul 20, 2018

Fixes #24295. Moves haircut and shaving to new activity handlers. This way, these actions can be interrupted by approaching enemies.

@lucasmr lucasmr closed this Jul 20, 2018

@lucasmr lucasmr force-pushed the lucasmr:interrupt_shaving branch to d51b80a Jul 20, 2018

@lucasmr lucasmr reopened this Jul 20, 2018

@lucasmr lucasmr force-pushed the lucasmr:interrupt_shaving branch to d4e1bb7 Jul 20, 2018

Make shaving/trimming interruptable
Moves shaving and trimming to new activity handlers. This way, these actions can be interrupted if an enemy approaches.
p->add_msg_if_player( _( "You open up your kit and shave." ) );
p->moves -= 3000;
p->add_morale( MORALE_SHAVE, 8, 8, 240_minutes, 3_minutes );
p->assign_activity( activity_id( "ACT_SHAVE" ), 3000);

This comment has been minimized.

Copy link
@ZhilkinSerg

ZhilkinSerg Jul 20, 2018

Contributor

Whitespace is missing after 3000.

p->add_msg_if_player( _( "You give your hair a trim." ) );
p->moves -= 3000;
p->add_morale( MORALE_HAIRCUT, 3, 3, 480_minutes, 3_minutes );
p->assign_activity( activity_id( "ACT_HAIRCUT" ), 3000);

This comment has been minimized.

Copy link
@ZhilkinSerg

ZhilkinSerg Jul 20, 2018

Contributor

Missing whitespace after 3000 here too.

"type": "activity_type",
"stop_phrase": "Stop cutting your hair?",
"based_on": "speed"
}

This comment has been minimized.

Copy link
@Night-Pryanik

Night-Pryanik Jul 20, 2018

Member

There should be 2 spaces instead of 3.

@ZhilkinSerg ZhilkinSerg self-assigned this Jul 20, 2018

@ZhilkinSerg ZhilkinSerg merged commit 387a304 into CleverRaven:master Jul 20, 2018

4 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.2%) to 23.045%
Details
gorgon-ghprb Build finished.
Details

@ZhilkinSerg ZhilkinSerg removed their assignment Jul 20, 2018

@lucasmr lucasmr deleted the lucasmr:interrupt_shaving branch Jul 21, 2018

@kevingranade

This comment has been minimized.

Copy link
Member

commented Dec 4, 2018

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/cs-students-looking-to-fix-issue-23440/17737/4

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.