Updates to new PkmnLib, fixed same named scripts in different folders not handling both scripts.
This commit is contained in:
parent
292ca78b47
commit
27556e30e3
|
@ -79,8 +79,9 @@ PkmnLib::Library::NatureLibrary* BuildNatures::Build(const std::string& path) {
|
|||
decreasedModifier = 1.0;
|
||||
|
||||
std::cout << "Registered nature with name '" << natureName << "'.\n";
|
||||
library->LoadNature(natureName, PkmnLib::Library::Nature(parsedIncreased, parsedDecreased, increasedModifier,
|
||||
decreasedModifier));
|
||||
library->LoadNature(
|
||||
Arbutils::CaseInsensitiveConstString(natureName),
|
||||
new PkmnLib::Library::Nature(parsedIncreased, parsedDecreased, increasedModifier, decreasedModifier));
|
||||
}
|
||||
return library;
|
||||
}
|
||||
|
|
|
@ -3,19 +3,18 @@
|
|||
|
||||
#define CHECK_NATURE_NEUTRAL(name) \
|
||||
{ \
|
||||
auto nature = natureLib->GetNatureByName( #name ); \
|
||||
CHECK(nature.GetIncreaseModifier() == Approx(1.0)); \
|
||||
CHECK(nature.GetDecreaseModifier() == Approx(1.0)); \
|
||||
auto nature = natureLib->GetNatureByName(Arbutils::CaseInsensitiveConstString(#name)); \
|
||||
CHECK(nature->GetIncreaseModifier() == Approx(1.0)); \
|
||||
CHECK(nature->GetDecreaseModifier() == Approx(1.0)); \
|
||||
}
|
||||
|
||||
|
||||
#define CHECK_NATURE(name, increasedStat, decreasedStat) \
|
||||
{ \
|
||||
auto nature = natureLib->GetNatureByName( #name ); \
|
||||
CHECK(nature.GetIncreasedStat() == PkmnLib::Library::Statistic::increasedStat); \
|
||||
CHECK(nature.GetDecreasedStat() == PkmnLib::Library::Statistic::decreasedStat); \
|
||||
CHECK(nature.GetIncreaseModifier() == Approx(1.1)); \
|
||||
CHECK(nature.GetDecreaseModifier() == Approx(0.9)); \
|
||||
auto nature = natureLib->GetNatureByName(Arbutils::CaseInsensitiveConstString(#name)); \
|
||||
CHECK(nature->GetIncreasedStat() == PkmnLib::Library::Statistic::increasedStat); \
|
||||
CHECK(nature->GetDecreasedStat() == PkmnLib::Library::Statistic::decreasedStat); \
|
||||
CHECK(nature->GetIncreaseModifier() == Approx(1.1)); \
|
||||
CHECK(nature->GetDecreaseModifier() == Approx(0.9)); \
|
||||
}
|
||||
|
||||
TEST_CASE("Nature Checks", "[natures]") {
|
||||
|
|
|
@ -102,7 +102,7 @@ int main(int argc, char* argv[]) {
|
|||
continue;
|
||||
std::ifstream in(dirEntry.path());
|
||||
std::string contents((std::istreambuf_iterator<char>(in)), std::istreambuf_iterator<char>());
|
||||
asScriptResolver->CreateScript(dirEntry.path().filename().c_str(), contents.c_str());
|
||||
asScriptResolver->CreateScript(dirEntry.path().c_str(), contents.c_str());
|
||||
}
|
||||
|
||||
asScriptResolver->CreateScript("TriggerEffectChance", R"(
|
||||
|
|
Loading…
Reference in New Issue