fix: negative resistance with polarized modules (#167)
This commit is contained in:
@@ -109,6 +109,9 @@ export function useAttribute(type: "Ship" | "Char", props: AttributeProps): { va
|
||||
if (Object.is(value, -0)) {
|
||||
value = 0;
|
||||
}
|
||||
if (props.isResistance) {
|
||||
value = Math.max(value, 0);
|
||||
}
|
||||
|
||||
return {
|
||||
value: value.toLocaleString("en", {
|
||||
|
||||
Reference in New Issue
Block a user