Implements ConstString in several core places in the library, improving performance.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -22,25 +22,25 @@ BattleLibrary* TestLibrary::Get() {
|
||||
|
||||
SpeciesLibrary* TestLibrary::BuildSpeciesLibrary() {
|
||||
auto l = new SpeciesLibrary();
|
||||
l->Insert("testSpecies1",
|
||||
new CreatureSpecies(0, "testSpecies1",
|
||||
l->Insert("testSpecies1"_cnc,
|
||||
new CreatureSpecies(0, "testSpecies1"_cnc,
|
||||
new SpeciesVariant("default", 1, 1, 10, {0, 1},
|
||||
StatisticSet<uint16_t>(10, 10, 10, 10, 10, 10), {"testTalent"},
|
||||
{"testSecretTalent"}, new LearnableAttacks(100)),
|
||||
0.5f, "testGrowthRate", 5));
|
||||
0.5f, "testGrowthRate"_cnc, 5));
|
||||
return l;
|
||||
}
|
||||
|
||||
AttackLibrary* TestLibrary::BuildAttackLibrary() {
|
||||
auto l = new AttackLibrary();
|
||||
l->Insert("standard", new AttackData("standard", 0, AttackCategory::Physical, 20, 100, 30,
|
||||
AttackTarget::AdjacentOpponent, 0, {}));
|
||||
l->Insert("highPriority", new AttackData("highPriority", 0, AttackCategory::Physical, 20, 100, 30,
|
||||
AttackTarget::AdjacentOpponent, 1, {}));
|
||||
l->Insert("higherPriority", new AttackData("higherPriority", 0, AttackCategory::Physical, 20, 100, 30,
|
||||
AttackTarget::AdjacentOpponent, 2, {}));
|
||||
l->Insert("lowPriority", new AttackData("lowPriority", 0, AttackCategory::Physical, 20, 100, 30,
|
||||
AttackTarget::AdjacentOpponent, -1, {}));
|
||||
l->Insert("standard"_cnc, new AttackData("standard", 0, AttackCategory::Physical, 20, 100, 30,
|
||||
AttackTarget::AdjacentOpponent, 0, {}));
|
||||
l->Insert("highPriority"_cnc, new AttackData("highPriority", 0, AttackCategory::Physical, 20, 100, 30,
|
||||
AttackTarget::AdjacentOpponent, 1, {}));
|
||||
l->Insert("higherPriority"_cnc, new AttackData("higherPriority", 0, AttackCategory::Physical, 20, 100, 30,
|
||||
AttackTarget::AdjacentOpponent, 2, {}));
|
||||
l->Insert("lowPriority"_cnc, new AttackData("lowPriority", 0, AttackCategory::Physical, 20, 100, 30,
|
||||
AttackTarget::AdjacentOpponent, -1, {}));
|
||||
return l;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ ItemLibrary* TestLibrary::BuildItemLibrary() {
|
||||
|
||||
GrowthRateLibrary* TestLibrary::BuildGrowthRateLibrary() {
|
||||
auto l = new GrowthRateLibrary();
|
||||
l->AddGrowthRate("testGrowthRate", new LookupGrowthRate());
|
||||
l->AddGrowthRate("testGrowthRate"_cnc, new LookupGrowthRate());
|
||||
return l;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user