setHover(true)} onMouseLeave={() => setHover(false)}>
+
+ {!props.showChanges ? renderName() : ""}
|
- {getSeconds(props.newTime)} sec ({props.deltaTime}) ticks
+ {getSeconds(props.newTime)} sec
|
{
props.newHp.map( (num, index) => {
- return (
- {getContent(round(num), index)}
+ return (
+ |
+ {getContent(num, index)}
| )
})
}
);
}
+ const renderName = () => {
+ return (
+ hover ?
+ props.type :
+ props.type.substring(0, 25)
+ )
+ }
return (
<>
- {renderDeltas()}
- {renderResults()}
+ {props.showChanges ? renderDeltas() : ""}
+ {props.showResults ? renderResults() : ""}
>
);
}
\ No newline at end of file
diff --git a/src/features/weapon/WeaponEditor.tsx b/src/features/weapon/WeaponEditor.tsx
index 45c0bf4..296252a 100644
--- a/src/features/weapon/WeaponEditor.tsx
+++ b/src/features/weapon/WeaponEditor.tsx
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import { Button, ButtonGroup, Col, Form, Row, Image } from "react-bootstrap";
import NumericInput from "react-numeric-input";
-import { getDamage, getDamageEquation, getSeconds, getTicks, preset, toString } from "./weapon";
+import { getDamage, getDamageEquation, getSeconds, getTicks, percentCharge, preset, toString } from "./weapon";
import { DropInput } from "../item/Parts";
import { defaultWeapon, FIST, makeWeapon, TRIDENT, Weapon, WEAPONS, WEAPON_MATERIALS } from "./weapon";
import { WeaponDamageGraph } from "./WeaponDamageGraph";
@@ -67,7 +67,7 @@ export function WeaponEditor() {