mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-11 05:36:10 -05:00
Disable double torpedos in analyzer (#1058)
* Note about torpedo * no magic numbers -> constant
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
SPLASH_WALL_ID,
|
||||
SPRINKLER_ID,
|
||||
TOXIC_MIST_ID,
|
||||
TORPEDO_ID,
|
||||
type BuildAbilitiesTupleWithUnknown,
|
||||
type MainWeaponId,
|
||||
type SubWeaponId,
|
||||
@@ -895,7 +896,7 @@ function ConsumptionTable({
|
||||
subWeaponId: SubWeaponId;
|
||||
}) {
|
||||
const { t } = useTranslation(["analyzer", "weapons"]);
|
||||
const maxSubsToUse = Math.max(...options.map((opt) => opt.subsUsed));
|
||||
const maxSubsToUse = subWeaponId === TORPEDO_ID ? 1 : Math.max(...options.map((opt) => opt.subsUsed));
|
||||
const types = Array.from(new Set(options.map((opt) => opt.type)));
|
||||
|
||||
return (
|
||||
@@ -926,6 +927,7 @@ function ConsumptionTable({
|
||||
</table>
|
||||
<div className="analyzer__consumption-table-explanation">
|
||||
{t("analyzer:consumptionExplanation", { maxSubsToUse })}
|
||||
{subWeaponId === TORPEDO_ID && <>{" "}{t("analyzer:torpedoExplanation")}</>}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
"abilityPoints": "Ability points",
|
||||
"abilityPoints.short": "AP",
|
||||
"consumptionExplanation": "This chart shows the amount of actions left to perform with main weapon after using sub 0-{{maxSubsToUse}} times. Max amount of consecutive subs to use with full ink tank is {{maxSubsToUse}}.",
|
||||
"torpedoExplanation": "You can't launch more than one torpedo at a time due to game mechanics.",
|
||||
"trackingSubDefExplanation": "Point Sensor, Ink Mine and Angle Shooter tracking times are calculated against an opponent with 0AP of Sub Power Up.",
|
||||
"distanceInline": "Distance: {{value}}",
|
||||
"damageShort": "DMG",
|
||||
|
||||
Reference in New Issue
Block a user