Decouple universe and party

This commit is contained in:
2016-08-14 22:28:37 -04:00
parent 1330d10b86
commit 3359a2b778
22 changed files with 389 additions and 385 deletions

View File

@@ -21,7 +21,7 @@ void load_base_item_defs();
extern fs::path progDir;
void leave_town() {
univ.town.num = 200;
univ.party.town_num = 200;
}
void remove_party_from_scen() {

View File

@@ -224,13 +224,13 @@ void handle_menu_choice(eMenu item_hit) {
cChoiceDlog("not-split").show();
break;
}
if(univ.party.left_in != size_t(-1) && univ.party.left_in != univ.town.num) {
if(univ.party.left_in != size_t(-1) && univ.party.left_in != univ.party.town_num) {
std::string need_town = univ.scenario.towns[univ.party.left_in]->town_name;
showError("You can't reunite your party when you're in a different town than you split up in.", "Return to the following town in-game and then try again: " + need_town);
break;
}
cChoiceDlog("reunited").show();
univ.town.p_loc = univ.party.left_at;
univ.party.town_loc = univ.party.left_at;
for(i = 0; i < 6; i++)
if(univ.party[i].main_status >= eMainStatus::SPLIT)
univ.party[i].main_status -= eMainStatus::SPLIT;