Some character editor changes:
- Move Own Boats/Horses to Scenario menu - Disable Scenario menu if not in a scenario - Don't bother converting notes from legacy saves if not in a scenario (affects game too)
This commit is contained in:
@@ -90,7 +90,6 @@ BEGIN
|
||||
MENUITEM "Edit XP", IDM_PARTY_XP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Reunite Party", IDM_PARTY_REUNITE
|
||||
MENUITEM "Own All Boats/Horses", IDM_PARTY_VEHICLES
|
||||
END
|
||||
POPUP "&Scenario Editing"
|
||||
BEGIN
|
||||
@@ -100,6 +99,7 @@ BEGIN
|
||||
MENUITEM "Make Towns Forget You", IDM_SCEN_TOWN_RESET
|
||||
MENUITEM "Add All Town Maps", IDM_SCEN_TOWN_MAP
|
||||
MENUITEM "Add All Outdoor Maps", IDM_SCEN_OUT_MAP
|
||||
MENUITEM "Own All Boats/Horses", IDM_PARTY_VEHICLES
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Remove Party From Scenario", IDM_SCEN_LEAVE
|
||||
MENUITEM "Set Stuff Done Flag", IDM_SCEN_SDF
|
||||
|
@@ -115,20 +115,22 @@ void cParty::append(legacy::party_record_type& old){
|
||||
// journal.push_back(j);
|
||||
// spec_items[i] = old.spec_items[i];
|
||||
// }
|
||||
special_notes.reserve(140);
|
||||
for(i = 0; i < 140; i++){
|
||||
if(old.special_notes_str[i][0] <= 0) continue;
|
||||
cEncNote n;
|
||||
n.append(old.special_notes_str[i], univ.scenario);
|
||||
special_notes.push_back(n);
|
||||
}
|
||||
talk_save.reserve(120);
|
||||
for(i = 0; i < 120; i++){
|
||||
cConvers t;
|
||||
t.append(old.talk_save[i], univ.scenario);
|
||||
talk_save.push_back(t);
|
||||
if(old.help_received[i])
|
||||
help_received.insert(i);
|
||||
if(!scen_name.empty()) {
|
||||
special_notes.reserve(140);
|
||||
for(i = 0; i < 140; i++){
|
||||
if(old.special_notes_str[i][0] <= 0) continue;
|
||||
cEncNote n;
|
||||
n.append(old.special_notes_str[i], univ.scenario);
|
||||
special_notes.push_back(n);
|
||||
}
|
||||
talk_save.reserve(120);
|
||||
for(i = 0; i < 120; i++){
|
||||
cConvers t;
|
||||
t.append(old.talk_save[i], univ.scenario);
|
||||
talk_save.push_back(t);
|
||||
if(old.help_received[i])
|
||||
help_received.insert(i);
|
||||
}
|
||||
}
|
||||
direction = eDirection(old.direction);
|
||||
at_which_save_slot = old.at_which_save_slot;
|
||||
|
@@ -257,13 +257,10 @@ void handle_menu_choice(eMenu item_hit) {
|
||||
break;
|
||||
|
||||
case eMenu::LEAVE_SCENARIO:
|
||||
if(!party_in_scen) {
|
||||
display_strings(25,15);
|
||||
break;
|
||||
}
|
||||
if(cChoiceDlog("leave-scenario",{"okay","cancel"}).show() != "okay")
|
||||
break;
|
||||
remove_party_from_scen();
|
||||
menu_activate();
|
||||
break;
|
||||
case eMenu::EDIT_ALCHEMY:
|
||||
display_alchemy(true);
|
||||
@@ -279,10 +276,6 @@ void handle_menu_choice(eMenu item_hit) {
|
||||
edit_day();
|
||||
break;
|
||||
case eMenu::ADD_OUT_MAPS:
|
||||
if(!party_in_scen) {
|
||||
display_strings(25,15);
|
||||
break;
|
||||
}
|
||||
display_strings(13,15);
|
||||
for(i = 0; i < 100; i++)
|
||||
for(j = 0; j < 6; j++)
|
||||
@@ -290,10 +283,6 @@ void handle_menu_choice(eMenu item_hit) {
|
||||
univ.out_maps[i][j][k] = 255;
|
||||
break;
|
||||
case eMenu::ADD_TOWN_MAPS:
|
||||
if(!party_in_scen) {
|
||||
display_strings(25,15);
|
||||
break;
|
||||
}
|
||||
display_strings(14,15);
|
||||
for(i = 0; i < 200; i++)
|
||||
for(j = 0; j < 8; j++)
|
||||
|
@@ -19,7 +19,7 @@ using MenuHandle = NSMenu*;
|
||||
|
||||
extern cUniverse univ;
|
||||
extern fs::path file_in_mem;
|
||||
extern bool scen_items_loaded;
|
||||
extern bool scen_items_loaded, party_in_scen;
|
||||
MenuHandle menu_bar_handle;
|
||||
MenuHandle apple_menu, file_menu, reg_menu, extra_menu, items_menu[4];
|
||||
|
||||
@@ -65,10 +65,10 @@ void init_menubar() {
|
||||
eMenu::EDIT_GOLD, eMenu::EDIT_FOOD, eMenu::EDIT_ALCHEMY, eMenu::NONE,
|
||||
eMenu::HEAL_DAMAGE, eMenu::RESTORE_MANA, eMenu::RAISE_DEAD, eMenu::CURE_CONDITIONS, eMenu::NONE,
|
||||
eMenu::EDIT_MAGE, eMenu::EDIT_PRIEST, eMenu::EDIT_TRAITS, eMenu::EDIT_SKILLS, eMenu::EDIT_XP, eMenu::NONE,
|
||||
eMenu::REUNITE_PARTY, eMenu::OWN_VEHICLES,
|
||||
eMenu::REUNITE_PARTY,
|
||||
};
|
||||
static const eMenu scen_choices[] = {
|
||||
eMenu::EDIT_DAY, eMenu::NONE, eMenu::LEAVE_TOWN, eMenu::RESET_TOWNS, eMenu::ADD_OUT_MAPS, eMenu::ADD_TOWN_MAPS,
|
||||
eMenu::EDIT_DAY, eMenu::NONE, eMenu::LEAVE_TOWN, eMenu::RESET_TOWNS, eMenu::ADD_OUT_MAPS, eMenu::ADD_TOWN_MAPS, eMenu::OWN_VEHICLES,
|
||||
eMenu::NONE, eMenu::LEAVE_SCENARIO, eMenu::SET_SDF,
|
||||
};
|
||||
|
||||
@@ -101,7 +101,7 @@ void menu_activate() {
|
||||
for(int i = 3; i < [file_menu numberOfItems]; i++)
|
||||
[[file_menu itemAtIndex: i] setEnabled: YES];
|
||||
[[menu_bar_handle itemWithTitle: @"Edit Party"] setEnabled: YES];
|
||||
[[menu_bar_handle itemWithTitle: @"Scenario Edit"] setEnabled: YES];
|
||||
[[menu_bar_handle itemWithTitle: @"Scenario Edit"] setEnabled: party_in_scen];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ enum {
|
||||
|
||||
extern sf::RenderWindow mainPtr;
|
||||
extern cUniverse univ;
|
||||
extern bool scen_items_loaded;
|
||||
extern bool scen_items_loaded, party_in_scen;
|
||||
extern fs::path file_in_mem;
|
||||
LONG_PTR mainProc;
|
||||
HMENU menuHandle = NULL;
|
||||
@@ -79,10 +79,10 @@ void init_menubar() {
|
||||
eMenu::EDIT_GOLD, eMenu::EDIT_FOOD, eMenu::EDIT_ALCHEMY, eMenu::NONE,
|
||||
eMenu::HEAL_DAMAGE, eMenu::RESTORE_MANA, eMenu::RAISE_DEAD, eMenu::CURE_CONDITIONS, eMenu::NONE,
|
||||
eMenu::EDIT_MAGE, eMenu::EDIT_PRIEST, eMenu::EDIT_TRAITS, eMenu::EDIT_SKILLS, eMenu::EDIT_XP, eMenu::NONE,
|
||||
eMenu::REUNITE_PARTY, eMenu::OWN_VEHICLES,
|
||||
eMenu::REUNITE_PARTY,
|
||||
};
|
||||
static const eMenu scen_choices[] = {
|
||||
eMenu::EDIT_DAY, eMenu::NONE, eMenu::LEAVE_TOWN, eMenu::RESET_TOWNS, eMenu::ADD_OUT_MAPS, eMenu::ADD_TOWN_MAPS,
|
||||
eMenu::EDIT_DAY, eMenu::NONE, eMenu::LEAVE_TOWN, eMenu::RESET_TOWNS, eMenu::ADD_OUT_MAPS, eMenu::ADD_TOWN_MAPS, eMenu::OWN_VEHICLES,
|
||||
eMenu::NONE, eMenu::LEAVE_SCENARIO, eMenu::SET_SDF,
|
||||
};
|
||||
static const eMenu help_choices[] = {
|
||||
@@ -142,7 +142,7 @@ void menu_activate() {
|
||||
EnableMenuItem(file_menu, i, MF_BYPOSITION | MF_GRAYED);
|
||||
} else {
|
||||
EnableMenuItem(menuHandle, PARTY_MENU_POS, MF_BYPOSITION | MF_ENABLED);
|
||||
EnableMenuItem(menuHandle, SCEN_MENU_POS, MF_BYPOSITION | MF_ENABLED);
|
||||
EnableMenuItem(menuHandle, SCEN_MENU_POS, MF_BYPOSITION | (party_in_scen ? MF_ENABLED : MF_GRAYED));
|
||||
for(int i = 1; i < GetMenuItemCount(file_menu) - 1; i++)
|
||||
EnableMenuItem(file_menu, i, MF_BYPOSITION | MF_ENABLED);
|
||||
}
|
||||
|
Reference in New Issue
Block a user