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()){
|
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{
|
}else{
|
||||||
std::cerr << "Failed to load scenario: " << *scen_arg_path << std::endl;
|
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
|
// 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
|
// mode and load in the scen and init the party info
|
||||||
// party record already contains scen name
|
// 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;
|
bool item_took = false;
|
||||||
|
|
||||||
// Drop debug mode
|
// Drop debug mode
|
||||||
@@ -186,15 +186,17 @@ void put_party_in_scen(std::string scen_name) {
|
|||||||
adjust_spell_menus();
|
adjust_spell_menus();
|
||||||
adjust_monst_menu();
|
adjust_monst_menu();
|
||||||
|
|
||||||
// Throw up intro dialog
|
if(!force){
|
||||||
for(short j = 0; j < univ.scenario.intro_strs.size(); j++)
|
// Throw up intro dialog
|
||||||
if(!univ.scenario.intro_strs[j].empty()) {
|
for(short j = 0; j < univ.scenario.intro_strs.size(); j++)
|
||||||
std::array<short, 3> buttons = {0,-1,-1};
|
if(!univ.scenario.intro_strs[j].empty()) {
|
||||||
custom_choice_dialog(univ.scenario.intro_strs, univ.scenario.intro_mess_pic, PIC_SCEN, buttons);
|
std::array<short, 3> buttons = {0,-1,-1};
|
||||||
j = 6;
|
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);
|
run_special(eSpecCtx::STARTUP, eSpecCtxType::SCEN, univ.scenario.init_spec, loc(0,0));
|
||||||
|
give_help(1,2);
|
||||||
|
}
|
||||||
|
|
||||||
// Compatibility flags
|
// Compatibility flags
|
||||||
if(univ.scenario.format.prog_make_ver[0] < 2){
|
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 race_present(eRace which_race);
|
||||||
short wilderness_lore_present(ter_num_t ter);
|
short wilderness_lore_present(ter_num_t ter);
|
||||||
void print_spell_cast(eSpell spell,eSkill which);
|
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);
|
short party_size(bool only_living);
|
||||||
bool all_items_identified();
|
bool all_items_identified();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user