'Train who?' show skill points and disallow pcs w/ 0
This commit is contained in:
@@ -989,7 +989,7 @@ void handle_talk_node(int which_talk_entry, bool is_redo) {
|
||||
save_talk_str1 = "You conclude your training.";
|
||||
save_talk_str2 = "";
|
||||
can_save_talk = false;
|
||||
if((get_pc = select_pc(eSelectPC::ONLY_LIVING,"Train who?")) < 6) {
|
||||
if((get_pc = select_pc(eSelectPC::ONLY_CAN_TRAIN,"Train who?")) < 6) {
|
||||
spend_xp(get_pc,1, nullptr);
|
||||
}
|
||||
goto RECORD_WHICH_NODE;
|
||||
|
@@ -978,6 +978,16 @@ short select_pc(eSelectPC mode, std::string title, eSkill highlight_highest, boo
|
||||
can_pick = false;
|
||||
extra_info = "no item slot";
|
||||
}
|
||||
if(false) // Skip fallthrough past ONLY_CAN_TRAIN
|
||||
BOOST_FALLTHROUGH;
|
||||
case eSelectPC::ONLY_CAN_TRAIN:
|
||||
if(univ.party[i].skill_pts){
|
||||
extra_info = std::to_string(univ.party[i].skill_pts) + " skill point";
|
||||
if(univ.party[i].skill_pts > 1) extra_info += "s";
|
||||
}else{
|
||||
extra_info = "no skill points";
|
||||
can_pick = false;
|
||||
}
|
||||
BOOST_FALLTHROUGH;
|
||||
case eSelectPC::ONLY_LIVING:
|
||||
if(univ.party[i].main_status != eMainStatus::ALIVE)
|
||||
@@ -1043,6 +1053,10 @@ short select_pc(eSelectPC mode, std::string title, eSkill highlight_highest, boo
|
||||
ASB(" No one has lockpicks equipped.");
|
||||
print_buf();
|
||||
}
|
||||
if(mode == eSelectPC::ONLY_CAN_TRAIN){
|
||||
ASB(" No one has skill points.");
|
||||
print_buf();
|
||||
}
|
||||
return 8;
|
||||
}
|
||||
|
||||
|
@@ -52,6 +52,8 @@ enum class eSelectPC {
|
||||
ONLY_CAN_GIVE_FROM_ACTIVE,
|
||||
// Must have lockpicks equipped
|
||||
ONLY_CAN_LOCKPICK,
|
||||
// Must have skill points
|
||||
ONLY_CAN_TRAIN,
|
||||
ONLY_DEAD,
|
||||
};
|
||||
// Prompt the player to choose a party member. Returns 0-5 for a pc, 6 for cancel, 7 for all, or 8 if no PCs fit the mode's filter.
|
||||
|
Reference in New Issue
Block a user