public AssetConversionTests() { Event.AddEventsFromAssembly(typeof(ActionEvent).Assembly); AssetMapping.GlobalIsThreadLocal = true; // Hide any assets that have already been unpacked on the actual disk to prevent them interfering in the tests _disk = new MockFileSystem(x => !x.Contains(Path.Combine("mods", UnpackedAssetMod, "Assets")) && !x.Contains(Path.Combine("mods", RepackedAssetMod, "Albion"))); _baseDir = ConfigUtil.FindBasePath(_disk); _baseApplier = BuildApplier(BaseAssetMod); }
protected override void Subscribed() { _modApplier = Resolve <IModApplier>(); Exchange.Register <IRawAssetManager>(this); }
public AssetManager(IModApplier modApplier) => _modApplier = modApplier ?? throw new ArgumentNullException(nameof(modApplier));
protected override void Subscribed() { _modApplier = Resolve <IModApplier>() ?? throw new InvalidOperationException("AssetManager is missing requirement of type IModApplier"); Exchange.Register <IAssetManager>(this); Exchange.Register <ITextureLoader>(this); }