0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 08:10:45 -05:00

58 Commits

Author SHA1 Message Date
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
Dev
ae2b98b69e Add additional logging to patch 2024-01-04 09:25:42 +00:00
Terkoiz
2878279ce9 Experimentlal fix for LocationId patch breaking hideout 2024-01-04 11:19:11 +02:00
a31f19755f Move setting of gameWorld.LocationId to its own patch (!49)
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>
2024-01-03 08:57:57 +00:00
e3bdf9c1fd Update for 28375 + fixes (!47)
- Update GClass references
- Fix incorrect method in InsuranceScreenPatch (Makes insurance screen actually show)
- Fix incorrect method in Scav offline raid screen patch (Makes "Ready" from the practice screen start the raid)
- Update hollowed.dll with one provided by Chomp

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#47
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2023-12-29 09:43:15 +00:00
Terkoiz
4da61ffb64 Fixed compile-time errors 2023-12-27 17:10:25 +02:00
612e7f0b1b Prevent Bots from Running into Airdrop Crates (!46)
Adds a `NavMeshObstacle` component to airdrop boxes at the end of `OnBoxLand`. Without this change, bots run into the crates as if they aren't there (because they're dumb).

Co-authored-by: dwesterwick <dwesterwick@yahoo.com>
Reviewed-on: SPT-AKI/Modules#46
Co-authored-by: DanW <danw@noreply.dev.sp-tarkov.com>
Co-committed-by: DanW <danw@noreply.dev.sp-tarkov.com>
2023-12-27 11:25:15 +00:00
Merijn Hendriks
820619b0dc [critical] Fix .NET Framework version (!42)
## Preface

The current version of Aki uses .NET Framework 4.7.2, C# 7.3.

However, this is not correct. Unity 2019.4.31f uses .NET Framework 4.7.1, C# 7.0 (you can see this when creating a new blank project in this unity version, then check the Assembly-CSharp.csproj).

You can load netstandard2.0 assemblies into EFT, which support C# 7.3.

## The issue

