mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-16 14:16:00 +01:00
useProtagonist
This commit is contained in:
1 parent
7592381b12
commit
99965118b3
4 files changed
+35
-20
No files matched your search
@@ -1,8 +1,13 @@
|
||||
import { createDefaultProvisions, type TankDefinition } from "@blitzkit/core";
|
||||
import { api } from "../blitzkit/api";
|
||||
import type { EquipmentMatrix } from "../stores/duel";
|
||||
import type { TankState } from "../stores/tankopedia";
|
||||
|
||||
export type EquipmentMatrix = [
|
||||
[number, number, number],
|
||||
[number, number, number],
|
||||
[number, number, number],
|
||||
];
|
||||
|
||||
const models = await api.models();
|
||||
const provisions = await api.provisions();
|
||||
const scripts = await api.scripts();
|
||||
@@ -18,14 +23,14 @@ export function createTankState(tank: TankDefinition) {
|
||||
const gun = turret.guns.at(-1)!;
|
||||
|
||||
return {
|
||||
tank,
|
||||
tank: tank.id,
|
||||
model: models.models[turret.id],
|
||||
|
||||
engine: tank.engines.at(-1)!,
|
||||
turret,
|
||||
gun,
|
||||
shell: gun.shells[0],
|
||||
track: tank.tracks.at(-1)!,
|
||||
engine: tank.engines.at(-1)!.id,
|
||||
turret: turret.id,
|
||||
gun: gun.id,
|
||||
shell: gun.shells[0].id,
|
||||
track: tank.tracks.at(-1)!.id,
|
||||
|
||||
equipment_matrix: genericDefaultEquipmentMatrix,
|
||||
|
||||
|
||||
Reference in new issue
Block a user