Sleeve criming fix (#209)

Also simplify usage of findCrime
This commit is contained in:
Snarling
2022-11-10 11:05:42 -05:00
committed by GitHub
parent 82ba5f1f13
commit 426ad5f296
5 changed files with 7 additions and 12 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ export class Sleeve extends Person implements ISleeve {
}
/** Commit crimes */
commitCrime(type: CrimeType): boolean {
commitCrime(type: CrimeType) {
this.startWork(new SleeveCrimeWork(type));
return true;
}
+1 -2
View File
@@ -46,8 +46,7 @@ export function SleeveElem(props: IProps): React.ReactElement {
props.sleeve.workForFaction(abc[1], abc[2]);
break;
case "Commit Crime":
const crimeType = findCrime(abc[1])?.type ?? CrimeType.SHOPLIFT;
props.sleeve.commitCrime(crimeType);
props.sleeve.commitCrime(findCrime(abc[1])?.type ?? CrimeType.SHOPLIFT);
break;
case "Take University Course":
props.sleeve.takeUniversityCourse(abc[2], abc[1]);