When bsg flea blacklsit is disabled, set all items as sellable on flea
This commit is contained in:
parent
a1159b87eb
commit
a912f7c9cd
@ -20,6 +20,7 @@ import { Traders } from "../models/enums/Traders";
|
|||||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILocationData } from "../models/spt/server/ILocations";
|
import { ILocationData } from "../models/spt/server/ILocations";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -42,6 +43,7 @@ export class GameController
|
|||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
protected coreConfig: ICoreConfig;
|
protected coreConfig: ICoreConfig;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
|
protected ragfairConfig: IRagfairConfig;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@inject("WinstonLogger") protected logger: ILogger,
|
@inject("WinstonLogger") protected logger: ILogger,
|
||||||
@ -66,6 +68,7 @@ export class GameController
|
|||||||
this.httpConfig = this.configServer.getConfig(ConfigTypes.HTTP);
|
this.httpConfig = this.configServer.getConfig(ConfigTypes.HTTP);
|
||||||
this.coreConfig = this.configServer.getConfig(ConfigTypes.CORE);
|
this.coreConfig = this.configServer.getConfig(ConfigTypes.CORE);
|
||||||
this.locationConfig = this.configServer.getConfig(ConfigTypes.LOCATION);
|
this.locationConfig = this.configServer.getConfig(ConfigTypes.LOCATION);
|
||||||
|
this.ragfairConfig = this.configServer.getConfig(ConfigTypes.RAGFAIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -173,6 +176,12 @@ export class GameController
|
|||||||
{
|
{
|
||||||
this.warnOnActiveBotReloadSkill(pmcProfile);
|
this.warnOnActiveBotReloadSkill(pmcProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flea bsg blacklist is off
|
||||||
|
if (!this.ragfairConfig.dynamic.blacklist.enableBsgList)
|
||||||
|
{
|
||||||
|
this.flagAllItemsInDbAsSellableOnFlea();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,6 +343,18 @@ export class GameController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected flagAllItemsInDbAsSellableOnFlea(): void
|
||||||
|
{
|
||||||
|
const dbItems = Object.values(this.databaseServer.getTables().templates.items);
|
||||||
|
for (const item of dbItems)
|
||||||
|
{
|
||||||
|
if (item._type === "Item" && !item._props?.CanSellOnRagfair)
|
||||||
|
{
|
||||||
|
item._props.CanSellOnRagfair = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When player logs in, iterate over all active effects and reduce timer
|
* When player logs in, iterate over all active effects and reduce timer
|
||||||
* TODO - add body part HP regen
|
* TODO - add body part HP regen
|
||||||
|
Loading…
Reference in New Issue
Block a user