mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
fix: some linting for new proto 4
This commit is contained in:
1 parent
f14ca394b5
commit
53a9c5f2de
22 files changed
+155
-133
No files matched your search
@@ -98,7 +98,8 @@ export function ArmorPlateDisplay() {
|
||||
const { protagonist } = duelStore.getState();
|
||||
const tank = draft.model;
|
||||
const turret = tank.turrets[protagonist.turret.id];
|
||||
const gun = turret.guns[protagonist.gun.id];
|
||||
const gun =
|
||||
turret.guns[protagonist.gun.gunType!.value.base.id];
|
||||
const track = tank.tracks[protagonist.track.id];
|
||||
|
||||
console.log(highlightArmor.name);
|
||||
@@ -152,8 +153,12 @@ export function ArmorPlateDisplay() {
|
||||
const turret = tank.turrets[protagonist.turret.id];
|
||||
const initialTurret =
|
||||
initialTank.turrets[protagonist.turret.id];
|
||||
const gun = turret.guns[protagonist.gun.id];
|
||||
const initialGun = initialTurret.guns[protagonist.gun.id];
|
||||
const gun =
|
||||
turret.guns[protagonist.gun.gunType!.value.base.id];
|
||||
const initialGun =
|
||||
initialTurret.guns[
|
||||
protagonist.gun.gunType!.value.base.id
|
||||
];
|
||||
const track = tank.tracks[protagonist.track.id];
|
||||
const initialTrack =
|
||||
initialTank.tracks[protagonist.track.id];
|
||||
|
||||
+4
-7
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
resolveNearPenetration,
|
||||
resolvePenetrationCoefficient,
|
||||
type ShellDefinition,
|
||||
} from '@blitzkit/core';
|
||||
@@ -51,9 +50,7 @@ export function SpacedArmorSubExternal({
|
||||
|
||||
useEffect(() => {
|
||||
function handleShellChange(shell: ShellDefinition) {
|
||||
material.uniforms.penetration.value = resolveNearPenetration(
|
||||
shell.penetration,
|
||||
);
|
||||
material.uniforms.penetration.value = shell.penetration.near;
|
||||
}
|
||||
async function handleProtagonistEquipmentChange(
|
||||
equipment: EquipmentMatrix,
|
||||
@@ -61,7 +58,7 @@ export function SpacedArmorSubExternal({
|
||||
const duel = duelStore.getState();
|
||||
const hasEnhancedArmor = await hasEquipment(
|
||||
110,
|
||||
duel.protagonist.tank.equipment,
|
||||
duel.protagonist.tank.equipmentPreset,
|
||||
equipment,
|
||||
);
|
||||
material.uniforms.thickness.value = hasEnhancedArmor
|
||||
@@ -71,10 +68,10 @@ export function SpacedArmorSubExternal({
|
||||
async function handleAntagonistEquipmentChange(equipment: EquipmentMatrix) {
|
||||
const duel = duelStore.getState();
|
||||
const shell = duel.antagonist.shell;
|
||||
const penetration = resolveNearPenetration(shell.penetration);
|
||||
const penetration = shell.penetration.near;
|
||||
const hasCalibratedShells = await hasEquipment(
|
||||
103,
|
||||
duel.antagonist.tank.equipment,
|
||||
duel.antagonist.tank.equipmentPreset,
|
||||
equipment,
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user