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

97 Commits

Author SHA1 Message Date
Dev
eec51e84f1 Exit application when a patch fails 2024-03-14 17:18:42 +00:00
99313c9cc0 Update RagfairFeePatch 2024-03-14 17:13:35 +00:00
Dev
27c0d3f0ae Added patch failure handling, thanks to Drakia 2024-03-14 17:08:20 +00:00
Dev
fa423cb9be Update for 29197 2024-03-14 11:23:51 +00:00
Cj
73db17ea78 Show mods loaded in cool debug message (!95)
needs merged with: SPT-AKI/Server#258

Shows if mods are loaded in the cool debug message, will show if either server mods or client mods are present.

Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#95
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
2024-03-11 22:02:45 +00:00
6a77131249 Resolve an issue where Release builds of the server caused exceptions in the client (!94)
Some code cleanup and refactoring

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#94
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-03-11 08:44:50 +00:00
059334d0cd Fix the BTR turretview bot being visible (!92)
Rewrite the BTRTurretView attach patch, so we no longer need the BotInit patch

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#92
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-03-10 09:43:15 +00:00
Cj
b87b569ece Implement getting data from server, and showing release notes (!90)
Needs merged with: SPT-AKI/Server#249

Added
- Moved beta disclaimer text to the server
- Moved `PreventClientModsPatch` to AKI.Debugging as it makes more sense here after this PR. People who need to know, know why.
- Ability to show a release note summary to users in-game
- Cool debug message only shows build hash.

Instructions for testing
- Since I opted to store properties in the registry, its not as straight forward as deleting a file. (Thanks Drakia for the suggestion). So in order to test you need to open up regedit and navigate to `Computer\HKEY_CURRENT_USER\Software\Battlestate Games\EscapeFromTarkov` inside of that directory are 3 values stored in relation to this PR.

`SPT_AcceptedBETerms` - `REG_DWORD` that stores a value of 0 or 1
`SPT_ShownReleaseNotes` - `REG_DWORD` that stores a value of 0 or 1
`SPT_Version` - `REG_BINARY` that stores a binary converted string.

In order to reset after first run for a second test, you just delete all 3 entries.

Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#90
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
2024-03-07 22:10:07 +00:00
2ff471e754 Remove GClass Refs for cultist amulet patch 2024-02-28 20:34:15 +00:00
Dev
0429799dea 28965 2024-02-27 18:57:49 +00:00
Kaeno
9328c4c956 Add patch that removes Culists amulet when you kill a cultist. First pass at implementing this 2024-02-25 17:36:27 +00:00
a43ea41a75 CheckandaddEnemypatch now returns a bool. Set result to not include isAI Checks. Needs testing (!85)
Co-authored-by: Kaeno <e>
Reviewed-on: SPT-AKI/Modules#85
2024-02-22 16:57:57 +00:00
e1caef80dc Fix multiple NREs thrown in bot code (!84)
1) The called bot's enemy position is being passed to TryCall, instead of the calling bot's enemy position. This is both incorrect and can lead to an NRE if the called bot has no enemy. Fix by passing in the calling bot's enemy position

2) In the TryCall method, the caller's enemy is added to the called bot, however the code doesn't verify that it was added before accessing it in the `EnemyInfos` array. This can throw a missing key exception if the bot failed to add to the enemies list. Fix by making sure the enemy is added to the enemy list before executing TryCall

