mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 19:19:52 +02:00
feat: blitz provider
This commit is contained in:
1 parent
c1f765d5f7
commit
dba56f8946
6 files changed
+32
-15
No files matched your search
Vendored
+1
@@ -160,6 +160,7 @@
|
||||
"playerachievements",
|
||||
"playerinfo",
|
||||
"playform",
|
||||
"Playtest",
|
||||
"pngjs",
|
||||
"POSITIVEX",
|
||||
"POSITIVEY",
|
||||
|
||||
+1
-1
Submodule packages/closed updated: c26156509f...ca38d789bb.
@@ -1,12 +0,0 @@
|
||||
using Microsoft.JavaScript.NodeApi;
|
||||
|
||||
namespace Game;
|
||||
|
||||
[JSExport]
|
||||
public class Class1
|
||||
{
|
||||
public static void Test()
|
||||
{
|
||||
Console.WriteLine("lmao");
|
||||
}
|
||||
}
|
||||
@@ -5,8 +5,10 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<NodeApiAssemblyJSModuleType>esm</NodeApiAssemblyJSModuleType>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CUE4Parse" Version="1.2.2" />
|
||||
<PackageReference Include="Microsoft.JavaScript.NodeApi" Version="0.9.19" />
|
||||
<PackageReference Include="Microsoft.JavaScript.NodeApi.Generator" Version="0.9.19" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
using CUE4Parse.FileProvider;
|
||||
using CUE4Parse.UE4.Versions;
|
||||
using Microsoft.JavaScript.NodeApi;
|
||||
|
||||
namespace game.src.classes;
|
||||
|
||||
[JSExport]
|
||||
public class BlitzProvider
|
||||
{
|
||||
private readonly DefaultFileProvider provider;
|
||||
|
||||
public BlitzProvider(string directory)
|
||||
{
|
||||
provider = new(
|
||||
directory: directory,
|
||||
searchOption: SearchOption.AllDirectories,
|
||||
versions: new(EGame.GAME_UE5_5),
|
||||
pathComparer: StringComparer.OrdinalIgnoreCase
|
||||
);
|
||||
provider.Initialize();
|
||||
provider.Mount();
|
||||
}
|
||||
|
||||
public string[] Files()
|
||||
{
|
||||
return provider.Files.Keys.ToArray();
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1 @@
|
||||
console.log("that's crazy yo");
|
||||
|
||||
export * from "../bin/Debug/net9.0/game";
|
||||
Reference in new issue
Block a user