- 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>
I've moved trader services handling from Aki.Debugging BTR code into Aki.SinglePlayer
This simplifies some of the code, and allows a more "generic" implementation.
I've also patched the GetTraderServicesDataFromServer and TryPurchaseTraderService methods to properly utilize the TraderServicesManager for storing service state
For now, this makes Aki.Debugging depend on Aki.SinglePlayer, this can be reverted once the BTR stuff is moved
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#61
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Should make the BTR work again.
I've also switched named methods to use "nameof" where it made sense. And removed an unnecessary method call and fixed an incorrect async on one of my patches
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#59
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Depends on SPT-AKI/SPT-AssemblyTool#3
* Refactored Modules for better consistency and general readability, along with preparing the code for a publicized assembly
* Added `PublicDeclaredFlags` to `PatchConstants` to cover a set of commonly used flags to get methods post-publicizing
* Added a replacement to LINQ's `.Single()` - `.SingleCustom()` which has improved logging to help with debugging Module code. Replaced all `.Single()` usages where applicable
* Replaced most method info fetching with `AccessTools` for consistency and better readability, especially in places where methods were being retrieved by their name anyways
**NOTE:**
As a side effect of publicizing all properties, some property access code such as `Player.Position` will now show "ambiguous reference" errors during compile, due to there being multiple interfaces with the Property name being defined on the class. The way to get around this is to use a cast to an explicit interface
Example:
```cs
Singleton<GameWorld>.Instance.MainPlayer.Position
```
will now need to be
```cs
((IPlayer)Singleton<GameWorld>.Instance.MainPlayer).Position
```
Co-authored-by: Terkoiz <terkoiz@spt.dev>
Reviewed-on: SPT-AKI/Modules#58
Co-authored-by: Terkoiz <terkoiz@noreply.dev.sp-tarkov.com>
Co-committed-by: Terkoiz <terkoiz@noreply.dev.sp-tarkov.com>
Todo:
* Make the UI notifications for BTR-related stuff appear, e.g. when BTR is about to depart
* Prevent player from entering BTR when it is hostile to the player
* Implement cover fire trader service
* Finish implementation of taxi service
* Finetune the turret machine gun shooting (it might need some pauses as it will shoot nonstop if it is aiming at you)
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#56
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
- Reads service list from server
- Properly calculates cost of taxi and delivery service
- Only allows sending items to stash once per raid
- Enable service debug commands `debug_show_dialog_screen` and `btr_deliver_items` (Only usable in raid)
- Implements delivery of items via the BTR to stash
Does not currently implement usage of taxi service
Requires server PR: SPT-AKI/Server#187
Opening a PR at this point because the next processes can be built on top of this as separate tasks, and this is at a good usable state
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#53
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Todo:
* BTR trader services requires implementation server-side
* Send items to player stash (2x4)
* Provide covering fire
* Taxi to a specific location on Streets
* Fix turret aiming at player from raid start
* Make turret shoot at enemies (including player)
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#52
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
Todo:
* BTR Driver services
* Send to items to player stash (2x4)
* Provide covering fire
* Taxi to a specific location on Streets
* BTR turns hostile if you shoot it
* BTR automatically follows a set path from raid start, stopping at locations for 90 seconds each stop
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#51
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
Current progress:
* BTR spawns in, clientside BTR is synced with serverside BTR
* BTR Bot spawns in, is assigned to BTRController (GClass2911) correctly
* BTR Bot is initialized properly (invisible, makes no sound, doesn't shoot at player)
Todo:
BTR is currently missing functionality
* It needs to allow player to enter and exit
* Player should be able to interact with BTR driver/open BTR stash UI/pay money to get taxi'd to a chosen location/pay money for it to provide covering fire
* Turret should rotate to shoot player if they attack it
* It should be able to drive on its own from raid start, going from location to location, on a set path
Co-authored-by: Nympfonic <arys.steam@gmail.com>
Reviewed-on: SPT-AKI/Modules#50
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
Since gameWorld.LocationId can be used by multiple things (And may be used by more in the future), move it to its own patch instead of as part of the BTR patch.
Target `method_3` in `BaseLocalGame` to assign it as close to where a live game would set it
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#49
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
GClass2911 expects gameWorld.LocationId to be set to instantiate the BTRView
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#48
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>