diff --git a/data/json/effects.json b/data/json/effects.json index 803519e8a804..e9dc732384c0 100644 --- a/data/json/effects.json +++ b/data/json/effects.json @@ -807,12 +807,13 @@ "type": "effect_type", "id": "bandaged", "name": [ "Bandaged" ], - "desc": [ "Your wounds are bandaged." ], + "desc": [ "The wounds on your %s are bandaged." ], "main_parts_only": true, "rating": "good", "int_dur_factor": "6 h", "max_intensity": 16, "max_effective_intensity": 8, + "part_descs": true, "max_duration": "4 d", "base_mods": { "healing_rate": [ 2 ], "healing_head": [ 50 ], "healing_torso": [ 150 ] }, "scaling_mods": { "healing_rate": [ 2 ] } @@ -821,12 +822,13 @@ "type": "effect_type", "id": "disinfected", "name": [ "Disinfected" ], - "desc": [ "Your wounds are disinfected." ], + "desc": [ "The wounds on your %s are disinfected." ], "main_parts_only": true, "rating": "good", "int_dur_factor": "6 h", "max_intensity": 16, "max_effective_intensity": 8, + "part_descs": true, "max_duration": "4 d", "base_mods": { "healing_rate": [ 2 ], "healing_head": [ 50 ], "healing_torso": [ 150 ] }, "scaling_mods": { "healing_rate": [ 2 ] } diff --git a/data/raw/keybindings.json b/data/raw/keybindings.json index 9a2ed19cc0be..01ab3c84f7d5 100644 --- a/data/raw/keybindings.json +++ b/data/raw/keybindings.json @@ -2006,7 +2006,7 @@ }, { "type": "keybinding", - "name": "Toggle Panel Admin", + "name": "Sidebar Options", "category": "DEFAULTMODE", "id": "toggle_panel_adm", "bindings": [ { "input_method": "keyboard", "key": "}" } ] diff --git a/src/crafting_gui.cpp b/src/crafting_gui.cpp index 4751f5694df2..5de44f2ff54a 100644 --- a/src/crafting_gui.cpp +++ b/src/crafting_gui.cpp @@ -598,7 +598,7 @@ const recipe *select_crafting_recipe( int &batch_size ) if( batch ) { current.clear(); - for( int i = 1; i <= 20; i++ ) { + for( int i = 1; i <= 50; i++ ) { current.push_back( chosen ); available.push_back( availability( chosen, i ) ); } @@ -822,9 +822,9 @@ const recipe *select_crafting_recipe( int &batch_size ) std::string description = _( "The default is to search result names. Some single-character prefixes " - "can be used with a colon (:) to search in other ways. Additional filters " - "are separated by commas (,).\n" - "\n" + "can be used with a colon : to search in other ways. Additional filters " + "are separated by commas ,.\n" + "\n\n" "Examples:\n" ); { @@ -844,7 +844,8 @@ const recipe *select_crafting_recipe( int &batch_size ) } description += - _( "\nYou can use arrow keys to go through search history\n\n" ); + _( "\nUse up/down arrow to go through your search history." ); + description += "\n\n\n"; string_input_popup() .title( _( "Search:" ) ) diff --git a/src/debug_menu.cpp b/src/debug_menu.cpp index 2abc46558d39..7556a02fef0b 100644 --- a/src/debug_menu.cpp +++ b/src/debug_menu.cpp @@ -134,6 +134,7 @@ enum debug_menu_index { DEBUG_CHANGE_WEATHER, DEBUG_WIND_DIRECTION, DEBUG_WIND_SPEED, + DEBUG_GEN_SOUND, DEBUG_KILL_MONS, DEBUG_DISPLAY_HORDES, DEBUG_TEST_IT_GROUP, @@ -298,6 +299,7 @@ static int map_uilist() { uilist_entry( DEBUG_CHANGE_WEATHER, true, 'w', _( "Change weather" ) ) }, { uilist_entry( DEBUG_WIND_DIRECTION, true, 'd', _( "Change wind direction" ) ) }, { uilist_entry( DEBUG_WIND_SPEED, true, 's', _( "Change wind speed" ) ) }, + { uilist_entry( DEBUG_GEN_SOUND, true, 'S', _( "Generate sound" ) ) }, { uilist_entry( DEBUG_KILL_MONS, true, 'K', _( "Kill all monsters" ) ) }, { uilist_entry( DEBUG_CHANGE_TIME, true, 't', _( "Change time" ) ) }, { uilist_entry( DEBUG_OM_EDITOR, true, 'O', _( "Overmap editor" ) ) }, @@ -1487,6 +1489,26 @@ void debug() } break; + case DEBUG_GEN_SOUND: { + const cata::optional where = g->look_around(); + if( !where ) { + return; + } + + int volume; + if( !query_int( volume, _( "Volume of sound: " ) ) ) { + return; + } + + if( volume < 0 ) { + return; + } + + sounds::sound( *where, volume, sounds::sound_t::order, string_format( _( "DEBUG SOUND ( %d )" ), + volume ) ); + } + break; + case DEBUG_KILL_MONS: { for( monster &critter : g->all_monsters() ) { // Use the normal death functions, useful for testing death diff --git a/src/handle_action.cpp b/src/handle_action.cpp index 623b79306667..7e47415f38bf 100644 --- a/src/handle_action.cpp +++ b/src/handle_action.cpp @@ -919,7 +919,7 @@ static void wait() actType = ACT_WAIT; } - player_activity new_act( actType, 100 * ( to_turns( time_to_wait ) - 1 ), 0 ); + player_activity new_act( actType, 100 * ( to_turns( time_to_wait ) ), 0 ); u.assign_activity( new_act, false ); } diff --git a/src/inventory_ui.cpp b/src/inventory_ui.cpp index 6bc7f0652b58..b2a0b96f50a8 100644 --- a/src/inventory_ui.cpp +++ b/src/inventory_ui.cpp @@ -686,9 +686,9 @@ void inventory_column::on_input( const inventory_input &input ) move_selection( scroll_direction::FORWARD ); } else if( input.action == "UP" ) { move_selection( scroll_direction::BACKWARD ); - } else if( input.action == "NEXT_TAB" ) { + } else if( input.action == "PAGE_DOWN" ) { move_selection_page( scroll_direction::FORWARD ); - } else if( input.action == "PREV_TAB" ) { + } else if( input.action == "PAGE_UP" ) { move_selection_page( scroll_direction::BACKWARD ); } else if( input.action == "HOME" ) { select( 0, scroll_direction::FORWARD ); @@ -1690,14 +1690,14 @@ inventory_selector::inventory_selector( player &u, const inventory_selector_pres { ctxt.register_action( "DOWN", to_translation( "Next item" ) ); ctxt.register_action( "UP", to_translation( "Previous item" ) ); + ctxt.register_action( "PAGE_DOWN", to_translation( "Page down" ) ); + ctxt.register_action( "PAGE_UP", to_translation( "Page up" ) ); ctxt.register_action( "RIGHT", to_translation( "Next column" ) ); ctxt.register_action( "LEFT", to_translation( "Previous column" ) ); ctxt.register_action( "CONFIRM", to_translation( "Confirm your selection" ) ); ctxt.register_action( "QUIT", to_translation( "Cancel" ) ); - ctxt.register_action( "CATEGORY_SELECTION", to_translation( "Switch selection mode" ) ); + ctxt.register_action( "CATEGORY_SELECTION", to_translation( "Switch category selection mode" ) ); ctxt.register_action( "TOGGLE_FAVORITE", to_translation( "Toggle favorite" ) ); - ctxt.register_action( "NEXT_TAB", to_translation( "Page down" ) ); - ctxt.register_action( "PREV_TAB", to_translation( "Page up" ) ); ctxt.register_action( "HOME", to_translation( "Home" ) ); ctxt.register_action( "END", to_translation( "End" ) ); ctxt.register_action( "HELP_KEYBINDINGS" ); diff --git a/src/mapbuffer.cpp b/src/mapbuffer.cpp index 55bc4899e959..5f46649da810 100644 --- a/src/mapbuffer.cpp +++ b/src/mapbuffer.cpp @@ -117,16 +117,18 @@ void mapbuffer::save( bool delete_after_save ) // A set of already-saved submaps, in global overmap coordinates. std::set saved_submaps; std::list submaps_to_delete; - int next_report = 0; + static constexpr std::chrono::milliseconds update_interval( 500 ); + auto last_update = std::chrono::steady_clock::now(); + for( auto &elem : submaps ) { - if( num_total_submaps > 100 && num_saved_submaps >= next_report ) { + auto now = std::chrono::steady_clock::now(); + if( last_update + update_interval < now ) { popup.message( _( "Please wait as the map saves [%d/%d]" ), num_saved_submaps, num_total_submaps ); ui_manager::redraw(); refresh_display(); - next_report += std::max( 100, num_total_submaps / 20 ); + last_update = now; } - // Whatever the coordinates of the current submap are, // we're saving a 2x2 quad of submaps at a time. // Submaps are generated in quads, so we know if we have one member of a quad, diff --git a/src/sdl_font.cpp b/src/sdl_font.cpp index 5b1f3f5d577e..1871dd39bae9 100644 --- a/src/sdl_font.cpp +++ b/src/sdl_font.cpp @@ -190,7 +190,7 @@ CachedTTFFont::CachedTTFFont( { int faceIndex = 0; std::vector typefaces; - std::vector known_suffixes = { ".ttf", ".fon" }; + std::vector known_suffixes = { ".ttf", ".otf", ".ttc", ".fon" }; bool add_suffix = true; for( const std::string &ks : known_suffixes ) { if( string_ends_with( typeface, ks ) ) { @@ -249,7 +249,7 @@ CachedTTFFont::CachedTTFFont( typefaces.emplace_back( typeface + ( add_suffix ? ks : "" ) ); } } - if( typefaces.empty() ) { + if( add_suffix ) { typefaces.emplace_back( typeface ); } ensure_unifont_loaded( typefaces );