Don't allow production timers to be reduced below 5 seconds (!375)

This should avoid potential issues when mods drastically increase the crafting skill level, or otherwise modify the profile in ways that cause negative production times

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/375
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
This commit is contained in:
DrakiaXYZ 2024-07-15 19:33:38 +00:00 committed by chomp
parent 3dcb65cf41
commit c46cdaeb18

View File

@ -643,6 +643,12 @@ export class HideoutHelper
modifiedProductionTime = 40;
}
// Sanity check, don't let anything craft in less than 5 seconds
if (modifiedProductionTime < 5)
{
modifiedProductionTime = 5;
}
return modifiedProductionTime;
}