Update ExtraSizeDown property
This commit is contained in:
parent
459ec0d101
commit
9edbcccb36
15
src/mod.ts
15
src/mod.ts
@ -5,9 +5,9 @@ import { DependencyContainer } from "tsyringe";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { ITemplateItem, Props } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
|
||||
import config from "../config.json";
|
||||
import { ITemplateItem, Props } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
|
||||
class TwoSlotExtendedMags implements IPostDBLoadMod {
|
||||
private logger: ILogger;
|
||||
@ -29,16 +29,17 @@ class TwoSlotExtendedMags implements IPostDBLoadMod {
|
||||
const item = itemTable[itemId];
|
||||
|
||||
if (this.isExtendedMag(item)) {
|
||||
this.updateInventorySlotSize(item._props);
|
||||
const itemProp = item._props;
|
||||
|
||||
itemProp.Height = 2;
|
||||
|
||||
if (itemProp.ExtraSizeDown) {
|
||||
itemProp.ExtraSizeDown--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private updateInventorySlotSize(itemProp: Props): void {
|
||||
itemProp.Height = 2;
|
||||
// itemProp.ExtraSizeDown = config.newMagazineInventorySlotSize--;
|
||||
}
|
||||
|
||||
private isExtendedMag(item: ITemplateItem): boolean {
|
||||
const magazineCategoryId = "5448bc234bdc2d3c308b4569";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user