global vector for extra scenario directories
This commit is contained in:
@@ -18,6 +18,8 @@
|
|||||||
class cScenario;
|
class cScenario;
|
||||||
class cUniverse;
|
class cUniverse;
|
||||||
|
|
||||||
|
extern std::vector<fs::path> extra_scen_dirs;
|
||||||
|
|
||||||
std::vector<fs::path> all_scen_dirs();
|
std::vector<fs::path> all_scen_dirs();
|
||||||
fs::path locate_scenario(std::string scen_name);
|
fs::path locate_scenario(std::string scen_name);
|
||||||
bool load_scenario(fs::path file_to_load, cScenario& scenario, bool only_header = false);
|
bool load_scenario(fs::path file_to_load, cScenario& scenario, bool only_header = false);
|
||||||
|
|||||||
@@ -71,6 +71,10 @@ static std::string get_file_error() {
|
|||||||
std::vector<fs::path> all_scen_dirs() {
|
std::vector<fs::path> all_scen_dirs() {
|
||||||
std::vector<fs::path> scen_dirs = { scenDir };
|
std::vector<fs::path> scen_dirs = { scenDir };
|
||||||
|
|
||||||
|
for(fs::path scen_dir : extra_scen_dirs){
|
||||||
|
scen_dirs.push_back(scen_dir);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fs::path replay_scenarios_dir = boost::filesystem::current_path();
|
fs::path replay_scenarios_dir = boost::filesystem::current_path();
|
||||||
replay_scenarios_dir = replay_scenarios_dir/".."/".."/"test"/"replays"/"scenarios";
|
replay_scenarios_dir = replay_scenarios_dir/".."/".."/"test"/"replays"/"scenarios";
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ extern enum_map(eGuiArea, rectangle) win_to_rects;
|
|||||||
|
|
||||||
std::string scenario_temp_dir_name = "scenario";
|
std::string scenario_temp_dir_name = "scenario";
|
||||||
extern fs::path tempDir;
|
extern fs::path tempDir;
|
||||||
|
std::vector<fs::path> extra_scen_dirs;
|
||||||
|
|
||||||
/* Display globals */
|
/* Display globals */
|
||||||
short combat_posing_monster = -1, current_working_monster = -1; // 0-5 PC 100 + x - monster x
|
short combat_posing_monster = -1, current_working_monster = -1; // 0-5 PC 100 + x - monster x
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ rectangle pc_traits_rect[17]; //Holds pc traits
|
|||||||
rectangle pc_race_rect; //Holds current pc's race
|
rectangle pc_race_rect; //Holds current pc's race
|
||||||
rectangle edit_rect[5]; //Buttons that bring up pc edit dialog boxs
|
rectangle edit_rect[5]; //Buttons that bring up pc edit dialog boxs
|
||||||
std::string scenario_temp_dir_name = "pc_scenario";
|
std::string scenario_temp_dir_name = "pc_scenario";
|
||||||
|
std::vector<fs::path> extra_scen_dirs;
|
||||||
|
|
||||||
short current_active_pc = 0;
|
short current_active_pc = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ cOutdoors* current_terrain;
|
|||||||
|
|
||||||
std::string scenario_temp_dir_name = "ed_scenario";
|
std::string scenario_temp_dir_name = "ed_scenario";
|
||||||
bool change_made = false, ae_loading = false;
|
bool change_made = false, ae_loading = false;
|
||||||
|
std::vector<fs::path> extra_scen_dirs;
|
||||||
|
|
||||||
// Numbers of current areas being edited
|
// Numbers of current areas being edited
|
||||||
short cur_town;
|
short cur_town;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ sf::RenderWindow mainPtr;
|
|||||||
std::string scenario_temp_dir_name = "test_scenario";
|
std::string scenario_temp_dir_name = "test_scenario";
|
||||||
cCustomGraphics spec_scen_g;
|
cCustomGraphics spec_scen_g;
|
||||||
cUniverse univ;
|
cUniverse univ;
|
||||||
|
std::vector<fs::path> extra_scen_dirs;
|
||||||
|
|
||||||
// And these are referenced from the scenario code, though not used in test cases
|
// And these are referenced from the scenario code, though not used in test cases
|
||||||
#include "scenario/scenario.hpp"
|
#include "scenario/scenario.hpp"
|
||||||
|
|||||||
Reference in New Issue
Block a user