diff --git a/src/PersonObjects/Sleeve/Sleeve.ts b/src/PersonObjects/Sleeve/Sleeve.ts index cbbbdf35a..0f7ba828a 100644 --- a/src/PersonObjects/Sleeve/Sleeve.ts +++ b/src/PersonObjects/Sleeve/Sleeve.ts @@ -256,6 +256,10 @@ export class Sleeve extends Person implements SleevePerson { /** Travel to another City. Costs money from player */ travel(newCity: CityName): boolean { + if (!Player.canAfford(CONSTANTS.TravelCost)) { + return false; + } + Player.loseMoney(CONSTANTS.TravelCost, "sleeves"); this.city = newCity; diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index a5a84427f..4eb0542b9 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -4473,7 +4473,7 @@ export interface Sleeve { setToGymWorkout(sleeveNumber: number, gymName: string, stat: string): boolean; /** - * Make a sleeve travel to another city. + * Make a sleeve travel to another city. The cost for using this function is the same as for a player. * @remarks * RAM cost: 4 GB *