BUGFIX: Fix wrong money source when traveling (#1456)

This commit is contained in:
catloversg 2024-07-05 04:19:36 +07:00 committed by GitHub
parent 313d6a28b6
commit 26316c2494
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -5,6 +5,7 @@ import { currentNodeMults } from "../BitNode/BitNodeMultipliers";
import { Player } from "@player";
import { WorkStats } from "@nsdefs";
import { CONSTANTS } from "../Constants";
import { PlayerObject } from "./Player/PlayerObject";
export function gainHackingExp(this: Person, exp: number): void {
if (isNaN(exp)) {
@ -176,7 +177,7 @@ export function travel(this: Person, cityName: CityName): boolean {
return false;
}
Player.loseMoney(CONSTANTS.TravelCost, "sleeves");
Player.loseMoney(CONSTANTS.TravelCost, this instanceof PlayerObject ? "other" : "sleeves");
this.city = cityName;
return true;