3) When a BotOwner is disposed, the CalledData is never properly cleaned up, resulting in a bot's OnEnemyAdd being triggered after the bot has been killed, this can throw an NRE. Fix by calling CalledData.SetOff before BotOwner.Dispose

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#84
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-02-22 09:13:09 +00:00
Kaeno
625442d2e3 Gets the value from server. No longer hard coded to 10 2024-02-16 16:14:11 +00:00
Kaeno
1759abd842 Make sure the patch only runs while ingame and on a scav 2024-02-16 15:49:18 +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
44e9f44f70 Fix error when BTR kills enemy (!82)
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>
2024-02-15 08:56:02 +00:00
Kaeno
6f78f23cde Make culists use original function when picking enemies so Cultist amulet from lightkeeper works 2024-02-13 19:15:54 +00:00
Dev
4f0dad24e7 Fixed incorrect traitor scav check 2024-02-13 12:49:02 +00:00
Kaeno
0564961c72 Make sure we are not trying to add ourselfs to our own enemy list. 2024-02-12 17:08:48 +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
Dev
5622e05b13 Add drugs to non-FiR pocket list 2024-02-11 11:56:19 +00:00
Dev
663c5b1460 Small optimisation to PmcFoundInRaidEquipment 2024-02-11 11:47:44 +00:00
Dev
e5c47ab5e9 Don't add FiR to injectors in PMC pockets 2024-02-11 11:16:44 +00:00
Dev
761d6c339d Add patch to make some player scavs hostile to player
Refactored AIHelpers.BotIsPlayerScav to not require a BotOwner object
2024-02-11 10:33:59 +00:00
Kaeno
96f107f1d2 Adds the ability to see items required by pmc quests as a scav like live on Found in Raid Items 2024-02-10 18:07:45 +00:00
Dev
0a1115d0d6 Fix medkits being FiR inside PMC pockets
FIx weapons inside PMC backpacks having FiR mods
Fix PMC armors having FiR plates/soft inserts
Fix PMC headwear having FiR soft inserts
2024-02-05 10:16:52 +00:00
Kaeno
2ebabeffc9 Made Player invincible while in BTR so Border snipers dont kill you while being protected by the BTR 2024-02-05 06:42:59 +00:00
eb443aaa5e Fixed BTR movement speed being tied to a static framerate (!73)
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>
2024-01-30 09:37:33 +00:00
53363d5a25 Removed red debug sphere from BTR (!72)
Reviewed-on: SPT-AKI/Modules#72
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
2024-01-29 20:53:22 +00:00
c01bd92c78 Fix BTR when NVidia Reflex is enabled (!71)
- 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>
2024-01-29 19:08:38 +00:00
2d2b4fb78f Removed unnecessary BTR patch (!70)
Reviewed-on: SPT-AKI/Modules#70
Co-authored-by: Arys <arys@noreply.dev.sp-tarkov.com>
Co-committed-by: Arys <arys@noreply.dev.sp-tarkov.com>
2024-01-29 18:08:45 +00:00
a48e40b481 Delayed spawning BTR bot to GameWorld.OnGameStarted (!69)
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>
2024-01-27 09:05:33 +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
89f0db250d BTR code refactors and turret aim improvements (!67)
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>
2024-01-25 08:52:33 +00:00
Dev
2fbe050a14 28476 - update mappings most classes were offset by 2 2024-01-24 11:08:16 +00:00
Dev
c30ad2f365 make _sptPath readonly 2024-01-23 15:42:47 +00:00
Dev
060dbcd585 Add comment to SettingsLocationPatch 2024-01-23 15:42:11 +00:00
701c3a6685 Move BTR code into Aki.Custom (!66)
- 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>
2024-01-23 08:47:09 +00:00
Kaeno
a0f2bb9261 Added new patch to fix bots spawning on Sandbox( Ground Zero ) 2024-01-18 20:59:33 +00:00
Kaeno
a5c2e1a0a4 adjusted wildspawntype.gifter to not be hostile by default 2024-01-18 12:22:06 +00:00
Terkoiz
10164c3b1c Double sneaky fix haha 2024-01-15 20:39:43 +02:00
Terkoiz
bc190cb6f8 Sneaky fix for ambiguous reference error 2024-01-15 19:27:59 +02: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
bbf55a7031 Fix the EasyAssetsPatch error some users gets (!57)
- Prioritize loading the JSON manifest instead of the binary manifest

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#57
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-01-13 19:47:41 +00:00
0cabe9dc12 Shooting the BTR will make it retaliate. Fixed BTR turret from rotating when non-hostile (!56)
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>
2024-01-12 08:54:12 +00:00
Dev
1e92d88339 Add randomWeather/randomTime handling 2024-01-07 13:01:49 +00:00
Dev
581acc719f Improve VersionLabelPatch to show eft version 2024-01-04 10:11:47 +00:00