diff options
author | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2025-01-18 21:46:00 -0800 |
---|---|---|
committer | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2025-01-18 21:46:00 -0800 |
commit | 7e224c97ae2728472180322f625dafa545f21f7f (patch) | |
tree | 61a296000b3a05d36cde4de0d8bd5e5179ee21ab /src-01_radio-can-use-ups.patch | |
parent | Add plastic scrap is stackable patch. (diff) | |
download | cataclysm-bn-7e224c97ae2728472180322f625dafa545f21f7f.tar.xz |
Diffstat (limited to 'src-01_radio-can-use-ups.patch')
-rw-r--r-- | src-01_radio-can-use-ups.patch | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src-01_radio-can-use-ups.patch b/src-01_radio-can-use-ups.patch deleted file mode 100644 index d75e8dc..0000000 --- a/src-01_radio-can-use-ups.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/src/iuse.cpp -+++ b/src/iuse.cpp -@@ -2205,7 +2206,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" ) - } ); -@@ -4074,7 +4076,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( itype_shocktonfa_off ); - it->active = false; -@@ -4099,7 +4102,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( itype_mp3_on ) || p->has_active_item( itype_smartphone_music ) || - p->has_active_item( itype_afs_atomic_smartphone_music ) || -@@ -6366,9 +6370,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. |