0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 06:30:43 -05:00

Potential Type Fixes

These are possible fixes for the two type errors that are currently holding back type checking this branch. I say possible because it's not tested in game and I've only solved the issues with the current types and have no idea if the types are actually correct.

Needs a review.
This commit is contained in:
Refringe 2025-01-07 19:35:37 -05:00
parent c5277177c3
commit bbf56f7d23
Signed by: Refringe
SSH Key Fingerprint: SHA256:t865XsQpfTeqPRBMN2G6+N8wlDjkgUCZF3WGW6O9N/k
2 changed files with 2 additions and 2 deletions

View File

@ -442,7 +442,7 @@ export class BotGenerator {
const chosenBodyTemplate = this.databaseService.getCustomization()[bot.Customization.Body];
// Find the body/hands mapping
const matchingBody: IWildBody = bodyGlobalDict[chosenBodyTemplate?._name];
const matchingBody: IWildBody = bodyGlobalDict[chosenBodyTemplate?._name]?.[bot.Customization.Body];
if (matchingBody?.isNotRandom) {
// Has fixed hands for this body, set them
bot.Customization.Hands = matchingBody.hands;

View File

@ -126,7 +126,7 @@ export class BotLootCacheService {
return false;
});
return this.cloner.clone(Object.fromEntries(filteredResult));
return this.cloner.clone(Object.fromEntries(filteredResult) as Record<string, number>);
}
return this.cloner.clone(result);