mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-31 06:29:51 +01:00
Compare commits
2
Commits
ff02f06cbc
...
0b7f717057
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b7f717057 | ||
|
|
728cb43f05 |
No files matched your search
@@ -1,3 +1,6 @@
|
||||
[submodule "packages/closed"]
|
||||
path = packages/closed
|
||||
url = https://github.com/blitzkit/closed.git
|
||||
[submodule "packages/cue4parse"]
|
||||
path = packages/cue4parse
|
||||
url = https://github.com/FabianFG/CUE4Parse.git
|
||||
Vendored
+2
@@ -145,6 +145,7 @@
|
||||
"noout",
|
||||
"normalmap",
|
||||
"oneof",
|
||||
"Oodle",
|
||||
"oopsies",
|
||||
"Oopsy",
|
||||
"opentest",
|
||||
@@ -231,6 +232,7 @@
|
||||
"unrotate",
|
||||
"unwrapper",
|
||||
"userns",
|
||||
"usmap",
|
||||
"vercel",
|
||||
"vickers",
|
||||
"vitepress",
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
"license": "BlitzKit License",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build:game": "cd packages/game && dotnet build",
|
||||
"build:game": "cd packages/game && bun run build",
|
||||
"build:assets": "cd packages/scripts && bun run build:assets",
|
||||
"build:averages": "bun --filter=@blitzkit/scripts run build:averages",
|
||||
"build:bot": "cd packages/scripts && bun run build:bot",
|
||||
|
||||
Submodule
+1
Submodule packages/cue4parse added at bf5380789b.
@@ -7,7 +7,7 @@
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CUE4Parse" Version="1.2.2" />
|
||||
<ProjectReference Include="../cue4parse/CUE4Parse/CUE4Parse.csproj" />
|
||||
<PackageReference Include="Microsoft.JavaScript.NodeApi" Version="0.9.19" />
|
||||
<PackageReference Include="Microsoft.JavaScript.NodeApi.Generator" Version="0.9.19" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
"build": "dotnet build"
|
||||
},
|
||||
"dependencies": {
|
||||
"node-api-dotnet": "^0.9.19"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using CUE4Parse.FileProvider;
|
||||
using System.Runtime.InteropServices;
|
||||
using CUE4Parse.Compression;
|
||||
using CUE4Parse.FileProvider;
|
||||
using CUE4Parse.MappingsProvider;
|
||||
using CUE4Parse.UE4.Versions;
|
||||
using Microsoft.JavaScript.NodeApi;
|
||||
|
||||
@@ -19,12 +22,47 @@ public class BlitzProvider
|
||||
searchOption: SearchOption.AllDirectories,
|
||||
versions: new(EGame.GAME_UE5_5),
|
||||
pathComparer: StringComparer.OrdinalIgnoreCase
|
||||
);
|
||||
)
|
||||
{
|
||||
MappingsContainer = new FileUsmapTypeMappingsProvider("../../packages/closed/blitz.usmap"),
|
||||
};
|
||||
|
||||
provider.Initialize();
|
||||
provider.Mount();
|
||||
|
||||
string libraryExtension;
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
libraryExtension = "dll";
|
||||
}
|
||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
{
|
||||
libraryExtension = "so";
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("Unsupported OS");
|
||||
}
|
||||
|
||||
OodleHelper.DownloadOodleDll($"temp/oodle.{libraryExtension}");
|
||||
OodleHelper.Initialize($"temp/oodle.{libraryExtension}");
|
||||
|
||||
// Console.WriteLine(
|
||||
// provider.Files.Keys.Contains(
|
||||
// "Blitz/Content/Tanks/USA/A97_M41_Bulldog/PDA_A97_M41_Bulldog.uasset"
|
||||
// )
|
||||
// );
|
||||
|
||||
// var pda = provider.LoadPackageObject(
|
||||
// "Blitz/Content/Tanks/USA/A97_M41_Bulldog/PDA_A97_M41_Bulldog.PDA_A97_M41_Bulldog"
|
||||
// );
|
||||
|
||||
// Console.WriteLine(pda);
|
||||
|
||||
files = [.. provider.Files.Keys];
|
||||
|
||||
Console.WriteLine(string.Join("\n", files));
|
||||
|
||||
var tanksBase = "Blitz/Content/Tanks/";
|
||||
tanksDirectoryNations =
|
||||
[
|
||||
@@ -42,6 +80,25 @@ public class BlitzProvider
|
||||
|
||||
public byte[] TankBigIcon(string tankId, string pdaName)
|
||||
{
|
||||
return [];
|
||||
foreach (var nation in tanksDirectoryNations)
|
||||
{
|
||||
var path = $"Blitz/Content/Tanks/{nation}/{tankId}/{pdaName}.{pdaName}";
|
||||
|
||||
Console.WriteLine(path);
|
||||
|
||||
if (provider.TryLoadPackageObject(path, out var pda))
|
||||
{
|
||||
Console.WriteLine(pda);
|
||||
Console.WriteLine(pda.GetType());
|
||||
|
||||
return [];
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
throw new FileNotFoundException($"Tank {tankId}/{pdaName} not found in any nation");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user