mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
fix: unit conversion
This commit is contained in:
1 parent
23a42230cb
commit
2e95f5dd95
2 files changed
+24
-25
No files matched your search
@@ -128,19 +128,16 @@ export const characteristics = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
shell_velocity({ shell }) {
|
shell_velocity({ shell }) {
|
||||||
const cmS = shell(
|
return (
|
||||||
ShellUpgrageSingleChange_AttributeName.ATTRIBUTE_NAME_SPEED
|
shell(ShellUpgrageSingleChange_AttributeName.ATTRIBUTE_NAME_SPEED) / 100
|
||||||
);
|
);
|
||||||
const kmS = cmS / 100 / 1000;
|
|
||||||
|
|
||||||
return kmS;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
shell_range({ shellSafe }) {
|
shell_range({ shellSafe }) {
|
||||||
const maxDistance = shellSafe(
|
const maxDistance = shellSafe(
|
||||||
ShellUpgrageSingleChange_AttributeName.ATTRIBUTE_NAME_MAX_DISTANCE
|
ShellUpgrageSingleChange_AttributeName.ATTRIBUTE_NAME_MAX_DISTANCE
|
||||||
);
|
);
|
||||||
return maxDistance === null ? Infinity : maxDistance;
|
return maxDistance === null ? Infinity : maxDistance / 100;
|
||||||
},
|
},
|
||||||
|
|
||||||
shell_capacity({ shellSafe }) {
|
shell_capacity({ shellSafe }) {
|
||||||
@@ -249,15 +246,15 @@ export const characteristics = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
power_to_weight_hard() {
|
power_to_weight_hard() {
|
||||||
return -1;
|
return -Infinity;
|
||||||
},
|
},
|
||||||
|
|
||||||
power_to_weight_medium() {
|
power_to_weight_medium() {
|
||||||
return -1;
|
return -Infinity;
|
||||||
},
|
},
|
||||||
|
|
||||||
power_to_weight_soft() {
|
power_to_weight_soft() {
|
||||||
return -1;
|
return -Infinity;
|
||||||
},
|
},
|
||||||
|
|
||||||
turret_traverse_speed({ attribute }) {
|
turret_traverse_speed({ attribute }) {
|
||||||
@@ -267,15 +264,15 @@ export const characteristics = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
hull_traverse_speed_hard() {
|
hull_traverse_speed_hard() {
|
||||||
return -1;
|
return -Infinity;
|
||||||
},
|
},
|
||||||
|
|
||||||
hull_traverse_speed_medium() {
|
hull_traverse_speed_medium() {
|
||||||
return -1;
|
return -Infinity;
|
||||||
},
|
},
|
||||||
|
|
||||||
hull_traverse_speed_soft() {
|
hull_traverse_speed_soft() {
|
||||||
return -1;
|
return -Infinity;
|
||||||
},
|
},
|
||||||
|
|
||||||
health({ attribute }) {
|
health({ attribute }) {
|
||||||
@@ -285,14 +282,18 @@ export const characteristics = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
fire_chance({ attribute }) {
|
fire_chance({ attribute }) {
|
||||||
return attribute(
|
return (
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_FIRE_START_CHANCE
|
attribute(
|
||||||
|
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_FIRE_START_CHANCE
|
||||||
|
) * 100
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
view_range({ attribute }) {
|
view_range({ attribute }) {
|
||||||
return attribute(
|
return (
|
||||||
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CIRCULAR_VISION_RADIUS
|
attribute(
|
||||||
|
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CIRCULAR_VISION_RADIUS
|
||||||
|
) / 100
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -315,7 +316,7 @@ export const characteristics = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
camouflage_shooting_moving() {
|
camouflage_shooting_moving() {
|
||||||
return -1;
|
return -Infinity;
|
||||||
},
|
},
|
||||||
|
|
||||||
camouflage_on_fire({ attributeSafe }) {
|
camouflage_on_fire({ attributeSafe }) {
|
||||||
@@ -327,14 +328,14 @@ export const characteristics = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
height() {
|
height() {
|
||||||
return -1;
|
return -Infinity;
|
||||||
},
|
},
|
||||||
|
|
||||||
length() {
|
length() {
|
||||||
return -1;
|
return -Infinity;
|
||||||
},
|
},
|
||||||
|
|
||||||
volume() {
|
volume() {
|
||||||
return -1;
|
return -Infinity;
|
||||||
},
|
},
|
||||||
} satisfies Record<string, Characteristic>;
|
} satisfies Record<string, Characteristic>;
|
||||||
@@ -40,12 +40,14 @@ export const characteristicsGroups: CharacteristicsOrder = [
|
|||||||
|
|
||||||
{ toy: "ricochet" },
|
{ toy: "ricochet" },
|
||||||
|
|
||||||
{ name: "shell_velocity", decimals: 2, units: "m_s" },
|
{ name: "shell_velocity", units: "m_s" },
|
||||||
{ name: "shell_range", units: "m" },
|
{ name: "shell_range", units: "m" },
|
||||||
{ name: "shell_capacity" },
|
{ name: "shell_capacity" },
|
||||||
|
|
||||||
{ name: "aim_time", units: "s" },
|
{ name: "aim_time", units: "s" },
|
||||||
|
|
||||||
|
{ toy: "aim_time" },
|
||||||
|
|
||||||
{ name: "dispersion_still", units: "m" },
|
{ name: "dispersion_still", units: "m" },
|
||||||
{ name: "dispersion_moving", units: "m" },
|
{ name: "dispersion_moving", units: "m" },
|
||||||
{ name: "dispersion_hull_traversing", units: "m" },
|
{ name: "dispersion_hull_traversing", units: "m" },
|
||||||
@@ -104,8 +106,4 @@ export const characteristicsGroups: CharacteristicsOrder = [
|
|||||||
{ name: "volume", units: "m" },
|
{ name: "volume", units: "m" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
group: "miscellaneous",
|
|
||||||
order: [],
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
Reference in new issue
Block a user