0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
Terkoiz 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
2023-03-03 18:52:31 +00:00
2023-03-03 18:52:31 +00:00
2023-10-10 10:58:33 +00:00
2023-03-03 18:52:31 +00:00
2024-01-10 10:40:47 +02:00

Modules

BepInEx plugins to alter Escape From Tarkov's behaviour

Project Function
Aki.Build Build script
Aki.Bundles External bundle loader
Aki.Common Common utilities used across projects
Aki.Core Required patches to start the game
Aki.Custom SPT-AKI enhancements to EFT
Aki.Debugging Debug utilities (disabled in release builds)
Aki.Reflection Reflection utilities used across the project
Aki.SinglePlayer Simulating online game while offline

Privacy

SPT is an open source project. Your commit credentials as author of a commit will be visible by anyone. Please make sure you understand this before submitting a PR. Feel free to use a "fake" username and email on your commits by using the following commands:

git config --local user.name "USERNAME"
git config --local user.email "USERNAME@SOMETHING.com"

Requirements

  • Escape From Tarkov 28375
  • Visual Studio Code -OR- Visual Studio 2022
  • .NET 6 SDK

Project Setup

Copy-paste Live EFT's EscapeFromTarkov_Data/Managed/ folder to into this project's Project/Shared/Managed/ folder

Build (VS Code)

  1. File > Open Workspace > Modules.code-workspace
  2. Terminal > Run Build Task...
  3. Copy contents of /Build into SPT game folder and overwrite

Build (VS 2022)

  1. Open solution
  2. Restore nuget packages
  3. Run dotnet new tool-manifest
  4. Sometimes you need to run dotnet tool restore
  5. Run dotnet tool install Cake.Tool
  6. Build solution
  7. Copy contents of /Build into SPT game folder and overwrite

Game Setup

  1. Copy Live EFT files into a separate directory (from now on this will be referred to as the "SPT directory")
  2. Download BepInEx 5.4.22 x64 (BepInEx Releases - GitHub)
  3. Extract contents of the BepInEx zip into the root SPT directory
  4. Build Modules, Server and Launcher
  5. Copy the contents of each project's Build folder into the root SPT directory
  6. (Optional, but recommended) Download the BepInEx5 version of ConfigurationManager (ConfigurationManager Releases - GitHub) and extract the contents of the zip into the root SPT directory. The default keybind for opening the menu will be F1
  7. (Optional) Edit the BepInEx config (\BepInEx\config\BepInEx.cfg) and append Debug to the LogLevels setting. Example: LogLevels = Fatal, Error, Warning, Message, Info, Debug
Description
No description provided
Readme 151 MiB
Languages
C# 99.5%
PowerShell 0.5%