record and replay talk to npc
This commit is contained in:
@@ -648,7 +648,10 @@ void handle_move(location destination, bool& did_something, bool& need_redraw, b
|
||||
}
|
||||
}
|
||||
|
||||
static void handle_talk(location destination, bool& did_something, bool& need_redraw, bool& need_reprint) {
|
||||
void handle_talk(location destination, bool& did_something, bool& need_redraw, bool& need_reprint) {
|
||||
if(recording){
|
||||
record_action("handle_talk", boost::lexical_cast<std::string>(destination));
|
||||
}
|
||||
if(can_see_light(center,destination,sight_obscurity) >= 4 || loc_off_world(destination)) {
|
||||
add_string_to_buf(" Can't see space.");
|
||||
need_reprint = true;
|
||||
|
@@ -93,5 +93,6 @@ void handle_print_pc_hp(int which_pc);
|
||||
void handle_print_pc_sp(int which_pc);
|
||||
void handle_trade_places(int which_pc);
|
||||
void handle_begin_talk(bool& need_reprint);
|
||||
void handle_talk(location destination, bool& did_something, bool& need_redraw, bool& need_reprint);
|
||||
|
||||
#endif
|
||||
|
@@ -531,6 +531,8 @@ static void replay_next_action() {
|
||||
handle_trade_places(boost::lexical_cast<short>(next_action.GetText()));
|
||||
}else if(t == "handle_begin_talk"){
|
||||
handle_begin_talk(need_reprint);
|
||||
}else if(t == "handle_talk"){
|
||||
handle_talk(location_from_action(next_action), did_something, need_redraw, need_reprint);
|
||||
}
|
||||
|
||||
// TODO some of these actions shouldn't call advance_time(). They should return
|
||||
|
Reference in New Issue
Block a user