mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-13 12:46:11 +01:00
fix: casing
This commit is contained in:
1 parent
ef52434a42
commit
fc8e0e55f0
34 files changed
+321
-304
No files matched your search
+2
-2
@@ -28,8 +28,8 @@ export function DynamicArmorSwitcher() {
|
||||
draft.protagonist.consumables =
|
||||
draft.protagonist.consumables.filter((id) => id !== 73);
|
||||
} else {
|
||||
if (draft.protagonist.consumables.length === tank.maxConsumables) {
|
||||
draft.protagonist.consumables[tank.maxConsumables - 1] = 73;
|
||||
if (draft.protagonist.consumables.length === tank.max_consumables) {
|
||||
draft.protagonist.consumables[tank.max_consumables - 1] = 73;
|
||||
} else {
|
||||
draft.protagonist.consumables.push(73);
|
||||
}
|
||||
|
||||
+4
-3
@@ -21,8 +21,9 @@ export function QuickInputs() {
|
||||
const turretModelDefinition =
|
||||
tankModelDefinition.turrets[protagonist.turret.id];
|
||||
const gunModelDefinition =
|
||||
turretModelDefinition.guns[protagonist.gun.gunType!.value.base.id];
|
||||
const initialGunPitch = tankModelDefinition.initialTurretRotation?.pitch ?? 0;
|
||||
turretModelDefinition.guns[protagonist.gun.gun_type!.value.base.id];
|
||||
const initialGunPitch =
|
||||
tankModelDefinition.initial_turret_rotation?.pitch ?? 0;
|
||||
const hasImprovedVerticalStabilizer = useEquipment(122);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -45,7 +46,7 @@ export function QuickInputs() {
|
||||
|
||||
pitchInput.current.value = (
|
||||
-radToDeg(pitch) +
|
||||
(tankModelDefinition.initialTurretRotation?.pitch ?? 0)
|
||||
(tankModelDefinition.initial_turret_rotation?.pitch ?? 0)
|
||||
).toFixed(1);
|
||||
|
||||
if (yaw === undefined) return;
|
||||
|
||||
@@ -131,7 +131,7 @@ export function Options({ thicknessRange, canvas }: OptionsProps) {
|
||||
>
|
||||
{
|
||||
TIER_ROMAN_NUMERALS[
|
||||
antagonistGun.gunType!.value.base.tier
|
||||
antagonistGun.gun_type!.value.base.tier
|
||||
]
|
||||
}
|
||||
</Text>
|
||||
@@ -155,21 +155,21 @@ export function Options({ thicknessRange, canvas }: OptionsProps) {
|
||||
.map(({ gun, turret }) => (
|
||||
<ModuleButton
|
||||
module="gun"
|
||||
key={gun.gunType!.value.base.id}
|
||||
key={gun.gun_type!.value.base.id}
|
||||
onClick={() =>
|
||||
mutateDuel((draft) => {
|
||||
draft.antagonist.turret = turret;
|
||||
draft.antagonist.gun = gun;
|
||||
draft.antagonist.shell =
|
||||
gun.gunType!.value.base.shells[0];
|
||||
gun.gun_type!.value.base.shells[0];
|
||||
})
|
||||
}
|
||||
selected={
|
||||
gun.gunType!.value.base.id ===
|
||||
antagonistGun.gunType!.value.base.id
|
||||
gun.gun_type!.value.base.id ===
|
||||
antagonistGun.gun_type!.value.base.id
|
||||
}
|
||||
discriminator={
|
||||
TIER_ROMAN_NUMERALS[gun.gunType!.value.base.tier]
|
||||
TIER_ROMAN_NUMERALS[gun.gun_type!.value.base.tier]
|
||||
}
|
||||
/>
|
||||
))}
|
||||
@@ -184,7 +184,7 @@ export function Options({ thicknessRange, canvas }: OptionsProps) {
|
||||
}}
|
||||
overflow="hidden"
|
||||
>
|
||||
{antagonistGun.gunType!.value.base.shells.map(
|
||||
{antagonistGun.gun_type!.value.base.shells.map(
|
||||
(thisShell, shellIndex) => (
|
||||
<IconButton
|
||||
color={
|
||||
@@ -332,7 +332,7 @@ export function Options({ thicknessRange, canvas }: OptionsProps) {
|
||||
draft.antagonist.gun =
|
||||
draft.antagonist.turret.guns.at(-1)!;
|
||||
draft.antagonist.shell =
|
||||
draft.antagonist.gun.gunType!.value.base.shells[0];
|
||||
draft.antagonist.gun.gun_type!.value.base.shells[0];
|
||||
});
|
||||
setAntagonistSelectorOpen(false);
|
||||
}}
|
||||
|
||||
+10
-10
@@ -38,7 +38,7 @@ export function Controls() {
|
||||
antagonistModelDefinition.turrets[antagonist.turret.id];
|
||||
const protagonistGunModelDefinition =
|
||||
protagonistTurretModelDefinition.guns[
|
||||
protagonist.gun.gunType!.value.base.id
|
||||
protagonist.gun.gun_type!.value.base.id
|
||||
];
|
||||
const protagonistHullOrigin = new Vector3(
|
||||
protagonistTrackModelDefinition.origin.x,
|
||||
@@ -46,19 +46,19 @@ export function Controls() {
|
||||
-protagonistTrackModelDefinition.origin.z,
|
||||
);
|
||||
const protagonistTurretOrigin = new Vector3(
|
||||
protagonistModelDefinition.turretOrigin.x,
|
||||
protagonistModelDefinition.turretOrigin.y,
|
||||
-protagonistModelDefinition.turretOrigin.z,
|
||||
protagonistModelDefinition.turret_origin.x,
|
||||
protagonistModelDefinition.turret_origin.y,
|
||||
-protagonistModelDefinition.turret_origin.z,
|
||||
);
|
||||
const protagonistGunOrigin = new Vector3(
|
||||
protagonistTurretModelDefinition.gunOrigin.x,
|
||||
protagonistTurretModelDefinition.gunOrigin.y,
|
||||
-protagonistTurretModelDefinition.gunOrigin.z,
|
||||
protagonistTurretModelDefinition.gun_origin.x,
|
||||
protagonistTurretModelDefinition.gun_origin.y,
|
||||
-protagonistTurretModelDefinition.gun_origin.z,
|
||||
);
|
||||
const antagonistGunHeight =
|
||||
protagonistTrackModelDefinition.origin.y +
|
||||
antagonistModelDefinition.turretOrigin.y +
|
||||
antagonistTurretModelDefinition.gunOrigin.y;
|
||||
antagonistModelDefinition.turret_origin.y +
|
||||
antagonistTurretModelDefinition.gun_origin.y;
|
||||
const [autoRotate, setAutoRotate] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -78,7 +78,7 @@ export function Controls() {
|
||||
const duel = duelStore.getState();
|
||||
const hasImprovedVerticalStabilizer = await hasEquipment(
|
||||
122,
|
||||
duel.protagonist.tank.equipmentPreset,
|
||||
duel.protagonist.tank.equipment_preset,
|
||||
duel.protagonist.equipmentMatrix,
|
||||
);
|
||||
|
||||
|
||||
+6
-6
@@ -29,7 +29,7 @@ export const TankModel = memo(() => {
|
||||
const turretModelDefinition =
|
||||
tankModelDefinition.turrets[protagonist.turret.id];
|
||||
const gunModelDefinition =
|
||||
turretModelDefinition.guns[protagonist.gun.gunType!.value.base.id];
|
||||
turretModelDefinition.guns[protagonist.gun.gun_type!.value.base.id];
|
||||
const { gltf } = useModel(protagonist.tank.id);
|
||||
const nodes = Object.values(gltf.nodes);
|
||||
const isDynamicArmorActive = Duel.use((state) =>
|
||||
@@ -136,7 +136,7 @@ export const TankModel = memo(() => {
|
||||
const isTurret = node.name.startsWith('turret_');
|
||||
const isCurrentTurret =
|
||||
node.name ===
|
||||
`turret_${turretModelDefinition.modelId.toString().padStart(2, '0')}`;
|
||||
`turret_${turretModelDefinition.model_id.toString().padStart(2, '0')}`;
|
||||
const isVisible = isCurrentTurret;
|
||||
const position = new Vector2();
|
||||
const delta = new Vector2();
|
||||
@@ -169,7 +169,7 @@ export const TankModel = memo(() => {
|
||||
const duel = duelStore.getState();
|
||||
const hasImprovedVerticalStabilizer = await hasEquipment(
|
||||
122,
|
||||
duel.protagonist.tank.equipmentPreset,
|
||||
duel.protagonist.tank.equipment_preset,
|
||||
duel.protagonist.equipmentMatrix,
|
||||
);
|
||||
const boundingRect = canvas.getBoundingClientRect();
|
||||
@@ -232,12 +232,12 @@ export const TankModel = memo(() => {
|
||||
{nodes.map((node) => {
|
||||
const isCurrentMantlet =
|
||||
node.name ===
|
||||
`gun_${gunModelDefinition.modelId
|
||||
`gun_${gunModelDefinition.model_id
|
||||
.toString()
|
||||
.padStart(2, '0')}_mask`;
|
||||
const isCurrentGun =
|
||||
node.name ===
|
||||
`gun_${gunModelDefinition.modelId.toString().padStart(2, '0')}`;
|
||||
`gun_${gunModelDefinition.model_id.toString().padStart(2, '0')}`;
|
||||
const isVisible = isCurrentGun || isCurrentMantlet;
|
||||
const position = new Vector2();
|
||||
const delta = new Vector2();
|
||||
@@ -269,7 +269,7 @@ export const TankModel = memo(() => {
|
||||
const duel = duelStore.getState();
|
||||
const hasImprovedVerticalStabilizer = await hasEquipment(
|
||||
122,
|
||||
duel.protagonist.tank.equipmentPreset,
|
||||
duel.protagonist.tank.equipment_preset,
|
||||
duel.protagonist.equipmentMatrix,
|
||||
);
|
||||
const boundingRect = canvas.getBoundingClientRect();
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ export const TankSandbox = forwardRef<HTMLCanvasElement, TankSandboxProps>(
|
||||
const turretModelDefinition =
|
||||
tankModelDefinition.turrets[protagonist.turret.id];
|
||||
const gunModelDefinition =
|
||||
turretModelDefinition.guns[protagonist.gun.gunType!.value.base.id];
|
||||
turretModelDefinition.guns[protagonist.gun.gun_type!.value.base.id];
|
||||
const display = TankopediaPersistent.useDeferred(
|
||||
(state) => state.display,
|
||||
TankopediaDisplay.Model,
|
||||
|
||||
@@ -34,7 +34,7 @@ export function HeroSection() {
|
||||
(filtered.reduce((accumulator, thisTank) => {
|
||||
return (
|
||||
accumulator +
|
||||
thisTank.turrets.at(-1)!.guns.at(-1)!.gunType!.value.base.shells[0]
|
||||
thisTank.turrets.at(-1)!.guns.at(-1)!.gun_type!.value.base.shells[0]
|
||||
.penetration.near
|
||||
);
|
||||
}, 0) /
|
||||
|
||||
Reference in new issue
Block a user