protected override async Task SaveOverrideAsync(IPaintShopRenderer renderer, string location) { foreach (var texture in _textures) { await renderer.SaveTextureAsync(Path.Combine(location, texture), _color.ToColor(), _opacity); } }
protected override async Task SaveOverrideAsync(IPaintShopRenderer renderer, string location) { var value = Value.Value; if (value == null) { return; } foreach (var pair in value) { await renderer.SaveTextureAsync(Path.Combine(location, pair.Key), pair.Value); } }
protected override async Task SaveOverrideAsync(IPaintShopRenderer renderer, string location) { foreach (var replacement in _replacements) { if (replacement.Value.Data != null) { await FileUtils.WriteAllBytesAsync(Path.Combine(location, replacement.Key), replacement.Value.Data); } else if (replacement.Value.Name != null) { await renderer.SaveTextureAsync(replacement.Key, replacement.Value); } } }
protected Task SaveColorAsync(IPaintShopRenderer renderer, string location) { return(SupportsFlakes && Flakes > 0d ? renderer.SaveTextureFlakesAsync(Path.Combine(location, DetailsTexture), Color.ToColor(), FlakesSize, Flakes) : renderer.SaveTextureAsync(Path.Combine(location, DetailsTexture), Color.ToColor(), 1d)); }