Updates sleeve functions so names match

This commit is contained in:
Heinous Tugboat 2022-04-09 18:40:01 -04:00
parent 758b0e1127
commit dd19d6451d

@ -97,7 +97,7 @@ export function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, hel
travel: function (_sleeveNumber: unknown, _cityName: unknown): boolean { travel: function (_sleeveNumber: unknown, _cityName: unknown): boolean {
updateRam("travel"); updateRam("travel");
const sleeveNumber = helper.number("travel", "sleeveNumber", _sleeveNumber); const sleeveNumber = helper.number("travel", "sleeveNumber", _sleeveNumber);
const cityName = helper.string("setToUniversityCourse", "cityName", _cityName); const cityName = helper.string("travel", "cityName", _cityName);
checkSleeveAPIAccess("travel"); checkSleeveAPIAccess("travel");
checkSleeveNumber("travel", sleeveNumber); checkSleeveNumber("travel", sleeveNumber);
return player.sleeves[sleeveNumber].travel(player, cityName as CityName); return player.sleeves[sleeveNumber].travel(player, cityName as CityName);
@ -105,7 +105,7 @@ export function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, hel
setToCompanyWork: function (_sleeveNumber: unknown, acompanyName: unknown): boolean { setToCompanyWork: function (_sleeveNumber: unknown, acompanyName: unknown): boolean {
updateRam("setToCompanyWork"); updateRam("setToCompanyWork");
const sleeveNumber = helper.number("setToCompanyWork", "sleeveNumber", _sleeveNumber); const sleeveNumber = helper.number("setToCompanyWork", "sleeveNumber", _sleeveNumber);
const companyName = helper.string("setToUniversityCourse", "companyName", acompanyName); const companyName = helper.string("setToCompanyWork", "companyName", acompanyName);
checkSleeveAPIAccess("setToCompanyWork"); checkSleeveAPIAccess("setToCompanyWork");
checkSleeveNumber("setToCompanyWork", sleeveNumber); checkSleeveNumber("setToCompanyWork", sleeveNumber);
@ -117,7 +117,7 @@ export function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, hel
const other = player.sleeves[i]; const other = player.sleeves[i];
if (other.currentTask === SleeveTaskType.Company && other.currentTaskLocation === companyName) { if (other.currentTask === SleeveTaskType.Company && other.currentTaskLocation === companyName) {
throw helper.makeRuntimeErrorMsg( throw helper.makeRuntimeErrorMsg(
"sleeve.setToFactionWork", "sleeve.setToCompanyWork",
`Sleeve ${sleeveNumber} cannot work for company ${companyName} because Sleeve ${i} is already working for them.`, `Sleeve ${sleeveNumber} cannot work for company ${companyName} because Sleeve ${i} is already working for them.`,
); );
} }
@ -132,8 +132,8 @@ export function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, hel
): boolean | undefined { ): boolean | undefined {
updateRam("setToFactionWork"); updateRam("setToFactionWork");
const sleeveNumber = helper.number("setToFactionWork", "sleeveNumber", _sleeveNumber); const sleeveNumber = helper.number("setToFactionWork", "sleeveNumber", _sleeveNumber);
const factionName = helper.string("setToUniversityCourse", "factionName", _factionName); const factionName = helper.string("setToFactionWork", "factionName", _factionName);
const workType = helper.string("setToUniversityCourse", "workType", _workType); const workType = helper.string("setToFactionWork", "workType", _workType);
checkSleeveAPIAccess("setToFactionWork"); checkSleeveAPIAccess("setToFactionWork");
checkSleeveNumber("setToFactionWork", sleeveNumber); checkSleeveNumber("setToFactionWork", sleeveNumber);
@ -163,8 +163,8 @@ export function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, hel
setToGymWorkout: function (_sleeveNumber: unknown, _gymName: unknown, _stat: unknown): boolean { setToGymWorkout: function (_sleeveNumber: unknown, _gymName: unknown, _stat: unknown): boolean {
updateRam("setToGymWorkout"); updateRam("setToGymWorkout");
const sleeveNumber = helper.number("setToGymWorkout", "sleeveNumber", _sleeveNumber); const sleeveNumber = helper.number("setToGymWorkout", "sleeveNumber", _sleeveNumber);
const gymName = helper.string("setToUniversityCourse", "gymName", _gymName); const gymName = helper.string("setToGymWorkout", "gymName", _gymName);
const stat = helper.string("setToUniversityCourse", "stat", _stat); const stat = helper.string("setToGymWorkout", "stat", _stat);
checkSleeveAPIAccess("setToGymWorkout"); checkSleeveAPIAccess("setToGymWorkout");
checkSleeveNumber("setToGymWorkout", sleeveNumber); checkSleeveNumber("setToGymWorkout", sleeveNumber);