Should address massive flea rep gains. Tested about 10 cases, all seem within expected range.
Divided ratingIncreaseCount by a factor of 100000
Co-authored-by: Corey <dirtbikercj@gmail.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/242
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
Refactored `registerProduction()` to also use this code
Fix code that was getting value to 4dp, not 3dp
Skip doing work in `getHideoutManagementConsumptionBonus()` if hideoutMgmt skill is 0
The error people are getting about a lock file already existing is due to `checkFileSync` returning false if the lock file is "stale".
The default "stale" timeout is 10 seconds, so if a save takes longer than this, the user will end up in a state where they can no longer save.
The documentation for `proper-lockfile` recommends using the callback returned by `lockFileSync` to remove the lock file, so I've switched to using this, and the error no longer occurs with long running save operations
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/239
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
This resolves an issue where FiR tools were coming back as non-FiR. We now just store the whole .upd property, so any stats on the tool should carry over to after the craft is finished
Note: Will break any in-progress crafts that use tools
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/238
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
#### Summary
> Should fix [Issue 523](https://dev.sp-tarkov.com/SPT-AKI/Issues/issues/523)
Tested a few different scenarios and the items were always correctly removed and returned to the player, however I did see the console warnings reported in the issue.
Both of the following call `this.ragfairOfferHandler.removeOffer(...)`:
- `this.returnPlayerOffer(...)`
- `this.removeOfferById(...)`
The latter logs a warning to the console because the offer is already removed when we reach that point.
This fix simply returns after the offer has been returned to the player, letting `returnPlayerOffer` deal with removing from the flea
Co-authored-by: phrisk <phrisk@phrisk.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/237
Co-authored-by: phrisk <phrisk@noreply.dev.sp-tarkov.com>
Co-committed-by: phrisk <phrisk@noreply.dev.sp-tarkov.com>