UI: Fix #3366 Sleeve UI would sometime display the stat in TaskSelector while working out.

fixes #3366

 Sleeve.gymStatType will now be constrainded to the following values by Sleeve.workoutAtGym() :
"none" , "str", "def", "dex", "agi". (could previously be anything inputted by player through API)
Sleeve.updateGainTaskRate() and TaskSelector.tasks's initializer block will now use a switch, expecting one of those value, instead of reevaluating the string.

(fixing commit issue)
This commit is contained in:
borisflagell
2022-05-23 20:03:13 +02:00
parent 27bf6cba39
commit 8af4fb1d5a
2 changed files with 47 additions and 22 deletions
+14 -2
View File
@@ -270,8 +270,20 @@ function getABC(sleeve: Sleeve): [string, string, string] {
return ["Commit Crime", sleeve.crimeType, "------"];
case SleeveTaskType.Class:
return ["Take University Course", sleeve.className, sleeve.currentTaskLocation];
case SleeveTaskType.Gym:
return ["Workout at Gym", sleeve.gymStatType, sleeve.currentTaskLocation];
case SleeveTaskType.Gym: {
switch (sleeve.gymStatType) {
case "none":
return ["Idle", "------", "------"];
case "str":
return ["Workout at Gym", "Train Strength", sleeve.currentTaskLocation];
case "def":
return ["Workout at Gym", "Train Defense", sleeve.currentTaskLocation];
case "dex":
return ["Workout at Gym", "Train Dexterity", sleeve.currentTaskLocation];
case "agi":
return ["Workout at Gym", "Train Agility", sleeve.currentTaskLocation];
}
}
case SleeveTaskType.Bladeburner:
return ["Perform Bladeburner Actions", sleeve.bbAction, sleeve.bbContract];
case SleeveTaskType.Recovery: