From 1cb2a83b4fab11c3644e49467ca1798f38da2582 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Wed, 8 Jan 2025 13:35:29 +0700 Subject: [PATCH] UI: Share RAM to boost reputation gain (#1862) --- src/Faction/ui/FactionRoot.tsx | 4 +- src/Faction/ui/Info.tsx | 1 - src/Faction/ui/ShareOption.tsx | 87 ++++++++++++++++++++++++ src/NetscriptFunctions.ts | 20 +++--- src/NetworkShare/Share.ts | 57 ++++++++++++++++ src/NetworkShare/Share.tsx | 12 ---- src/NetworkShare/formulas/share.tsx | 5 -- src/PersonObjects/formulas/reputation.ts | 8 +-- src/Prestige.ts | 8 +++ src/Server/BaseServer.ts | 3 +- 10 files changed, 169 insertions(+), 36 deletions(-) create mode 100644 src/Faction/ui/ShareOption.tsx create mode 100644 src/NetworkShare/Share.ts delete mode 100644 src/NetworkShare/Share.tsx delete mode 100644 src/NetworkShare/formulas/share.tsx diff --git a/src/Faction/ui/FactionRoot.tsx b/src/Faction/ui/FactionRoot.tsx index be324619e..643224cb1 100644 --- a/src/Faction/ui/FactionRoot.tsx +++ b/src/Faction/ui/FactionRoot.tsx @@ -22,6 +22,7 @@ import { GangButton } from "./GangButton"; import { FactionWork } from "../../Work/FactionWork"; import { useCycleRerender } from "../../ui/React/hooks"; import { repNeededToDonate } from "../formulas/donation"; +import { ShareOption } from "./ShareOption"; type FactionRootProps = { faction: Faction; @@ -45,7 +46,7 @@ const securityWorkInfo = "You will gain exp for all combat stats and hacking."; const augmentationsInfo = "As your reputation with this faction rises, you will " + - "unlock Augmentations, which you can purchase to enhance " + + "unlock augmentations, which you can purchase to enhance " + "your abilities."; const sleevePurchasesInfo = "Purchase Duplicate Sleeves and upgrades. These are permanent!"; @@ -131,6 +132,7 @@ function MainPage({ faction, rerender, onAugmentations }: IMainProps): React.Rea {!isPlayersGang && factionInfo.offersWork() && ( )} + {!isPlayersGang && factionInfo.offersWork() && }