Allow custom 'no items' response

This commit is contained in:
2025-01-22 11:28:39 -06:00
committed by Celtic Minstrel
parent 9f2ffd1ce0
commit 54bab68497
2 changed files with 11 additions and 4 deletions

View File

@@ -53,7 +53,7 @@ Which shop
Unused Unused
Unused Unused
Name of shop Name of shop
Unused Response if nothing for sale ...
Receive Training Receive Training
Unused Unused
Unused Unused

View File

@@ -888,10 +888,17 @@ void handle_talk_node(int which_talk_entry) {
return; return;
case eTalkNode::SHOP: case eTalkNode::SHOP:
if(!start_shop_mode(b,a,save_talk_str1,true)) if(!start_shop_mode(b,a,save_talk_str1,true)){
save_talk_str1 = "There is nothing to buy from " + save_talk_str1 + "."; // Second string of shop talk node: Custom message for when shop is empty
else if(!save_talk_str2.empty()){
save_talk_str1 = save_talk_str2;
save_talk_str2 = "";
}else{
save_talk_str1 = "There is nothing available to buy.";
}
}else{
can_save_talk = false; can_save_talk = false;
}
return; return;
case eTalkNode::JOB_BANK: case eTalkNode::JOB_BANK:
if(a < univ.party.job_banks.size() && univ.party.job_banks[a].anger >= 50) { if(a < univ.party.job_banks.size() && univ.party.job_banks[a].anger >= 50) {