record and replay debug refresh store items
This commit is contained in:
@@ -1891,6 +1891,15 @@ void debug_enter_town() {
|
||||
start_town_mode(get_num_response(0, univ.scenario.towns.size() - 1, "Enter Town Number"), find_direction_from);
|
||||
}
|
||||
|
||||
void debug_refresh_stores() {
|
||||
if(recording){
|
||||
record_action("debug_refresh_stores", "");
|
||||
}
|
||||
univ.refresh_store_items();
|
||||
add_string_to_buf("Debug: Refreshed jobs/shops.");
|
||||
print_buf();
|
||||
}
|
||||
|
||||
bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){
|
||||
bool are_done = false;
|
||||
location pass_point; // TODO: This isn't needed
|
||||
@@ -2204,9 +2213,7 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){
|
||||
|
||||
case 'W':
|
||||
if(!univ.debug_mode) break;
|
||||
univ.refresh_store_items();
|
||||
add_string_to_buf("Debug: Refreshed jobs/shops.");
|
||||
print_buf();
|
||||
debug_refresh_stores();
|
||||
break;
|
||||
|
||||
case '<':
|
||||
|
@@ -78,5 +78,6 @@ void debug_leave_town();
|
||||
void debug_kill();
|
||||
void debug_magic_map();
|
||||
void debug_enter_town();
|
||||
void debug_refresh_stores();
|
||||
|
||||
#endif
|
||||
|
@@ -495,6 +495,8 @@ static void replay_next_action() {
|
||||
debug_magic_map();
|
||||
}else if(t == "debug_enter_town"){
|
||||
debug_enter_town();
|
||||
}else if(t == "debug_refresh_stores"){
|
||||
debug_refresh_stores();
|
||||
}
|
||||
|
||||
// TODO some of these actions shouldn't call advance_time(). They should return
|
||||
|
Reference in New Issue
Block a user