mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 08:50: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:
parent
c5277177c3
commit
bbf56f7d23
@ -442,7 +442,7 @@ export class BotGenerator {
|
|||||||
const chosenBodyTemplate = this.databaseService.getCustomization()[bot.Customization.Body];
|
const chosenBodyTemplate = this.databaseService.getCustomization()[bot.Customization.Body];
|
||||||
|
|
||||||
// Find the body/hands mapping
|
// Find the body/hands mapping
|
||||||
const matchingBody: IWildBody = bodyGlobalDict[chosenBodyTemplate?._name];
|
const matchingBody: IWildBody = bodyGlobalDict[chosenBodyTemplate?._name]?.[bot.Customization.Body];
|
||||||
if (matchingBody?.isNotRandom) {
|
if (matchingBody?.isNotRandom) {
|
||||||
// Has fixed hands for this body, set them
|
// Has fixed hands for this body, set them
|
||||||
bot.Customization.Hands = matchingBody.hands;
|
bot.Customization.Hands = matchingBody.hands;
|
||||||
|
@ -126,7 +126,7 @@ export class BotLootCacheService {
|
|||||||
return false;
|
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);
|
return this.cloner.clone(result);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user