Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 protected override void Subscribed()
 {
     _modApplier = Resolve <IModApplier>();
     Exchange.Register <IRawAssetManager>(this);
 }
Exemplo n.º 3
0
 public AssetManager(IModApplier modApplier) => _modApplier = modApplier ?? throw new ArgumentNullException(nameof(modApplier));
Exemplo n.º 4
0
 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);
 }