Skip to content

Commit

Permalink
List Items: add FORGET_ALL_ITEMS to debug menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Brambor committed May 1, 2024
1 parent 58e7841 commit 08c65bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/debug_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
#include "try_parse_integer.h"
#include "type_id.h"
#include "ui.h"
#include "uistate.h"
#include "ui_manager.h"
#include "units.h"
#include "units_utility.h"
Expand Down Expand Up @@ -191,6 +192,7 @@ std::string enum_to_string<debug_menu::debug_menu_index>( debug_menu::debug_menu
case debug_menu::debug_menu_index::LEARN_MA: return "LEARN_MA";
case debug_menu::debug_menu_index::UNLOCK_RECIPES: return "UNLOCK_RECIPES";
case debug_menu::debug_menu_index::FORGET_ALL_RECIPES: return "FORGET_ALL_RECIPES";
case debug_menu::debug_menu_index::FORGET_ALL_ITEMS: return "FORGET_ALL_ITEMS";
case debug_menu::debug_menu_index::EDIT_PLAYER: return "EDIT_PLAYER";
case debug_menu::debug_menu_index::CONTROL_NPC: return "CONTROL_NPC";
case debug_menu::debug_menu_index::SPAWN_ARTIFACT: return "SPAWN_ARTIFACT";
Expand Down Expand Up @@ -454,6 +456,7 @@ static int player_uilist()
{ uilist_entry( debug_menu_index::LEARN_MA, true, 'l', _( "Learn all melee styles" ) ) },
{ uilist_entry( debug_menu_index::UNLOCK_RECIPES, true, 'r', _( "Unlock all recipes" ) ) },
{ uilist_entry( debug_menu_index::FORGET_ALL_RECIPES, true, 'f', _( "Forget all recipes" ) ) },
{ uilist_entry( debug_menu_index::FORGET_ALL_ITEMS, true, 'F', _( "Forget all items" ) ) },
{ uilist_entry( debug_menu_index::EDIT_PLAYER, true, 'p', _( "Edit player/NPC" ) ) },
{ uilist_entry( debug_menu_index::DAMAGE_SELF, true, 'd', _( "Damage self" ) ) },
{ uilist_entry( debug_menu_index::BLEED_SELF, true, 'b', _( "Bleed self" ) ) },
Expand Down Expand Up @@ -3057,6 +3060,13 @@ void debug()
}
break;

case debug_menu_index::FORGET_ALL_ITEMS: {
add_msg( m_info, _( "Recipe debug: forget items." ) );
uistate.read_items.clear();
add_msg( m_bad, _( "You don't know about any items anymore." ) );
}
break;

case debug_menu_index::EDIT_PLAYER:
character_edit_menu();
break;
Expand Down
1 change: 1 addition & 0 deletions src/debug_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ enum class debug_menu_index : int {
LEARN_MA,
UNLOCK_RECIPES,
FORGET_ALL_RECIPES,
FORGET_ALL_ITEMS,
UNLOCK_ALL,
EDIT_PLAYER,
CONTROL_NPC,
Expand Down

0 comments on commit 08c65bf

Please sign in to comment.