.NET Core 2.1 support types like `Span<T>` and `ReadOnlySpan<T>` which previous versions of .NET (.NET Core 2.0 / .NET Framework 4.8.1 and below, C# 7.1 and below) need to support through the `System.Memory` nuget package. Right now, this conflicts.

If you attempt to load an assembly like this, EFT will simply crash because `Span<T>` and `ReadOnlySpan<T>` do not exist inside mono's `mscorlib`.

## Why fix this

This is important for a variety of reasons:

- Prevent modders from accessing not available APIs leading to unexpected crashes
- Prevent possible compatability issues with EFT later
- Support for `Span<T>` and `ReadOnlySpan<T>` through `System.Memory` which is important for high-performance code and client mods (one of which I'm working on).

I really want to stress that this is an important issue to fix and should be merged ASAP. Unity 2019.4 being lax doesn't mean the next LTS version won't prevent loading.

## Why was the wrong version in the first place?

It was a best guess made by me 2 years ago. There were more pressing issues back then and it didn't crash on me. It started becoming an issue 1 year ago when I tried to port Aki to C#, because self-signed certificate generation is supported only within 4.7.2 and newer.

For reference: https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.certificaterequest.createselfsigned?view=netframework-4.7.2

## What's affected?

All the `.csproj` files in this repo.

Merging this means that some mods might need to retarget from .NET Framework 4.7.2 to 4.7.1.

Co-authored-by: Dev <dev@dev.sp-tarkov.com>
Co-authored-by: Terkoiz <terkoiz@spt.dev>
Co-authored-by: Terkoiz <terkoiz@noreply.dev.sp-tarkov.com>
Co-authored-by: DanW <danw@noreply.dev.sp-tarkov.com>
Co-authored-by: Merijn Hendriks <merijn.d.hendriks@gmail.com>
Reviewed-on: SPT-AKI/Modules#42
Co-authored-by: Merijn Hendriks <senko-san@noreply.dev.sp-tarkov.com>
Co-committed-by: Merijn Hendriks <senko-san@noreply.dev.sp-tarkov.com>
2023-12-09 16:32:45 +00:00
Dev
2290aaf8d1 use data from server when choosing player scav brain 2023-12-03 11:16:18 +00:00
Terkoiz
1f6a8d0f2e Small adjustment to fix loading SPT with the Unity Development Build 2023-11-17 09:30:13 +00:00
Dev
1234c611c8 Fix halloween zryachiy not being peaceful 2023-11-02 15:10:44 +00:00
4047f86b24 Update references for 26835 (!36)
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#36
2023-10-28 09:30:21 +00:00
Dev
697bc90c93 Add new patch from Kaeno that transfers scav quest status data from PMC to scav in the pre-raid screen 2023-10-21 21:44:06 +01:00
CWX
57584bc8ba change back to Start function 2023-10-11 18:25:38 +01:00
Dev
49e4b3fd3a 26535 2023-10-10 12:18:01 +01:00
1e238c426e 0.13.5.0 (!33)
Co-authored-by: Dev <dev@dev.sp-tarkov.com>
Co-authored-by: CWX <CWX@noreply.dev.sp-tarkov.com>
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-authored-by: RaiRaiTheRaichu <rairaitheraichu@noreply.dev.sp-tarkov.com>
Co-authored-by: CWX <cwx@noreply.dev.sp-tarkov.com>
Co-authored-by: Kaeno <e>
Reviewed-on: SPT-AKI/Modules#33
2023-10-10 10:58:33 +00:00
Dev
37e356c430 Only add Z and follower to list if they dont exist already
Call `CheckAndAddEnemy` instead of `AddEnemy` - use additional checks
2023-07-30 13:47:51 +01:00
Dev
584215e2b4 remove commented out code 2023-07-30 13:16:17 +01:00
Dev
7a0f4d2227 Fix patch 2023-07-30 13:15:35 +01:00
Dev
e6eeedf007 Further chagnes for lighthouse bosses 2023-07-30 12:24:36 +01:00
Dev
4a6b658b28 25206 2023-07-28 10:01:11 +01:00
Dev
83ea79c56c make patch do original code afterwards 2023-07-27 21:42:46 +01:00
Dev
3aec22097b New patch - Resolve issue with PMCs not removing bleeds causing them to slowly bleed to death.
This is due to different medkit classes being used depending on what wildspawntype is used

Patch removes all negative effects from all body parts when PMC heals
2023-07-27 21:00:26 +01:00
Dev
8bef9700e2 24964 2023-07-20 13:11:09 +01:00
Dev
c1ff106a16 Fix null error when looking for bots id in enemies list - check key object instead of value
Set result to true and don't perform original function, no need
2023-07-17 13:09:55 +01:00
Dev
2edf259271 prevent IsEnemyPatch enemy list check fail when it's null 2023-07-12 18:21:21 +01:00
Dev
86d86144ba Replace console.writeline with Logger.LogError 2023-07-12 18:09:14 +01:00
Dev
099412c21e Add missing using 2023-07-12 17:52:32 +01:00
Dev
2c5a2d1c19 unified logging
removed code that breaks bot spawns
fixed dogtag error showing when player dies
2023-07-12 17:36:10 +01:00
Dev
0c125bbd10 Update logging messages 2023-07-12 17:10:00 +01:00
Dev
cf30659225 24696 2023-07-11 10:19:41 +01:00
Dev
5cd5caa557 Add edge case for zryachiy on lighthouse 2023-07-10 17:16:54 +01:00
Dev
d2d1581859 use new containerIds dictionary when choosing container to spawn 2023-07-09 14:49:12 +01:00
Dev
610f5e596b Additrional patch fixes for 24605 2023-07-07 15:01:45 +01:00
Dev
878f85a5b5 Fix RaidSettingsWindowPatch + disable as BSG fixed it in live\ 2023-07-07 13:56:00 +01:00
Dev
181f2328a5 Updated to support
One error left that prevents build: LighthouseProgressionClass.cs
2023-07-07 10:37:47 +01:00
Terkoiz
1de88ccf51 Implemented plugin version autogeneration based on assembly version for Aki.Common
Needed to make release packager version setting to work
2023-06-21 13:43:15 +03:00
Dev
c2e05e986e Improve airdrop code formatting 2023-05-26 21:18:30 +01:00
Dev
b050f6230e 23399 2023-05-26 13:28:50 +01:00
Dev
a7d29409c8 23122 2023-05-18 15:49:52 +01:00