Skip to content

Commit 28f1567

Browse files
authored
Merge branch 'dev' into rec079
2 parents 49b1009 + 4e50826 commit 28f1567

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1009
-748
lines changed

.github/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<div align="center"><img src="https://github.com/user-attachments/assets/5ea95992-2aeb-47c3-bd29-c966285276e0" height=75 alt="Exiled SCPSL, SCP Secret Laboratory Exiled, Exiled SCP: Secret Laboratory, Modding Framework, Mods, Exiled Mod SCPSL"/></div>
12
<h1 align="center">Exiled</h1>
23
<h6 align="center">EXtended In-runtime Library for External Development</h6>
34
<div align="center">
@@ -111,5 +112,5 @@ Localized READMEs
111112
</div>
112113
</div>
113114

114-
<h5 align="center">This repo is a fork of <a href="https://github.com/Exiled-Team/EXILED">Exiled-Team/EXILED</a> after the old repository was taken hostage by the old lead developer.</h5>
115+
<h5 align="center">This repo is a fork of <a href="https://github.com/Exiled-Team/EXILED">Exiled-Team/EXILED</a> after changes in project leadership.</h5>
115116
<h6 align="center">You can access the commit this update was forked from <a href="https://github.com/Exiled-Team/EXILED/tree/8b03fe7d9d2fe7ebffd5e6d1d038fc3881cdeb70">here</a>.</h6>

.github/labeler.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,28 @@ Scripts: # Add the 'Scripts' label
1313

1414
regarding-events: # Add the 'Events' label
1515
- changed-files:
16-
- any-glob-to-any-file: Exiled.Events/** # Any Modifications to events
16+
- any-glob-to-any-file: EXILED/Exiled.Events/** # Any Modifications to events
1717

1818
regarding-api: # Add the 'API' label
1919
- changed-files:
20-
- any-glob-to-any-file: Exiled.API/** # Any modifications to the API
20+
- any-glob-to-any-file: EXILED/Exiled.API/** # Any modifications to the API
2121

2222
regarding-transpiler: # Add the 'transpiler' label
2323
- changed-files:
24-
- any-glob-to-any-file: Exiled.Events/Patches/**/* # Any modifications to transpiler files
24+
- any-glob-to-any-file: EXILED/Exiled.Events/Patches/**/* # Any modifications to transpiler files
2525

