Rework misclibrary gettime to not segfault

This commit is contained in:
2021-07-09 18:20:01 +02:00
parent c2d846c2f6
commit a59f73b2f6
6 changed files with 18 additions and 19 deletions

View File

@@ -24,12 +24,17 @@ namespace PkmnLibSharpTests.Battling
var scriptLibrary = new AngelScriptResolver();
_cache = new BattleLibrary(BuildStatic(), new StatCalculator(), new DamageLibrary(),
new ExperienceLibrary(),
scriptLibrary, new MiscLibrary());
scriptLibrary, new MiscLibrary(GetTime));
scriptLibrary.Initialize(_cache);
return _cache;
}
}
public static TimeOfDay GetTime()
{
return TimeOfDay.Morning;
}
private static PokemonLibrary BuildStatic()
{
var settings = new LibrarySettings(100, 4, 4096);