Skip to content

Commit

Permalink
Game Initialization: fixed a typo in a type name
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Vultraz committed Sep 7, 2017
1 parent 087cee6 commit 84f861d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/game_initialization/create_engine.cpp
Expand Up @@ -794,16 +794,16 @@ void create_engine::init_extras(const MP_EXTRA extra_type)
std::vector<extras_metadata_ptr>& extras = get_extras_by_type(extra_type);
const std::string extra_name = (extra_type == ERA) ? "era" : "modification";

ng::depcheck::component_availabilty default_availabilty = (extra_type == ERA)
? ng::depcheck::component_availabilty::MP
: ng::depcheck::component_availabilty::HYBRID;
ng::depcheck::component_availability default_availabilty = (extra_type == ERA)
? ng::depcheck::component_availability::MP
: ng::depcheck::component_availability::HYBRID;

for(const config& extra : game_config_manager::get()->game_config().child_range(extra_name))
{
ng::depcheck::component_availabilty type = extra["type"].to_enum(default_availabilty);
ng::depcheck::component_availability type = extra["type"].to_enum(default_availabilty);
bool mp = state_.classification().campaign_type == game_classification::CAMPAIGN_TYPE::MULTIPLAYER;

if((type != ng::depcheck::component_availabilty::MP || mp) && (type != ng::depcheck::component_availabilty::SP || !mp) )
if((type != ng::depcheck::component_availability::MP || mp) && (type != ng::depcheck::component_availability::SP || !mp) )
{
extras_metadata_ptr new_extras_metadata(new extras_metadata());
new_extras_metadata->id = extra["id"].str();
Expand Down
8 changes: 4 additions & 4 deletions src/game_initialization/depcheck.cpp
Expand Up @@ -68,9 +68,9 @@ manager::manager(const config& gamecfg, bool mp, CVideo& video)
DBG_MP << "Initializing the dependency manager" << std::endl;

for(const config& cfg : gamecfg.child_range("modification")) {
component_availabilty type = cfg["type"].to_enum<component_availabilty>(component_availabilty::HYBRID);
component_availability type = cfg["type"].to_enum<component_availability>(component_availability::HYBRID);

if((type != component_availabilty::MP || mp) && (type != component_availabilty::SP || !mp)) {
if((type != component_availability::MP || mp) && (type != component_availability::SP || !mp)) {
config info;
info["id"] = cfg["id"];
info["name"] = cfg["name"];
Expand All @@ -84,9 +84,9 @@ manager::manager(const config& gamecfg, bool mp, CVideo& video)
}

for(const config& cfg : gamecfg.child_range("era")) {
component_availabilty type = cfg["type"].to_enum<component_availabilty>(component_availabilty::MP);
component_availability type = cfg["type"].to_enum<component_availability>(component_availability::MP);

if((type != component_availabilty::MP || mp) && (type != component_availabilty::SP || !mp)) {
if((type != component_availability::MP || mp) && (type != component_availability::SP || !mp)) {
config info;
info["id"] = cfg["id"];
info["name"] = cfg["name"];
Expand Down
2 changes: 1 addition & 1 deletion src/game_initialization/depcheck.hpp
Expand Up @@ -35,7 +35,7 @@ enum component_type
MODIFICATION
};

MAKE_ENUM(component_availabilty,
MAKE_ENUM(component_availability,
(SP, "sp")
(MP, "mp")
(HYBRID, "hybrid")
Expand Down

0 comments on commit 84f861d

Please sign in to comment.