skip intro dialog and special node when cli launches a scenario
This commit is contained in:
@@ -365,7 +365,7 @@ static void handle_scenario_args() {
|
||||
}
|
||||
}
|
||||
if(!univ.party.is_in_scenario()){
|
||||
put_party_in_scen(path.filename().string());
|
||||
put_party_in_scen(path.filename().string(), scen_arg_town || scen_arg_out_x);
|
||||
}
|
||||
}else{
|
||||
std::cerr << "Failed to load scenario: " << *scen_arg_path << std::endl;
|
||||
|
||||
@@ -102,7 +102,7 @@ short store_pc_graphic;
|
||||
// When the party is placed into a scen from the starting screen, this is called to put the game into game
|
||||
// mode and load in the scen and init the party info
|
||||
// party record already contains scen name
|
||||
void put_party_in_scen(std::string scen_name) {
|
||||
void put_party_in_scen(std::string scen_name, bool force) {
|
||||
bool item_took = false;
|
||||
|
||||
// Drop debug mode
|
||||
@@ -186,15 +186,17 @@ void put_party_in_scen(std::string scen_name) {
|
||||
adjust_spell_menus();
|
||||
adjust_monst_menu();
|
||||
|
||||
// Throw up intro dialog
|
||||
for(short j = 0; j < univ.scenario.intro_strs.size(); j++)
|
||||
if(!univ.scenario.intro_strs[j].empty()) {
|
||||
std::array<short, 3> buttons = {0,-1,-1};
|
||||
custom_choice_dialog(univ.scenario.intro_strs, univ.scenario.intro_mess_pic, PIC_SCEN, buttons);
|
||||
j = 6;
|
||||
}
|
||||
run_special(eSpecCtx::STARTUP, eSpecCtxType::SCEN, univ.scenario.init_spec, loc(0,0));
|
||||
give_help(1,2);
|
||||
if(!force){
|
||||
// Throw up intro dialog
|
||||
for(short j = 0; j < univ.scenario.intro_strs.size(); j++)
|
||||
if(!univ.scenario.intro_strs[j].empty()) {
|
||||
std::array<short, 3> buttons = {0,-1,-1};
|
||||
custom_choice_dialog(univ.scenario.intro_strs, univ.scenario.intro_mess_pic, PIC_SCEN, buttons);
|
||||
j = 6;
|
||||
}
|
||||
run_special(eSpecCtx::STARTUP, eSpecCtxType::SCEN, univ.scenario.init_spec, loc(0,0));
|
||||
give_help(1,2);
|
||||
}
|
||||
|
||||
// Compatibility flags
|
||||
if(univ.scenario.format.prog_make_ver[0] < 2){
|
||||
|
||||
@@ -46,7 +46,7 @@ short trait_present(eTrait which_trait);
|
||||
short race_present(eRace which_race);
|
||||
short wilderness_lore_present(ter_num_t ter);
|
||||
void print_spell_cast(eSpell spell,eSkill which);
|
||||
void put_party_in_scen(std::string scen_name);
|
||||
void put_party_in_scen(std::string scen_name, bool force = false);
|
||||
short party_size(bool only_living);
|
||||
bool all_items_identified();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user