mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-13 02:50:04 +02:00
hotfix
This commit is contained in:
@@ -168,9 +168,9 @@ export function CompanyLocation(props: IProps): React.ReactElement {
|
||||
const pos = companyPosition;
|
||||
if (pos instanceof CompanyPosition) {
|
||||
if (pos.isPartTimeJob() || pos.isSoftwareConsultantJob() || pos.isBusinessConsultantJob()) {
|
||||
p.startWorkPartTime(props.locName);
|
||||
p.startWorkPartTime(router, props.locName);
|
||||
} else {
|
||||
p.startWork(props.locName);
|
||||
p.startWork(router, props.locName);
|
||||
}
|
||||
router.toWork();
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export function GenericLocation({ loc }: IProps): React.ReactElement {
|
||||
}
|
||||
|
||||
if (loc.types.includes(LocationType.Gym)) {
|
||||
content.push(<GymLocation key={"gymlocation"} loc={loc} p={player} />);
|
||||
content.push(<GymLocation key={"gymlocation"} router={router} loc={loc} p={player} />);
|
||||
}
|
||||
|
||||
if (loc.types.includes(LocationType.Hospital)) {
|
||||
|
||||
@@ -15,10 +15,12 @@ import { SpecialServerIps } from "../../Server/SpecialServerIps";
|
||||
|
||||
import { StdButton } from "../../ui/React/StdButton";
|
||||
import { Money } from "../../ui/React/Money";
|
||||
import { IRouter } from "../../ui/Router";
|
||||
|
||||
type IProps = {
|
||||
loc: Location;
|
||||
p: IPlayer;
|
||||
router: IRouter;
|
||||
};
|
||||
|
||||
export class GymLocation extends React.Component<IProps, any> {
|
||||
@@ -50,7 +52,7 @@ export class GymLocation extends React.Component<IProps, any> {
|
||||
|
||||
train(stat: string): void {
|
||||
const loc = this.props.loc;
|
||||
this.props.p.startClass(this.calculateCost(), loc.expMult, stat);
|
||||
this.props.p.startClass(this.props.router, this.calculateCost(), loc.expMult, stat);
|
||||
}
|
||||
|
||||
trainStrength(): void {
|
||||
|
||||
@@ -18,96 +18,84 @@ export function SlumsLocation(): React.ReactElement {
|
||||
if (!e.isTrusted) {
|
||||
return;
|
||||
}
|
||||
Crimes.Shoplift.commit(player);
|
||||
router.toWork();
|
||||
Crimes.Shoplift.commit(router, player);
|
||||
}
|
||||
|
||||
function robStore(e: React.MouseEvent<HTMLElement>): void {
|
||||
if (!e.isTrusted) {
|
||||
return;
|
||||
}
|
||||
Crimes.RobStore.commit(player);
|
||||
router.toWork();
|
||||
Crimes.RobStore.commit(router, player);
|
||||
}
|
||||
|
||||
function mug(e: React.MouseEvent<HTMLElement>): void {
|
||||
if (!e.isTrusted) {
|
||||
return;
|
||||
}
|
||||
Crimes.Mug.commit(player);
|
||||
router.toWork();
|
||||
Crimes.Mug.commit(router, player);
|
||||
}
|
||||
|
||||
function larceny(e: React.MouseEvent<HTMLElement>): void {
|
||||
if (!e.isTrusted) {
|
||||
return;
|
||||
}
|
||||
Crimes.Larceny.commit(player);
|
||||
router.toWork();
|
||||
Crimes.Larceny.commit(router, player);
|
||||
}
|
||||
|
||||
function dealDrugs(e: React.MouseEvent<HTMLElement>): void {
|
||||
if (!e.isTrusted) {
|
||||
return;
|
||||
}
|
||||
Crimes.DealDrugs.commit(player);
|
||||
router.toWork();
|
||||
Crimes.DealDrugs.commit(router, player);
|
||||
}
|
||||
|
||||
function bondForgery(e: React.MouseEvent<HTMLElement>): void {
|
||||
if (!e.isTrusted) {
|
||||
return;
|
||||
}
|
||||
Crimes.BondForgery.commit(player);
|
||||
router.toWork();
|
||||
Crimes.BondForgery.commit(router, player);
|
||||
}
|
||||
|
||||
function traffickArms(e: React.MouseEvent<HTMLElement>): void {
|
||||
if (!e.isTrusted) {
|
||||
return;
|
||||
}
|
||||
Crimes.TraffickArms.commit(player);
|
||||
router.toWork();
|
||||
Crimes.TraffickArms.commit(router, player);
|
||||
}
|
||||
|
||||
function homicide(e: React.MouseEvent<HTMLElement>): void {
|
||||
if (!e.isTrusted) {
|
||||
return;
|
||||
}
|
||||
Crimes.Homicide.commit(player);
|
||||
router.toWork();
|
||||
Crimes.Homicide.commit(router, player);
|
||||
}
|
||||
|
||||
function grandTheftAuto(e: React.MouseEvent<HTMLElement>): void {
|
||||
if (!e.isTrusted) {
|
||||
return;
|
||||
}
|
||||
Crimes.GrandTheftAuto.commit(player);
|
||||
router.toWork();
|
||||
Crimes.GrandTheftAuto.commit(router, player);
|
||||
}
|
||||
|
||||
function kidnap(e: React.MouseEvent<HTMLElement>): void {
|
||||
if (!e.isTrusted) {
|
||||
return;
|
||||
}
|
||||
Crimes.Kidnap.commit(player);
|
||||
router.toWork();
|
||||
Crimes.Kidnap.commit(router, player);
|
||||
}
|
||||
|
||||
function assassinate(e: React.MouseEvent<HTMLElement>): void {
|
||||
if (!e.isTrusted) {
|
||||
return;
|
||||
}
|
||||
Crimes.Assassination.commit(player);
|
||||
router.toWork();
|
||||
Crimes.Assassination.commit(router, player);
|
||||
}
|
||||
|
||||
function heist(e: React.MouseEvent<HTMLElement>): void {
|
||||
if (!e.isTrusted) {
|
||||
return;
|
||||
}
|
||||
Crimes.Heist.commit(player);
|
||||
router.toWork();
|
||||
Crimes.Heist.commit(router, player);
|
||||
}
|
||||
|
||||
const shopliftChance = Crimes.Shoplift.successRate(player);
|
||||
|
||||
@@ -34,8 +34,7 @@ export function UniversityLocation(props: IProps): React.ReactElement {
|
||||
|
||||
function take(stat: string): void {
|
||||
const loc = props.loc;
|
||||
player.startClass(calculateCost(), loc.expMult, stat);
|
||||
router.toWork();
|
||||
player.startClass(router, calculateCost(), loc.expMult, stat);
|
||||
}
|
||||
|
||||
function study(): void {
|
||||
|
||||
Reference in New Issue
Block a user