record and replay z to show inventory
This commit is contained in:
@@ -1735,6 +1735,20 @@ void initiate_outdoor_combat(short i) {
|
||||
draw_terrain();
|
||||
}
|
||||
|
||||
void show_inventory() {
|
||||
if(recording){
|
||||
record_action("show_inventory", "");
|
||||
}
|
||||
if(is_combat()) {
|
||||
// Show active PC's inventory
|
||||
set_stat_window_for_pc(univ.cur_pc);
|
||||
put_item_screen(stat_window);
|
||||
} else {
|
||||
// TODO ... or first PC's inventory... why?
|
||||
set_stat_window(ITEM_WIN_PC1);
|
||||
put_item_screen(stat_window);
|
||||
}
|
||||
}
|
||||
bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){
|
||||
bool are_done = false;
|
||||
location pass_point; // TODO: This isn't needed
|
||||
@@ -1912,15 +1926,8 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){
|
||||
}
|
||||
print_buf();
|
||||
break;
|
||||
case 'z': // Show active PC's inventory
|
||||
if(is_combat()) {
|
||||
set_stat_window_for_pc(univ.cur_pc);
|
||||
put_item_screen(stat_window);
|
||||
} else {
|
||||
// ... or first PC's inventory... why?
|
||||
set_stat_window(ITEM_WIN_PC1);
|
||||
put_item_screen(stat_window);
|
||||
}
|
||||
case 'z':
|
||||
show_inventory();
|
||||
break;
|
||||
|
||||
case '=':
|
||||
|
@@ -69,5 +69,6 @@ void handle_bash_pick_select(bool& need_reprint, bool isBash);
|
||||
void handle_bash_pick(location destination, bool& did_something, bool& need_redraw, bool isBash);
|
||||
void handle_use_space_select(bool& need_reprint);
|
||||
void handle_use_space(location destination, bool& did_something, bool& need_redraw);
|
||||
void show_inventory();
|
||||
|
||||
#endif
|
||||
|
@@ -472,6 +472,8 @@ static void replay_next_action() {
|
||||
}else if(t == "handle_use_space"){
|
||||
location destination = location_from_action(next_action);
|
||||
handle_use_space(destination, did_something, need_redraw);
|
||||
}else if(t == "show_inventory"){
|
||||
show_inventory();
|
||||
}
|
||||
|
||||
// TODO some of these actions shouldn't call advance_time(). They should return
|
||||
|
Reference in New Issue
Block a user