mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Update updateProductionTimers()
to handle Progress
value being undefined
This commit is contained in:
parent
37029791da
commit
d2f4327871
@ -233,6 +233,12 @@ export class HideoutHelper
|
|||||||
delete pmcData.Hideout.Production[prodId];
|
delete pmcData.Hideout.Production[prodId];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (craft.Progress === undefined)
|
||||||
|
{
|
||||||
|
this.logger.warning(`Craft ${prodId} has an undefined progress value, defaulting to 0`);
|
||||||
|
craft.Progress = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Craft complete, skip processing (Don't skip continious crafts like bitcoin farm)
|
// Craft complete, skip processing (Don't skip continious crafts like bitcoin farm)
|
||||||
if (craft.Progress >= craft.ProductionTime && prodId !== HideoutHelper.bitcoinFarm)
|
if (craft.Progress >= craft.ProductionTime && prodId !== HideoutHelper.bitcoinFarm)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user