record and replay Create new PC
This commit is contained in:
@@ -2665,6 +2665,31 @@ void handle_drop_pc() {
|
||||
}
|
||||
}
|
||||
|
||||
void handle_new_pc() {
|
||||
if(recording){
|
||||
record_action("handle_new_pc", "");
|
||||
}
|
||||
if(!(is_town())) {
|
||||
add_string_to_buf("Add PC: Town mode only.");
|
||||
print_buf();
|
||||
return;
|
||||
}
|
||||
if(univ.party.free_space() == 6) {
|
||||
ASB("Add PC: You already have 6 PCs.");
|
||||
print_buf();
|
||||
return;
|
||||
}
|
||||
if(univ.town->has_tavern) {
|
||||
give_help(56,0);
|
||||
create_pc(6,nullptr);
|
||||
} else {
|
||||
add_string_to_buf("Add PC: You cannot add new characters in this town. Try in the town you started in.", 2);
|
||||
}
|
||||
print_buf();
|
||||
put_pc_screen();
|
||||
put_item_screen(stat_window);
|
||||
}
|
||||
|
||||
void new_party() {
|
||||
if(recording){
|
||||
record_action("new_party", "");
|
||||
|
@@ -26,6 +26,7 @@ void increase_age();
|
||||
void handle_hunting();
|
||||
void switch_pc(short which);
|
||||
void handle_drop_pc();
|
||||
void handle_new_pc();
|
||||
void new_party();
|
||||
void handle_death();
|
||||
void start_new_game(bool force = false);
|
||||
|
@@ -348,6 +348,8 @@ static void replay_next_action() {
|
||||
handle_new_pc_graphic();
|
||||
}else if(t == "handle_rename_pc"){
|
||||
handle_rename_pc();
|
||||
}else if (t == "handle_new_pc"){
|
||||
handle_new_pc();
|
||||
}
|
||||
|
||||
// TODO some of these actions shouldn't call advance_time(). They should return
|
||||
@@ -689,26 +691,7 @@ void handle_menu_choice(eMenu item_hit) {
|
||||
|
||||
|
||||
case eMenu::OPTIONS_NEW_PC:
|
||||
// TODO record and replay
|
||||
if(!(is_town())) {
|
||||
add_string_to_buf("Add PC: Town mode only.");
|
||||
print_buf();
|
||||
break;
|
||||
}
|
||||
if(univ.party.free_space() == 6) {
|
||||
ASB("Add PC: You already have 6 PCs.");
|
||||
print_buf();
|
||||
break;
|
||||
}
|
||||
if(univ.town->has_tavern) {
|
||||
give_help(56,0);
|
||||
create_pc(6,nullptr);
|
||||
} else {
|
||||
add_string_to_buf("Add PC: You cannot add new characters in this town. Try in the town you started in.", 2);
|
||||
}
|
||||
print_buf();
|
||||
put_pc_screen();
|
||||
put_item_screen(stat_window);
|
||||
handle_new_pc();
|
||||
break;
|
||||
|
||||
case eMenu::OPTIONS_JOURNAL:
|
||||
|
Reference in New Issue
Block a user