Skip to content

Commit cac54f2

Browse files
authored
Merge branch 'dev' into master
2 parents 42b541e + 1ddf14c commit cac54f2

File tree

19 files changed

+669
-46
lines changed

19 files changed

+669
-46
lines changed

.github/workflows/docs.yml

Lines changed: 55 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,55 +4,65 @@ on:
44
push:
55
branches:
66
- master
7-
pull_request:
8-
branches:
9-
- master
107

11-
defaults:
12-
run:
13-
working-directory: ./EXILED
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
actions: read
11+
pages: write
12+
id-token: write
1413

1514
env:
16-
EXILED_REFERENCES_URL: https://misaka-zerotwo.github.io/SL-References/Master.zip
15+
EXILED_REFERENCES_URL: https://Exiled-Official.github.io/SL-References/Dev.zip
1716
EXILED_REFERENCES_PATH: ${{ github.workspace }}/EXILED/References
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
# Important due to https://t.ly/5DZAy
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
1824

1925
jobs:
20-
build_and_publish_docs:
21-
runs-on: windows-latest
22-
26+
publish-docs:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
31+
runs-on: ubuntu-latest
32+
2333
steps:
24-
- name: Checkout
25-
uses: actions/checkout@v2.3.4
26-
27-
- name: Setup .NET Core SDK
28-
uses: actions/setup-dotnet@v1.7.2
29-
30-
- name: Setup Nuget
31-
uses: iRebbok/setup-nuget@master
32-
33-
- name: Get references
34-
shell: pwsh
35-
run: |
36-
Invoke-WebRequest -Uri ${{ EXILED_REFERENCES_URL }} -OutFile ${{ github.workspace }}/EXILED/References.zip
37-
Expand-Archive -Path References.zip -DestinationPath ${{ env.EXILED_REFERENCES_PATH }}
38-
39-
- name: Download DocFX
40-
uses: crazy-max/ghaction-chocolatey@v1
41-
with:
42-
args: install docfx --pre
43-
44-
- name: Run DocFX
45-
env:
46-
EXILED_REFERENCES: ${{ env.EXILED_REFERENCES_PATH }}
47-
run: docfx docfx.json; docfx docfx.json
48-
49-
- name: Deploy to GitHub Pages
50-
if: github.event_name == 'push' && success() #Only publishes on push to master to avoid docs mishaps
51-
uses: crazy-max/ghaction-github-pages@v2
52-
with:
53-
target_branch: gh-pages
54-
build_dir: _site
55-
keep_history: true
56-
jekyll: false
57-
env:
58-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
- name: Checkout
35+
uses: actions/checkout@v3
36+
37+
- name: Dotnet Setup
38+
uses: actions/setup-dotnet@v3
39+
with:
40+
dotnet-version: 8.x
41+
42+
- run: dotnet tool update -g docfx
43+
44+
- name: Setup .NET Core SDK
45+
uses: actions/setup-dotnet@v1.7.2
46+
47+
- name: Setup Nuget
48+
uses: iRebbok/setup-nuget@master
49+
50+
- name: Get references
51+
shell: pwsh
52+
run: |
53+
Invoke-WebRequest -Uri $env:EXILED_REFERENCES_URL -OutFile $env:GITHUB_WORKSPACE/EXILED/References.zip
54+
Expand-Archive -Path $env:GITHUB_WORKSPACE/EXILED/References.zip -DestinationPath $env:EXILED_REFERENCES_PATH
55+
56+
- run: docfx EXILED/docs/docfx.json
57+
env:
58+
EXILED_REFERENCES: ${{ env.EXILED_REFERENCES_PATH }}
59+
60+
- name: Upload artifact
61+
uses: actions/upload-pages-artifact@v3
62+
with:
63+
# Upload entire repository
64+
path: 'EXILED/docs/_site'
65+
66+
- name: Deploy to GitHub Pages
67+
id: deployment
68+
uses: actions/deploy-pages@v4

