mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: tanksDirectoryNations
This commit is contained in:
1 parent
7a817cbe8c
commit
ff02f06cbc
5 files changed
+40
-17
No files matched your search
Vendored
+1
@@ -221,6 +221,7 @@
|
|||||||
"tungstentip",
|
"tungstentip",
|
||||||
"Turretless",
|
"Turretless",
|
||||||
"TYPELESS",
|
"TYPELESS",
|
||||||
|
"uasset",
|
||||||
"ubjson",
|
"ubjson",
|
||||||
"Unicum",
|
"Unicum",
|
||||||
"UNLOCALIZED",
|
"UNLOCALIZED",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"license": "BlitzKit License",
|
"license": "BlitzKit License",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build:game": "cd packages/game && dotnet build",
|
||||||
"build:assets": "cd packages/scripts && bun run build:assets",
|
"build:assets": "cd packages/scripts && bun run build:assets",
|
||||||
"build:averages": "bun --filter=@blitzkit/scripts run build:averages",
|
"build:averages": "bun --filter=@blitzkit/scripts run build:averages",
|
||||||
"build:bot": "cd packages/scripts && bun run build:bot",
|
"build:bot": "cd packages/scripts && bun run build:bot",
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[*.cs]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
@@ -4,7 +4,6 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<NodeApiAssemblyJSModuleType>esm</NodeApiAssemblyJSModuleType>
|
<NodeApiAssemblyJSModuleType>esm</NodeApiAssemblyJSModuleType>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -7,22 +7,41 @@ namespace game.src.classes;
|
|||||||
[JSExport]
|
[JSExport]
|
||||||
public class BlitzProvider
|
public class BlitzProvider
|
||||||
{
|
{
|
||||||
private readonly DefaultFileProvider provider;
|
private readonly DefaultFileProvider provider;
|
||||||
|
|
||||||
public BlitzProvider(string directory)
|
public string[] files;
|
||||||
{
|
public string[] tanksDirectoryNations;
|
||||||
provider = new(
|
|
||||||
directory: directory,
|
|
||||||
searchOption: SearchOption.AllDirectories,
|
|
||||||
versions: new(EGame.GAME_UE5_5),
|
|
||||||
pathComparer: StringComparer.OrdinalIgnoreCase
|
|
||||||
);
|
|
||||||
provider.Initialize();
|
|
||||||
provider.Mount();
|
|
||||||
}
|
|
||||||
|
|
||||||
public string[] Files()
|
public BlitzProvider(string directory)
|
||||||
{
|
{
|
||||||
return provider.Files.Keys.ToArray();
|
provider = new(
|
||||||
}
|
directory: directory,
|
||||||
|
searchOption: SearchOption.AllDirectories,
|
||||||
|
versions: new(EGame.GAME_UE5_5),
|
||||||
|
pathComparer: StringComparer.OrdinalIgnoreCase
|
||||||
|
);
|
||||||
|
provider.Initialize();
|
||||||
|
provider.Mount();
|
||||||
|
|
||||||
|
files = [.. provider.Files.Keys];
|
||||||
|
|
||||||
|
var tanksBase = "Blitz/Content/Tanks/";
|
||||||
|
tanksDirectoryNations =
|
||||||
|
[
|
||||||
|
.. files
|
||||||
|
.Where(path => path.StartsWith(tanksBase))
|
||||||
|
.Select(path => path[tanksBase.Length..])
|
||||||
|
.Select(path => path.Split('/')[0])
|
||||||
|
.Where(nation => !nation.EndsWith(".uasset") && nation != "TankStub")
|
||||||
|
.Distinct(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public string[] Files => files;
|
||||||
|
public string[] TanksDirectoryNations => tanksDirectoryNations;
|
||||||
|
|
||||||
|
public byte[] TankBigIcon(string tankId, string pdaName)
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user