0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00

106 Commits

Author SHA1 Message Date
cc2377bf72 fix: difficulties response parsing (!113)
fixed bot difficulties model to match server response for `/singleplayer/settings/bot/difficulties`
also bumps up the sptBear and sptUsec enums so they don't collide with new pmcUSEC and pmcBEAR

Reviewed-on: SPT-AKI/Modules#113
Co-authored-by: kiobu <kiobu@sdf.org>
Co-committed-by: kiobu <kiobu@sdf.org>
2024-04-28 08:17:13 +00:00
2abc1ab0ce fixed insurance screen patch (!114)
I am not entirely sure what the method name index of the added method is that has offset everything by one. There might be other patches affected by this that reference a method by name instead of signature but everything seems to work with just these two adjustments.
I don't have a diff ready to easily spot where the offset happens and what else might potentially be affected.

Reviewed-on: SPT-AKI/Modules#114
Co-authored-by: BluBb_mADe <ku21runy1k11@opayq.com>
Co-committed-by: BluBb_mADe <ku21runy1k11@opayq.com>
2024-04-27 09:38:27 +00:00
199502d18a feat: updated-refs (!112)
update assembly refs and transpiler lookups for 29862

Reviewed-on: SPT-AKI/Modules#112
Co-authored-by: kiobu <kiobu@sdf.org>
Co-committed-by: kiobu <kiobu@sdf.org>
2024-04-26 07:36:56 +00:00
Dev
edf81d800c Update incorrect gclass ref inside GetNewBotTemplatesPatch 2024-04-20 22:41:11 +01:00
Dev
14b4eb2f63 merge 381 into 390 2024-04-20 22:36:42 +01:00
Dev
91bc0ed1e0 Update class refs to get project building 2024-04-15 12:04:31 +01:00
70d0d60198
Update modules to 29577 UNTESTED 2024-04-05 00:17:32 -04:00
b327096980 Ensure we only alter Playerscavs IsAi Data 2024-03-23 12:48:51 +00:00
44748dc0a6 Fix mounted Turrets causing errors 2024-03-23 11:29:42 +00:00
3aa514a5e8 Reworked ArmorDamageCounterPatch 2024-03-22 20:25:38 +00:00
a77fc7f036 Changed the way we count shot ammo. Fixed NRE when player is null when trying to calculate armor damage 2024-03-22 18:45:49 +00:00
c29589768d Add Patches to add extra data to end of raid screen 2024-03-21 15:21:57 +00:00
3885b9e585 Fix ref 2024-03-21 11:10:37 +00:00
b769a87b89 Add comment to explain expected behavior. 2024-03-19 11:18:34 +00:00
7650b751ae Last small optimization. 2024-03-17 18:18:03 +00:00
aa786f44a0 Optimization of getting mines and filtering them to only enable/disable lightkeepers mines. 2024-03-17 16:43:44 +00:00
Dev
fa423cb9be Update for 29197 2024-03-14 11:23:51 +00:00
f1a7a0cb99 Fix LightKeeper tasks not progressing correctly (!91)
To handle in-raid LK task unlocking, when a task is switched from AvailableAfter to Locked, instead switch it to AvailableForStart

This handles the lack of `status` values for tasks, where the target state would normally be read from, without risking breaking non-LK tasks by adding that data.

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#91
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-03-09 22:44:56 +00:00
Dev
1c2d88ad3a Made a number of classes public 2024-03-02 15:50:50 +00:00
Dev
19fe726cea Add comment 2024-02-27 19:53:29 +00:00
Dev
d9aff659ba Fix LoadOfflineRaidScreenForScav patch failing to find private field 2024-02-27 19:51:12 +00:00
Dev
0429799dea 28965 2024-02-27 18:57:49 +00:00
f7ded0abf3 Add handling of trader service requirements (!86)
This is primarily handled by the server, but the client does have precautionary code in it

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#86
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-02-25 23:08:20 +00:00
Kaeno
28e945a7dd Fix patch causing double quest progression 2024-02-16 20:49:44 +00:00
c7bc0b0514 Rework build process (!83)
Co-authored-by: CWXDEV <CWXDEV@outlook.com>
Reviewed-on: SPT-AKI/Modules#83
2024-02-16 10:13:58 +00:00
c8507fb600 Synchronize scav encyclopedia with PMC at raid start, and inspect any items in scav inventory (!81)
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>
2024-02-15 08:55:41 +00:00
Kaeno
42ec75f2eb Fix insurance screen not showing. 2024-02-12 14:21:41 +00:00
Kaeno
22b6bcb4f5 Fix for scavs not going straight into raid when pressing ready 2024-02-12 13:58:08 +00:00
a3684c8663 Profile is now on its own interface, added new interfaceType to patchConstants and fixed the two scav patches 2024-02-12 13:15:22 +00:00
Kaeno
c340023378 Some more fixes preventing scav raids from working also btr fix 2024-02-12 12:01:27 +00:00
Dev
87d9688ab2 Update class refs for new patch 2024-02-12 11:33:06 +00:00
d08754fb61 Work towards implementing LK services (!79)
- 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>
2024-02-12 09:22:45 +00:00
3853a413f6 Fix quest counters triggering while ending the HideoutGame (!78)
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>
2024-02-10 08:31:18 +00:00
2e11148618 Fix the server sell all price not matching the client displayed value (!77)
- 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>
2024-02-08 09:11:22 +00:00
Dev
f2ddc36d88 Prevent null values from being processed during bundle loading 2024-01-27 14:23:50 +00:00
a124ace054 Fixed exception caused by BTR not being destroyed at correct time (!68)
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>
2024-01-26 08:28:29 +00:00
Dev
3c9bf227e0 Removed unused _playerFlaggedAsEnemyToBosses value 2024-01-25 09:43:52 +00:00
Dev
79efcf22ce Fix class rename that kills patch 2024-01-24 22:49:10 +00:00
Dev
2fbe050a14 28476 - update mappings most classes were offset by 2 2024-01-24 11:08:16 +00:00
136b051623 Implement BTR taxi service (!64)
- 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>
2024-01-20 21:43:02 +00:00
879d90b71f Player will receive notifications when purchasing BTR service or when they are blacklisted from the BTR (!63)
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>
2024-01-20 09:20:32 +00:00
e771501cd5 BTR Cover Fire service and roadkill trigger implemented (!62)
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>
2024-01-19 08:47:52 +00:00
Kaeno
b89af9f1ee Fixes to scav extracts. Now allowing correct extracts as we were disabling some incorrectly 2024-01-18 14:19:58 +00:00
4dee774efc Refactor trader services into its own manager in Aki.Singleplayer (!61)
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>
2024-01-15 09:09:31 +00:00
337a0733ae Publicized assembly refactor (!58)
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>
2024-01-13 22:08:29 +00:00
Dev
b82ef6dd30 Fix quests not updating their status mid-raid 2024-01-10 11:54:15 +00:00
Dev
59f9549ced Update modules with additional remappings 2024-01-05 09:27:59 +00:00
Dev
5fcc904a89 Small cleanup of MidRaidQuestChangePatch 2024-01-04 17:25:56 +00:00
Dev
24e820feb5 Add comments to new function 2024-01-04 17:24:11 +00:00
b94cf04971 fix ValidationUtil, remove unused field 2024-01-04 17:18:46 +00:00