EXILED/Exiled.CustomItems/API/Features/CustomArmor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public override ItemType Type
3030
get => base.Type;
3131
set
3232
{
33-
if (!value.IsArmor() && (value != ItemType.None))
33+
if (value != ItemType.None && !value.IsArmor())
3434
throw new ArgumentOutOfRangeException("Type", value, "Invalid armor type.");
3535

3636
base.Type = value;

EXILED/Exiled.Loader/LoaderPlugin.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ public class LoaderPlugin
3838
[PluginPriority(byte.MinValue)]
3939
public void Enable()
4040
{
41+
if (Config == null)
42+
{
43+
Log.Error("Detected null config, EXILED will not be loaded.");
44+
return;
45+
}
46+
4147
if (!Config.IsEnabled)
4248
{
4349
Log.Info("EXILED is disabled on this server via config.");
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: Contributing to EXILED
3+
---
4+
# Contributing to EXILED
5+
6+
This is a simple tutorial guiding you to contribute to our framework.
7+
8+
### Forking EXILED
9+
First, create a fork of our [GitHub repository](https://github.com/Exiled-Official/EXILED).
10+
11+
Then, clone it to your computer like so: `git clone https://github.com/your-username/EXILED.git`
12+
13+
Open a terminal in your forked EXILED folder and run ```git checkout dev```. This will switch you to the dev branch, which all pull requests should be submitted to.
14+
15+
### Setting `EXILED_REFERENCES`
16+
17+
If you haven't already, install the `SCP: Secret Laboratory Dedicated Server` through Steam or extract [this zip file](https://Exiled-Official.github.io/SL-References/Dev.zip) to an easily accessible folder.
18+
19+
#### Windows users
20+
Open the Environment Variables menu by searching for `Environment Variables` in the Start Menu.
21+
22+
Create a new environment variable titled `EXILED_REFERENCES`.
23+
24+
The value should point to `your_steamapps_directory/common/SCP Secret Laboratory Dedicated Server/SCPSL_Data/Managed`, or to the folder where you extracted the zip file mentioned earlier.
25+
26+
#### Linux users
27+
Add `export EXILED_REFERENCES="PATH"` to your `~/.bashrc` or similar file.
28+
29+
PATH should point to `your_steamapps_directory/common/SCP Secret Laboratory Dedicated Server/SCPSL_Data/Managed`, or to the folder where you extracted the zip file mentioned earlier.
30+
31+
---
32+
33+
You should now be able to open the EXILED directory in your favorite IDE.
34+
35+
36+
Once you are done, test your changes thoroughly, and then submit a pull request to the main EXILED repository. Make sure you are targeting the `dev` branch, not `master`!
37+
38+
Happy coding!

EXILED/docs/articles/index.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Introduction
3+
---
4+
5+
# Exiled Introduction
6+
7+
## About EXILED
8+
9+
**EXILED** is a low level plugin framework for SCP: Secret Laboratory.
10+
11+
It offers an event system for developers to hook in order to manipulate or change game code, or implement their own functions.
12+
13+
All **EXILED** events are coded with [Harmony](https://harmony.pardeike.net/) using IL transpilers, meaning they require no direct editing of server Assemblies to function, which allows for two unique benefits.
14+
15+
- The entirety of the frameworks code can be freely published and shared. Allowing developers to better understand how it works, as well as contributing to the framework itself.
16+
- Since all of the code related to the framework is done outside of the server assembly, things like small game updates will have little, if any, effect on the framework.
17+
18+
---
19+
20+
# Frequently Asked Questions
21+
22+
## What is EXILED?
23+
EXILED - short for "EXtended In-runtime Library for External Development" is a plugin framework for SCP: Secret Laboratory compatible with MP2. It is not a direct replacement for SMOD, but it's purpose is to implement an event-based framework using Harmony patches, that plugin developers can utilize to develop plugins for SCP:SL servers.
24+
25+
## How do I install EXILED?
26+
See the [Installation](https://jesus-qc.github.io/EXILED/articles/installation/index.html) page for installation information.
27+
28+
## How do I install plugins?
29+
All plugins contain a DLL file (found in its latest release) that is used to load the plugin. Place the plugin in the appropriate plugin folder.
30+
- Windows: `%AppData%\EXILED\Configs(ServerPortHere)-configs.yml`
31+
- Linux: `~/.config/EXILED/Configs(ServerPortHere)-configs.yml`
32+
33+
## Where is plugin configuration stored?
34+
Plugin configuration is stored in a separate folder than the base-game config files.
35+
- Windows: `%AppData%\EXILED\Plugins`
36+
- Linux: `~/.config/EXILED/Plugins`
37+
38+
## Is there a plugin for upgrading items in hand, inside SCP-914?
39+
No, this is unnecessary because this is a base-game feature! Simply set the `914_mode` config_gameplay config to `DroppedAndHeld`.
40+
41+
## What is Harmony?
42+
Harmony is a library that examines the code of a program as it is being run, allowing developers to tap into those functions, and run their own code, either adding onto, or completely replacing, the code the program would normally run.
43+
44+
45+
The reason EXILED uses harmony is to allow easier updating of the framework in conjunction with game updates. Under ideal circumstances, a new game update will not break EXILED itself, and the only thing needed to make EXILED work again, is a very simple copy/paste of a few lines of code into the new Assembly-CSharp file.
46+
47+
48+
By keeping all of our code outside of the Assembly, other developers can have full, unhindered access to the entirety of EXILED's source code, making collaboration easier. <br />
49+
Additionally, it means that our code will be mostly unaffected by game updates. Unless the game drastically changes code in a very specific function EXILED uses for an event patch, a game update may not even require EXILED itself to also be updated.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Automatic Linux Installation
3+
---
4+
5+
# Automatic Linux Installation
6+
7+
Download `Exiled.Installer-Linux` from [here](https://github.com/Exiled-Official/EXILED/releases).
8+
9+
Move it into your **server directory** and run it using `./Exiled.Installer-Linux`
10+
- Make sure the server directory is the one where LocalAdmin executable is found.
11+
12+
#### Usage
13+
```
14+
Usage:
15+
Exiled.Installer [options] [[--] <additional arguments>...]]
16+
17+
Options:
18+
-p, --path <path> (REQUIRED) Path to the folder with the SL server [default: YourWorkingFolder]
19+
--appdata <appdata> (REQUIRED) Forces the folder to be the AppData folder (useful for containers when pterodactyl runs as root) [default: YourAppDataPath]
20+
--pre-releases Includes pre-releases [default: False]
21+
--target-version <target-version> Target version for installation
22+
--github--token <github--token> Uses a token for auth in case the rate limit is exceeded (no permissions required)
23+
--exit Automatically exits the application anyway
24+
--get-versions Gets all possible versions for installation
25+
--version Show version information
26+
-?, -h, --help Show help and usage information
27+
28+
Additional Arguments:
29+
Arguments passed to the application that is being run.
30+
```
31+
32+
-----
33+
34+
#### Examples
35+
36+
- ##### Installation in a specific folder, specific version and specific appdata folder
37+
```powershell title="Basic installation in the folder you are in"
38+
.\Exiled.Installer-Linux --pre-releases
39+
```
40+
41+
```powershell title="Installation in a specific folder, specific version and specific appdata folder"
42+
.\Exiled.Installer-Linux -p /home/user/scpsl/server --appdata /home/user/scpsl --target-version 2.0.8
43+
```
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Automatic Windows Installation
3+
---
4+
5+
# Automatic Windows Installation
6+
7+
Download `Exiled.Installer-Win.exe` from [here](https://github.com/Exiled-Official/EXILED/releases).
8+
9+
Move it into your **server directory** and double click the .exe.
10+
- Make sure the server directory is the one where LocalAdmin.exe is found.
11+
12+
#### Usage
13+
```
14+
Usage:
15+
Exiled.Installer [options] [[--] <additional arguments>...]]
16+
17+
Options:
18+
-p, --path <path> (REQUIRED) Path to the folder with the SL server [default: YourWorkingFolder]
19+
--appdata <appdata> (REQUIRED) Forces the folder to be the AppData folder (useful for containers when pterodactyl runs as root) [default: YourAppDataPath]
20+
--pre-releases Includes pre-releases [default: False]
21+
--target-version <target-version> Target version for installation
22+
--github--token <github--token> Uses a token for auth in case the rate limit is exceeded (no permissions required)
23+
--exit Automatically exits the application anyway
24+
--get-versions Gets all possible versions for installation
25+
--version Show version information
26+
-?, -h, --help Show help and usage information
27+
28+
Additional Arguments:
29+
Arguments passed to the application that is being run.
30+
```
31+
32+
-----
33+
34+
#### Examples
35+
Using powershell.
36+
37+
```powershell title="Basic installation in the folder you are in"
38+
.\Exiled.Installer-Win --pre-releases
39+
```
40+
41+
```powershell title="Installation in a specific folder, specific version and specific appdata folder"
42+
.\Exiled.Installer-Win -p D:\Games\SCPSL\Server --appdata C --target-version 2.0.8
43+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: Installing EXILED
3+
---
4+
5+
# Installing EXILED
6+
7+
## Automatic Installation
8+
9+
Exiled has a tool that allows you to install **automatically** the framework for you.
10+
11+
## Guides
12+
13+
- [Window Automatic Installation](/EXILED/articles/installation/automatic/windows.html).
14+
- [Linux Automatic Installation](/EXILED/articles/installation/automatic/linux.html).
15+
- [Manual Installation](EXILED/articles/installation/manual.html).
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Manual Installation
3+
---
4+
5+
# Manual Installation
6+
7+
You can download exiled manually following this steps:
8+
9+
### Pick a release
10+
11+
You can select a release inside [our official GitHub repo](https://github.com/Exiled-Official/EXILED/releases/).
12+
13+
### Download the release
14+
15+
Download the `Exiled.tar.gz` file and extract it with your favourite tool, we recommend [7Zip](https://www.7-zip.org/) or [WinRar](https://www.win-rar.com/download.html?&L=6).
16+
17+
### Installation
18+
19+
1. Move the file **``Assembly-CSharp.dll``** to: **`(Your Server Folder)/SCPSL_Data/Managed`** and replace the file.
20+
2. Move the **``EXILED``** folder to **`%appdata%`**
21+
22+
#### Note:
23+
- Windows: This **`%appdata%`** folder is the one located inside **`AppData/Roaming`**, not just `AppData`.
24+
- Linux: This **`%appdata%`** folder is the one called **`~/.config`**.

0 commit comments

Comments
 (0)