skip intro dialog and special node when cli launches a scenario

This commit is contained in:
2025-01-08 21:38:35 -06:00
committed by Celtic Minstrel
parent a99b4be663
commit e6a6707c36
3 changed files with 14 additions and 12 deletions

View File

@@ -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;

View File

@@ -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,6 +186,7 @@ void put_party_in_scen(std::string scen_name) {
adjust_spell_menus();
adjust_monst_menu();
if(!force){
// Throw up intro dialog
for(short j = 0; j < univ.scenario.intro_strs.size(); j++)
if(!univ.scenario.intro_strs[j].empty()) {
@@ -195,6 +196,7 @@ void put_party_in_scen(std::string scen_name) {
}
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){

View File

@@ -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();