From ab04b11988ee2d4e3ca268164da2ceaf7057f568 Mon Sep 17 00:00:00 2001 From: eJ0opb Date: Sat, 9 May 2020 23:30:24 -0400 Subject: [PATCH 1/6] Make flu shot expire Nobody is developing new vaccines; you can't just stock up on flu shots and take one every 6 months. --- src/iuse.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/iuse.cpp b/src/iuse.cpp index 8ad6c02315c05..153a83fd43130 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -834,8 +834,12 @@ 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; + 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 ); + } p->mod_pain( 3 ); item syringe( "syringe", it->birthday() ); p->i_add( syringe ); From 50f3b150e87c400399e8731dfa97111a3d41643f Mon Sep 17 00:00:00 2001 From: eJ0opb Date: Sun, 10 May 2020 13:27:21 -0400 Subject: [PATCH 2/6] Skip flu shot mission It doesn't make sense anymore unless this mission is given with 24 weeks of the start of the cataclysm, which is when flu shots expire. If you already started this mission chain, you will still get the mission. --- data/json/npcs/tacoma_ranch/NPC_ranch_nurse.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/npcs/tacoma_ranch/NPC_ranch_nurse.json b/data/json/npcs/tacoma_ranch/NPC_ranch_nurse.json index 96ceffbc8bf19..b20c25c6d1cf6 100644 --- a/data/json/npcs/tacoma_ranch/NPC_ranch_nurse.json +++ b/data/json/npcs/tacoma_ranch/NPC_ranch_nurse.json @@ -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.", From d2fbbe400fca04fe0c90e706f025cdba4645f42f Mon Sep 17 00:00:00 2001 From: eJ0opb Date: Sun, 10 May 2020 13:44:34 -0400 Subject: [PATCH 3/6] Add negative feedback to expired flu shot This is for the benefit of experienced players who are used to unlimited flu vaccines. More realistic would be to have no feedback, positive or negative. Also, update the description, to hint to the player that it will not work forever. --- data/json/items/comestibles/med.json | 2 +- src/iuse.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json index 4dda480cfa35e..520434fcab50c 100644 --- a/data/json/items/comestibles/med.json +++ b/data/json/items/comestibles/med.json @@ -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, diff --git a/src/iuse.cpp b/src/iuse.cpp index 153a83fd43130..84b50c4b73cd8 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -836,9 +836,12 @@ int iuse::flu_vaccine( player *p, item *it, bool, const tripoint & ) p->add_msg_if_player( _( "You inject the vaccine." ) ); 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() ); From e511ada8811b2627ad4c482f6303991f887d9e1a Mon Sep 17 00:00:00 2001 From: eJ0opb Date: Sun, 10 May 2020 13:53:08 -0400 Subject: [PATCH 4/6] white space police --- src/iuse.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/iuse.cpp b/src/iuse.cpp index 84b50c4b73cd8..1444107ccb743 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -9114,7 +9114,8 @@ int iuse::cable_attach( player *p, item *it, bool, const tripoint & ) vehicle *const source_veh = veh_pointer_or_null( source_vp ); if( detach_if_missing && source_veh == nullptr ) { if( p != nullptr && p->has_item( *it ) ) { - p->add_msg_if_player( m_bad, _( "You notice the cable has come loose!" ) ); + p->add_msg_if_player( m_bad, + _( "You notice the cable has come loose!" ) ); } it->reset_cable( p ); } From bdd27b76c3afd90087c338180e917437975e3dc0 Mon Sep 17 00:00:00 2001 From: eJ0opb Date: Sun, 10 May 2020 14:07:45 -0400 Subject: [PATCH 5/6] white space police take 2 --- src/iuse.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/iuse.cpp b/src/iuse.cpp index 1444107ccb743..39971a1ae1e2b 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -841,7 +841,8 @@ int iuse::flu_vaccine( player *p, item *it, bool, const tripoint & ) 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->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() ); From 133337e62d9101e1bdf5105fdec7e3c82e5c094f Mon Sep 17 00:00:00 2001 From: eJ0opb Date: Sun, 10 May 2020 14:12:20 -0400 Subject: [PATCH 6/6] Revert "white space police" This reverts commit e511ada8811b2627ad4c482f6303991f887d9e1a. --- src/iuse.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/iuse.cpp b/src/iuse.cpp index 39971a1ae1e2b..2ca64518631e7 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -9115,8 +9115,7 @@ int iuse::cable_attach( player *p, item *it, bool, const tripoint & ) vehicle *const source_veh = veh_pointer_or_null( source_vp ); if( detach_if_missing && source_veh == nullptr ) { if( p != nullptr && p->has_item( *it ) ) { - p->add_msg_if_player( m_bad, - _( "You notice the cable has come loose!" ) ); + p->add_msg_if_player( m_bad, _( "You notice the cable has come loose!" ) ); } it->reset_cable( p ); }