update constants

* added OperationNames
* added faction names
* used citynames where appropriate
This commit is contained in:
phyzical
2022-03-19 16:09:59 +08:00
parent adf2615784
commit 44ea479043
41 changed files with 1007 additions and 919 deletions

View File

@@ -16,6 +16,7 @@ import Typography from "@mui/material/Typography";
import Paper from "@mui/material/Paper";
import Button from "@mui/material/Button";
import { SelectChangeEvent } from "@mui/material/Select";
import { FactionNames } from "../../Faction/data/FactionNames";
interface IProps {
player: IPlayer;
@@ -28,7 +29,7 @@ const serversMap: { [key: string]: string } = {};
export function HacknetUpgradeElem(props: IProps): React.ReactElement {
const [selectedServer, setSelectedServer] = useState(
serversMap[props.upg.name] ? serversMap[props.upg.name] : "ecorp",
serversMap[props.upg.name] ? serversMap[props.upg.name] : FactionNames.ECorp.toLowerCase(),
);
function changeTargetServer(event: SelectChangeEvent<string>): void {
setSelectedServer(event.target.value);
@@ -42,7 +43,7 @@ export function HacknetUpgradeElem(props: IProps): React.ReactElement {
if (!res) {
dialogBoxCreate(
"Failed to purchase upgrade. This may be because you do not have enough hashes, " +
"or because you do not have access to the feature upgrade affects.",
"or because you do not have access to the feature upgrade affects.",
);
}
props.rerender();