Fixes an NRE when the BTR kills an enemy while using cover fire service
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#82
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
This makes SPT mimic live in how scav encyclopedia is handled
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#81
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
- Move clearing trader service data to raid end instead of as part of BTR Manager
- Fix data type for TraderServices ItemsToPay property
- Add ItemsToReceive property to TraderServices (Used for LK amulet)
- Don't throw NRE when nothing is bound to OnTraderServicePurchased
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#79
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
When exiting the hideout, the HideoutPlayer class ends up triggering a call in Player that calculates quest counter changes. This causes issues with quests that require not dying
The Player class however wraps these calls in a null check on the QuestController, so we can set it to null before ending the hideout session, and restore it afterwards to skip quest counter calculations
As Hideout Game end only triggers on start of a new raid, and not when you actually close the hideout, I can't think of any reason that quest counters should trigger in this scenario
Resolves: SPT-AKI/Issues#471
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#78
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
- Add a patch that's triggered when the item list for the scav post-raid screen is populated that stores the calculated item value
- Add a second patch that's triggered when the player confirms a Sell All, that uses a custom request object that contains the previously calculated sell price
I made these patches not directly depend on any GClass/Class names to avoid having to update them with new client versions, this did make the code a bit harder to follow, but I think it's still readable.
Requires server PR: SPT-AKI/Server#216
Resolves: SPT-AKI/Issues#410
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#77
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
**Description**
As of right now `ValidationUtil.cs` does not perform it's intended function, and the callers of it are not properly using the result.
Removed the redundant calls and implemented `GameValidationPatch.cs` to properly implement this behavior.
If the check fails;
1. All interface elements are disabled.
2. Notification popup is sent.
3. Logs are sent to the `Console`, `Server` and `BepInEx`.
**Related**
Closes: SPT-AKI/Issues#435
**Showcase**
https://streamable.com/2ra4sa
Co-authored-by: Deadly <info.saddiki@gmail.com>
Reviewed-on: SPT-AKI/Modules#76
Co-authored-by: Deadly Alden <deadly@noreply.dev.sp-tarkov.com>
Co-committed-by: Deadly Alden <deadly@noreply.dev.sp-tarkov.com>
* Turns out the Chainloader can be accessed from outside a BepInPlugin. Whoops
* A user-friendly error will be displayed before the game exits so that it's clear as to what's going wrong. Should prevent reports of crashing on game load now
Co-authored-by: Terkoiz <terkoiz@spt.dev>
Reviewed-on: SPT-AKI/Modules#75
Co-authored-by: Terkoiz <terkoiz@noreply.dev.sp-tarkov.com>
Co-committed-by: Terkoiz <terkoiz@noreply.dev.sp-tarkov.com>
By multiplying `moveSpeed` by `Time.deltaTime` in `BTRVehicle.Update()`, it prevents the BTR movement from desyncing, and possibly going faster or slower than expected.
Reviewed-on: SPT-AKI/Modules#73
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
- Before `Application.targetFrameRate` is used in the BTR code, set it to 60. Then set it back afterwards
- Remove an unnecessary error from BTRExtractPassengersPatch, not actually an error state
All credit goes to Ngst for figuring out that NVidia Reflex was causing the BTR issues
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#71
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Honestly this is just a shot in the dark hotfix. I've tested it and these changes still work fine for me.
Let me know if this fixes the BTR not working, Chomp
Reviewed-on: SPT-AKI/Modules#69
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
Todo:
* Make BTR spawn at random time during raid instead of at start
* ~~Fix BTR trader services not working for subsequent raids in Streets~~ Drakia provided me with a fix and it's included in this PR
TL;DR - It's ready for testing
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#68
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
Todo:
* Make BTR spawn at random time during raid instead of at the start
* Find out why some players receive error relating to `BTRBotAttachPatch` resulting BTR failing to initialise
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#67
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
- Move most BTR code to Aki.Custom (Leaving debug commands in Aki.Debugging)
- Make BTR patches public to match other patches
- Disable debug BTR command patches
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#66
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
- Move creation/init of the BTRManager to before the `ExtractionTimerPanel.SetTime` method, to fix BTR timer panel not functioning
- Add subserviceId to the `OnTraderServicePurchased` event
- Add BTR taxi service handling
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#64
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Todo:
* Taxi service
* Improve turret aim/firing
* Switch targets when current target out of line of sight
* Allow certain aspects to be configured from server, for example: price multipliers, wait times at each location, etc.
* Perhaps, a persisting blacklist from the BTR for several raids afterwards
* Further code refactoring
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#63
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
Todo:
* Taxi service
* Refinement of BTR turret aim/shooting
* BTR should switch targets if it has no line of sight to current target
* Blacklist player from entering BTR after antagonising it
* Perhaps make blacklist persist for 3 raids (apparently on Live?)
* Code refactor because it currently looks like doodoo
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#62
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>