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 flu shot expire #40407

Merged
merged 6 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/json/items/comestibles/med.json
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@
"type": "COMESTIBLE",
"comestible_type": "MED",
"name": "flu shot",
"description": "Pharmaceutical flu shot designed for mass vaccinations, still in the packaging. Purported to provide immunity to influenza.",
"description": "Pharmaceutical flu shot designed for mass vaccinations, still in the packaging. Purported to provide immunity to influenza, for the flu season for which it was developed.",
"weight": "12 g",
"volume": "10ml",
"price": 5000,
Expand Down
2 changes: 1 addition & 1 deletion data/json/npcs/tacoma_ranch/NPC_ranch_nurse.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
"item": "emergency_book",
"start": "ranch_nurse_8",
"origins": [ "ORIGIN_SECONDARY" ],
"followup": "MISSION_RANCH_NURSE_10",
"followup": "MISSION_RANCH_NURSE_11",
"dialogue": {
"describe": "We need help…",
"offer": "Have you heard of a book called the 'Guide to Advanced Emergency Care?' I really need a copy. The doctor is requesting a lot of supplies that I'm not familiar with but I believe I could make if I could get a copy of the book.",
Expand Down
12 changes: 10 additions & 2 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -834,8 +834,16 @@ int iuse::vaccine( player *p, item *it, bool, const tripoint & )
int iuse::flu_vaccine( player *p, item *it, bool, const tripoint & )
{
p->add_msg_if_player( _( "You inject the vaccine." ) );
p->add_msg_if_player( m_good, _( "You no longer need to fear the flu, at least for some time." ) );
p->add_effect( effect_flushot, 24_weeks, num_bp, false );
time_point expiration_date = calendar::start_of_cataclysm + 24_weeks;
time_duration remaining_time = expiration_date - calendar::turn;
// FIXME Removing feedback and visible status would be more realistic
if( remaining_time > 0_turns ) {
p->add_msg_if_player( m_good, _( "You no longer need to fear the flu, at least for some time." ) );
p->add_effect( effect_flushot, remaining_time, num_bp, false );
} else {
p->add_msg_if_player( m_bad,
_( "You notice the date on the packaging is pretty old. It may no longer be effective." ) );
}
p->mod_pain( 3 );
item syringe( "syringe", it->birthday() );
p->i_add( syringe );
Expand Down