public void LoadSpriteTranslation() { var resourcePool = new TextureTranslationPool(); var textureFiles = Directory.GetFiles(SpriteTranslationDir, "*.png", SearchOption.AllDirectories); foreach (var file in textureFiles) { resourcePool.AddResource(file); } SpriteTranslationPool = resourcePool; Logger.Log(LogLevel.Debug, $"[MaidTranslate] {resourcePool.Resource.Count} sprite translation loaded."); }
public void LoadTextureTranslation() { var resourcePool = new TextureTranslationPool(); var textureFiles = Directory.GetFiles(TextureTranslationDir, "*.*", SearchOption.AllDirectories) .Where(s => s.EndsWith(".png") || s.EndsWith(".tex")).ToList(); foreach (var file in textureFiles) { resourcePool.AddResource(file); } TextureTranslationPool = resourcePool; Logger.Log(LogLevel.Debug, $"[MaidTranslate] {resourcePool.Resource.Count} texture translation loaded."); }
public bool TranslateTexture(Scene?scene, TextureTranslationEventArgs e, out TextureResource resource) { return(TextureTranslationPool.Translate(scene, e, out resource)); }