From f25756916a511e20096b403b6c2c6296b2ac8e9f Mon Sep 17 00:00:00 2001
From: G4mingJon4s <40526179+G4mingJon4s@users.noreply.github.com>
Date: Wed, 12 Jun 2024 10:21:27 +0200
Subject: [PATCH] GANG: added effective text to gang UI gains (#1379)
---
src/Gang/ui/GangStats.tsx | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/Gang/ui/GangStats.tsx b/src/Gang/ui/GangStats.tsx
index f2cbd1cee..67ad3409f 100644
--- a/src/Gang/ui/GangStats.tsx
+++ b/src/Gang/ui/GangStats.tsx
@@ -14,6 +14,7 @@ import { useGang } from "./Context";
import Typography from "@mui/material/Typography";
import Tooltip from "@mui/material/Tooltip";
import Box from "@mui/material/Box";
+import { GangConstants } from "../data/Constants";
export function GangStats(): React.ReactElement {
const gang = useGang();
@@ -40,7 +41,10 @@ export function GangStats(): React.ReactElement {
}
>
- Respect: {formatRespect(gang.respect)} ({formatRespect(5 * gang.respectGainRate)} / sec)
+ Respect: {formatRespect(gang.respect)} ({formatRespect(5 * gang.respectGainRate)} / sec){" "}
+ {gang.storedCycles > 2 * GangConstants.maxCyclesToProcess
+ ? `[Effective Gain: ${formatRespect(5 * gang.respectGainRate * GangConstants.maxCyclesToProcess)} / sec]`
+ : ""}
@@ -55,7 +59,10 @@ export function GangStats(): React.ReactElement {
}
>
- Wanted Level: {formatWanted(gang.wanted)} ({formatWanted(5 * gang.wantedGainRate)} / sec)
+ Wanted Level: {formatWanted(gang.wanted)} ({formatWanted(5 * gang.wantedGainRate)} / sec){" "}
+ {gang.storedCycles > 2 * GangConstants.maxCyclesToProcess
+ ? `[Effective Gain: ${formatWanted(5 * gang.wantedGainRate * GangConstants.maxCyclesToProcess)} / sec]`
+ : ""}
@@ -69,7 +76,14 @@ export function GangStats(): React.ReactElement {
- Money gain rate:
+ Money gain rate: {" "}
+ {gang.storedCycles > 2 * GangConstants.maxCyclesToProcess ? "[Effective Gain:" : ""}{" "}
+ {gang.storedCycles > 2 * GangConstants.maxCyclesToProcess ? (
+
+ ) : (
+ ""
+ )}
+ {gang.storedCycles > 2 * GangConstants.maxCyclesToProcess ? "]" : ""}