Skip to content

Commit 093368b

Browse files
authored
Merge branch 'dev' into dev
2 parents 3bc31d6 + 259cabb commit 093368b

Some content is hidden

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

64 files changed

+1119
-193
lines changed

.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/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
id-token: write
1313

1414
env:
15-
EXILED_REFERENCES_URL: https://Exiled-Official.github.io/SL-References/Dev.zip
15+
EXILED_REFERENCES_URL: https://exmod-team.github.io/SL-References/Master.zip
1616
EXILED_REFERENCES_PATH: ${{ github.workspace }}/EXILED/References
1717

1818
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.

.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

EXILED/Exiled.API/Enums/AuthenticationType.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,10 @@ public enum AuthenticationType
4242
/// Indicates that the player has been authenticated as DedicatedServer.
4343
/// </summary>
4444
DedicatedServer,
45+
46+
/// <summary>
47+
/// Indicates that the player has been authenticated during Offline mode.
48+
/// </summary>
49+
Offline,
4550
}
4651
}

EXILED/Exiled.API/Extensions/MirrorExtensions.cs

Lines changed: 17 additions & 5 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>
@@ -422,12 +435,11 @@ public static void SendFakeTargetRpc(Player target, NetworkIdentity behaviorOwne
422435
/// <example>
423436
/// EffectOnlySCP207.
424437
/// <code>
425-
/// MirrorExtensions.SendCustomSync(player, player.ReferenceHub.networkIdentity, typeof(PlayerEffectsController), (writer) => {
426-
/// writer.WriteUInt64(1ul); // DirtyObjectsBit
427-
/// writer.WriteUInt32(1); // DirtyIndexCount
438+
/// MirrorExtensions.SendFakeSyncObject(player, player.NetworkIdentity, typeof(PlayerEffectsController), (writer) => {
439+
/// writer.WriteULong(1ul); // DirtyObjectsBit
440+
/// writer.WriteUInt(1); // DirtyIndexCount
428441
/// writer.WriteByte((byte)SyncList&lt;byte&gt;.Operation.OP_SET); // Operations
429-
/// writer.WriteUInt32(17); // EditIndex
430-
/// writer.WriteByte(1); // Value
442+
/// writer.WriteUInt(17); // EditIndex
431443
/// });
432444
/// </code>
433445
/// </example>

EXILED/Exiled.API/Extensions/StringExtensions.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@ public static string GetBefore(this string input, char symbol)
161161
/// </summary>
162162
/// <param name="userId">The user id.</param>
163163
/// <returns>Returns the raw user id.</returns>
164-
public static string GetRawUserId(this string userId) => userId.Substring(0, userId.LastIndexOf('@'));
164+
public static string GetRawUserId(this string userId)
165+
{
166+
int index = userId.IndexOf('@');
167+
return index == -1 ? userId : userId.Substring(0, index);
168+
}
165169

166170
/// <summary>
167171
/// Gets a SHA256 hash of a player's user id without the authentication.

EXILED/Exiled.API/Features/Camera.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class Camera : IWrapper<Scp079Camera>, IWorldSpace
2828
/// <summary>
2929
/// A <see cref="Dictionary{TKey,TValue}"/> containing all known <see cref="Scp079Camera"/>s and their corresponding <see cref="Camera"/>.
3030
/// </summary>
31-
internal static readonly Dictionary<Scp079Camera, Camera> Camera079ToCamera = new(250);
31+
internal static readonly Dictionary<Scp079Camera, Camera> Camera079ToCamera = new(250, new ComponentsEqualityComparer());
3232

3333
private static readonly Dictionary<string, CameraType> NameToCameraType = new()
3434
{

EXILED/Exiled.API/Features/Doors/AirlockController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class AirlockController
2020
/// <summary>
2121
/// A <see cref="Dictionary{TKey,TValue}"/> containing all known <see cref="BaseController"/>'s and their corresponding <see cref="AirlockController"/>.
2222
/// </summary>
23-
internal static readonly Dictionary<BaseController, AirlockController> BaseToExiledControllers = new();
23+
internal static readonly Dictionary<BaseController, AirlockController> BaseToExiledControllers = new(new ComponentsEqualityComparer());
2424

2525
/// <summary>
2626
/// Initializes a new instance of the <see cref="AirlockController"/> class.

EXILED/Exiled.API/Features/Doors/Door.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class Door : TypeCastObject<Door>, IWrapper<DoorVariant>, IWorldSpace
3838
/// <summary>
3939
/// A <see cref="Dictionary{TKey,TValue}"/> containing all known <see cref="DoorVariant"/>'s and their corresponding <see cref="Door"/>.
4040
/// </summary>
41-
internal static readonly Dictionary<DoorVariant, Door> DoorVariantToDoor = new();
41+
internal static readonly Dictionary<DoorVariant, Door> DoorVariantToDoor = new(new ComponentsEqualityComparer());
4242

4343
/// <summary>
4444
/// Initializes a new instance of the <see cref="Door"/> class.

EXILED/Exiled.API/Features/Generator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class Generator : IWrapper<Scp079Generator>, IWorldSpace
2626
/// <summary>
2727
/// A <see cref="List{T}"/> of <see cref="Generator"/> on the map.
2828
/// </summary>
29-
internal static readonly Dictionary<Scp079Generator, Generator> Scp079GeneratorToGenerator = new();
29+
internal static readonly Dictionary<Scp079Generator, Generator> Scp079GeneratorToGenerator = new(new ComponentsEqualityComparer());
3030
private Room room;
3131

3232
/// <summary>

0 commit comments

Comments
 (0)