2626
CustomModules: # Add the 'CustomModules' label
2727
- changed-files:
28-
- any-glob-to-any-file: Exiled.CustomModules/** # Any modifications to CustomModules
28+
- any-glob-to-any-file: EXILED/Exiled.CustomModules/** # Any modifications to CustomModules
2929

3030
Installer: # Add the 'Installer' label
3131
- changed-files:
32-
- any-glob-to-any-file: Exiled.Installer/** # Any modifications to the Installer
32+
- any-glob-to-any-file: EXILED/Exiled.Installer/** # Any modifications to the Installer
3333

3434
Localization: # Add the 'Localization' label
3535
- changed-files:
36-
- any-glob-to-any-file: Localization/** # Any modifications to Localization
36+
- any-glob-to-any-file: EXILED/Localization/** # Any modifications to Localization
3737

38-
GitHub_Actions: # Add the 'GitHub' label
38+
GitHub: # Add the 'GitHub' label
3939
- changed-files:
4040
- any-glob-to-any-file: .github/** # Any modifications to github related files
41-

.github/pull_request_template.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Description
2+
**Describe the changes**
3+
4+
5+
**What is the current behavior?** (You can also link to an open issue here)
6+
7+
8+
**What is the new behavior?** (if this is a feature change)
9+
10+
11+
**Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?)
12+
13+
14+
**Other information**:
15+
16+
<br />
17+
18+
## Types of changes
19+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
20+
- [ ] Bug fix (non-breaking change which fixes an issue)
21+
- [ ] New feature (non-breaking change which adds functionality)
22+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
23+
- [ ] Documentations
24+
<br />
25+
26+
## Submission checklist
27+
<!--- Put an `x` in all the boxes that apply: -->
28+
- [ ] I have checked the project can be compiled
29+
- [ ] I have tested my changes and it worked as expected
30+
31+
### Patches (if there are any changes related to Harmony patches)
32+
- [ ] I have checked no IL patching errors in the console
33+
34+
### Other
35+
- [ ] Still requires more testing

.github/workflows/dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ defaults:
1414
working-directory: ./EXILED
1515

1616
env:
17-
EXILED_REFERENCES_URL: https://Exiled-Official.github.io/SL-References/Dev.zip
17+
EXILED_REFERENCES_URL: https://exmod-team.github.io/SL-References/Dev.zip
1818
EXILED_REFERENCES_PATH: ${{ github.workspace }}/EXILED/References
19-
EXILED_DLL_ARCHIVER_URL: https://github.com/Exiled-Official/EXILED-DLL-Archiver/releases/latest/download/EXILED-DLL-Archiver.exe
19+
EXILED_DLL_ARCHIVER_URL: https://github.com/ExMod-Team/EXILED-DLL-Archiver/releases/latest/download/EXILED-DLL-Archiver.exe
2020

2121
jobs:
2222

.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://exmod-team.github.io/SL-References/Master.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

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ defaults:
1313
working-directory: ./EXILED
1414

1515
env:
16-
EXILED_REFERENCES_URL: https://Exiled-Official.github.io/SL-References/Master.zip
16+
EXILED_REFERENCES_URL: https://exmod-team.github.io/SL-References/Master.zip
1717
EXILED_REFERENCES_PATH: ${{ github.workspace }}/EXILED/References
1818

1919
jobs:

.github/workflows/labeler.yml renamed to .github/workflows/pull_request_opened.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@ jobs:
2020
repo-token: ${{ secrets.GITHUB_TOKEN }}
2121
configuration-path: .github/labeler.yml
2222
sync-labels: true
23+
assign-author:
24+
runs-on: ubuntu-latest
25+
permissions:
26+
pull-requests: write
27+
28+
steps:
29+
- uses: toshimaru/auto-author-assign@v2.1.1

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ defaults:
1111
working-directory: ./EXILED
1212

1313
env:
14-
EXILED_REFERENCES_URL: https://Exiled-Official.github.io/SL-References/Master.zip
14+
EXILED_REFERENCES_URL: https://exmod-team.github.io/SL-References/Dev.zip
1515
EXILED_REFERENCES_PATH: ${{ github.workspace }}/EXILED/References
16-
EXILED_DLL_ARCHIVER_URL: https://github.com/Exiled-Official/EXILED-DLL-Archiver/releases/latest/download/EXILED-DLL-Archiver.exe
16+
EXILED_DLL_ARCHIVER_URL: https://github.com/ExMod-Team/EXILED-DLL-Archiver/releases/latest/download/EXILED-DLL-Archiver.exe
1717

1818
jobs:
1919
build:

EXILED/Exiled.API/Extensions/MirrorExtensions.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ namespace Exiled.API.Extensions
2525
using PlayerRoles;
2626
using PlayerRoles.FirstPersonControl;
2727
using PlayerRoles.PlayableScps.Scp049.Zombies;
28+
using PlayerRoles.Voice;
2829
using RelativePositioning;
2930

3031
using Respawning;
@@ -181,6 +182,18 @@ public static void PlayGunSound(this Player player, Vector3 position, ItemType i
181182
player.Connection.Send(message);
182183
}
183184

185+
/// <summary>
186+
/// Sets <see cref="Features.Intercom.DisplayText"/> that only the <paramref name="target"/> player can see.
187+
/// </summary>
188+
/// <param name="target">Only this player can see Display Text.</param>
189+
/// <param name="text">Text displayed to the player.</param>
190+
public static void SetIntercomDisplayTextForTargetOnly(this Player target, string text) => target.SendFakeSyncVar(IntercomDisplay._singleton.netIdentity, typeof(IntercomDisplay), nameof(IntercomDisplay.Network_overrideText), text);
191+
192+
/// <summary>
193+
/// Resync <see cref="Features.Intercom.DisplayText"/>.
194+
/// </summary>
195+
public static void ResetIntercomDisplayText() => ResyncSyncVar(IntercomDisplay._singleton.netIdentity, typeof(IntercomDisplay), nameof(IntercomDisplay.Network_overrideText));
196+
184197
/// <summary>
185198
/// Sets <see cref="Room.Color"/> of a <paramref name="room"/> that only the <paramref name="target"/> player can see.
186199
/// </summary>

EXILED/Exiled.API/Features/Items/Jailbird.cs

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77

88
namespace Exiled.API.Features.Items
99
{
10+
using System;
11+
1012
using Exiled.API.Features.Pickups;
1113
using Exiled.API.Interfaces;
1214
using InventorySystem.Items.Autosync;
1315
using InventorySystem.Items.Jailbird;
1416
using Mirror;
17+
using UnityEngine;
1518

1619
using JailbirdPickup = Pickups.JailbirdPickup;
1720

@@ -114,12 +117,35 @@ public JailbirdWearState WearState
114117
get => Base._deterioration.WearState;
115118
set
116119
{
117-
if (JailbirdDeteriorationTracker.ReceivedStates.ContainsKey(Serial))
118-
JailbirdDeteriorationTracker.ReceivedStates[Serial] = value;
120+
TotalDamageDealt = GetDamage(value);
121+
TotalCharges = GetCharge(value);
119122
Base._deterioration.RecheckUsage();
120123
}
121124
}
122125

126+
/// <summary>
127+
/// Calculates the damage corresponding to a given <see cref="JailbirdWearState"/>.
128+
/// </summary>
129+
/// <param name="wearState">The wear state to calculate damage for.</param>
130+
/// <returns>The amount of damage associated with the specified wear state.</returns>
131+
public float GetDamage(JailbirdWearState wearState)
132+
{
133+
foreach (Keyframe keyframe in Base._deterioration._damageToWearState.keys)
134+
{
135+
if (Base._deterioration.FloatToState(keyframe.value) == wearState)
136+
return keyframe.time;
137+
}
138+
139+
throw new Exception("Wear state not found in damage to wear state mapping.");
140+
}
141+
142+
/// <summary>
143+
/// Gets the charge needed to reach a specific <see cref="JailbirdWearState"/>.
144+
/// </summary>
145+
/// <param name="wearState">The desired wear state to calculate the charge for.</param>
146+
/// <returns>The charge value required to achieve the specified wear state.</returns>
147+
public int GetCharge(JailbirdWearState wearState) => (int)wearState;
148+
123149
/// <summary>
124150
/// Breaks the Jailbird.
125151
/// </summary>

0 commit comments

Comments
 (0)