diff options
author | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2021-10-29 18:01:32 -0700 |
---|---|---|
committer | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2021-10-29 18:01:32 -0700 |
commit | 444181f77cb649760c3099d9b96c8f863a8f8ddf (patch) | |
tree | 3e9e1e8c44a208c342fc919de1a24081739db884 /0.F_backport-radio-can-use-ups.patch | |
parent | Fix .50bmg ammo ordering (diff) | |
download | cataclysm-bn-444181f77cb649760c3099d9b96c8f863a8f8ddf.tar.xz |
Updated to 2021-10-29-1727
Reorganize patches into categories.
Add patch to allow followers to eat from the basecamp stocks from farther away.
-Reduces NPCs being prone to starve on large camps.
Temporarily revert the book changes commit.
Diffstat (limited to '0.F_backport-radio-can-use-ups.patch')
-rw-r--r-- | 0.F_backport-radio-can-use-ups.patch | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/0.F_backport-radio-can-use-ups.patch b/0.F_backport-radio-can-use-ups.patch deleted file mode 100644 index ee146e5..0000000 --- a/0.F_backport-radio-can-use-ups.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- a/src/iuse.cpp -+++ b/src/iuse.cpp -@@ -289,6 +289,7 @@ - static const std::string flag_HEATS_FOOD( "HEATS_FOOD" ); - static const std::string flag_PLANT( "PLANT" ); - static const std::string flag_PLOWABLE( "PLOWABLE" ); -+static const std::string flag_USE_UPS( "USE_UPS" ); - - // how many characters per turn of radio - static constexpr int RADIO_PER_TURN = 25; -@@ -2162,7 +2163,8 @@ - } - } else { // Activated - int ch = 1; -- if( it->ammo_remaining() > 0 ) { -+ if( it->ammo_remaining() > 0 || ( it->has_flag( flag_USE_UPS ) && -+ p->has_enough_charges( *it, false ) ) ) { - ch = uilist( _( "Radio:" ), { - _( "Scan" ), _( "Turn off" ) - } ); -@@ -4082,7 +4084,8 @@ - if( t ) { // Effects while simply on - - } else { -- if( !it->units_sufficient( *p ) ) { -+ if( !it->units_sufficient( *p ) || !( it->has_flag( flag_USE_UPS ) && -+ p->has_enough_charges( *it, false ) ) ) { - p->add_msg_if_player( m_info, _( "Your tactical tonfa is out of power." ) ); - it->convert( "shocktonfa_off" ).active = false; - } else { -@@ -4107,7 +4110,8 @@ - int iuse::mp3( player *p, item *it, bool, const tripoint & ) - { - // TODO: avoid item id hardcoding to make this function usable for pure json-defined devices. -- if( !it->units_sufficient( *p ) ) { -+ if( !it->units_sufficient( *p ) || !( it->has_flag( flag_USE_UPS ) && -+ p->has_enough_charges( *it, false ) ) ) { - p->add_msg_if_player( m_info, _( "The device's batteries are dead." ) ); - } else if( p->has_active_item( "mp3_on" ) || p->has_active_item( "smartphone_music" ) || - p->has_active_item( "afs_atomic_smartphone_music" ) || -@@ -6367,9 +6371,12 @@ - int iuse::einktabletpc( player *p, item *it, bool t, const tripoint &pos ) - { - if( t ) { -- if( !it->get_var( "EIPC_MUSIC_ON" ).empty() && ( it->ammo_remaining() > 0 ) ) { -+ if( !it->get_var( "EIPC_MUSIC_ON" ).empty() && -+ ( it->ammo_remaining() > 0 || ( it->has_flag( flag_USE_UPS ) && -+ p->has_enough_charges( *it, false ) ) ) ) { - if( calendar::once_every( 5_minutes ) ) { -- it->ammo_consume( 1, p->pos() ); -+ //it->ammo_consume( 1, p->pos() ); -+ p->consume_charges( *it, 1 ); - } - - //the more varied music, the better max mood. |