Skip to content

Commit

Permalink
Merge branch 'dev' into rec079
Browse files Browse the repository at this point in the history
  • Loading branch information
Misaka-ZeroTwo authored Aug 28, 2024
2 parents c182ebf + 532fdfb commit 1c84e5c
Show file tree
Hide file tree
Showing 105 changed files with 2,588 additions and 309 deletions.
34 changes: 17 additions & 17 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

<div align="center">

[![Version](https://img.shields.io/github/v/release/Exiled-Official/EXILED?sort=semver&style=flat-square&color=8DBBE9&label=Version)]()
[![Version](https://img.shields.io/github/v/release/ExMod-Team/EXILED?sort=semver&style=flat-square&color=8DBBE9&label=Version)]()
[![License](https://img.shields.io/badge/License-CC%20BY%E2%80%93SA%203.0-df967f?style=flat-square)]()
[![Contributors](https://img.shields.io/github/contributors-anon/Exiled-Official/EXILED?color=90E59A&style=flat-square&label=Contributors)]()
[![GitHub Issues](https://img.shields.io/github/issues/Exiled-Official/EXILED.svg?style=flat-square&label=Issues&color=d77982)](https://github.com/Exiled-Official/EXILED/issues)
[![Contributors](https://img.shields.io/github/contributors-anon/ExMod-Team/EXILED?color=90E59A&style=flat-square&label=Contributors)]()
[![GitHub Issues](https://img.shields.io/github/issues/ExMod-Team/EXILED.svg?style=flat-square&label=Issues&color=d77982)](https://github.com/ExMod-Team/EXILED/issues)
[![Discord](https://img.shields.io/discord/656673194693885975?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/PyUkWTg)

</div>
Expand All @@ -30,85 +30,85 @@ Localized READMEs
<div>
<img src="https://flagsapi.com/US/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/README.md">English</a>
<a href="documentation/README.md">English</a>
</div>
<br>
<div>
<img src="https://flagsapi.com/RU/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/localization/README-Русский.md">Русский</a>
<a href="documentation/localization/README-Русский.md">Русский</a>
</div>
<br>
<div>
<img src="https://flagsapi.com/CN/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/localization/README-中文.md">中文</a>
<a href="documentation/localization/README-中文.md">中文</a>
</div>
<br>
<div>
<img src="https://flagsapi.com/ES/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/localization/README-ES.md">Español</a>
<a href="documentation/localization/README-ES.md">Español</a>
</div>
<br>
<div>
<img src="https://flagsapi.com/PL/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/localization/README-PL.md">Polski</a>
<a href="documentation/localization/README-PL.md">Polski</a>
</div>
<br>
<div>
<img src="https://flagsapi.com/BR/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/localization/README-BR.md">Português-BR</a>
<a href="documentation/localization/README-BR.md">Português-BR</a>
</div>
<br>
<div>
<img src="https://flagsapi.com/IT/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/localization/README-IT.md">Italiano</a>
<a href="documentation/localization/README-IT.md">Italiano</a>
</div>
<br>
<div>
<img src="https://flagsapi.com/CZ/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/localization/README-CS.md">Čeština</a>
<a href="documentation/localization/README-CS.md">Čeština</a>
</div>
<br>
<div>
<img src="https://flagsapi.com/DK/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/localization/README-DK.md">Dansk</a>
<a href="documentation/localization/README-DK.md">Dansk</a>
</div>
<br>
<div>
<img src="https://flagsapi.com/TR/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/localization/README-TR.md">Türkçe</a>
<a href="documentation/localization/README-TR.md">Türkçe</a>
</div>
<br>
<div>
<img src="https://flagsapi.com/DE/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/localization/README-DE.md">German</a>
<a href="documentation/localization/README-DE.md">German</a>
</div>
<br>
<div>
<img src="https://flagsapi.com/FR/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/localization/README-FR.md">Français</a>
<a href="documentation/localization/README-FR.md">Français</a>
</div>
<br>
<div>
<img src="https://flagsapi.com/KR/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/localization/README-KR.md">한국어</a>
<a href="documentation/localization/README-KR.md">한국어</a>
</div>
<br>
<div>
<img src="https://flagsapi.com/TH/flat/64.png" height=30>
<br>
<a href="https://github.com/Exiled-Official/EXILED/blob/master/.github/documentation/localization/README-ไทย.md">ไทย</a>
<a href="documentation/localization/README-ไทย.md">ไทย</a>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push_nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defaults:
working-directory: ./EXILED

env:
EXILED_REFERENCES_URL: https://Exiled-Official.github.io/SL-References/Master.zip
EXILED_REFERENCES_URL: https://ExMod-Team.github.io/SL-References/Master.zip
EXILED_REFERENCES_PATH: ${{ github.workspace }}/EXILED/References

jobs:
Expand Down
2 changes: 1 addition & 1 deletion EXILED/EXILED.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<PropertyGroup>
<!-- This is the global version and is used for all projects that don't have a version -->
<Version Condition="$(Version) == ''">8.11.0</Version>
<Version Condition="$(Version) == ''">8.12.0-rc.3</Version>
<!-- Enables public beta warning via the PUBLIC_BETA constant -->
<PublicBeta>false</PublicBeta>

Expand Down
5 changes: 5 additions & 0 deletions EXILED/Exiled.API/Enums/AuthenticationType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,10 @@ public enum AuthenticationType
/// Indicates that the player has been authenticated as DedicatedServer.
/// </summary>
DedicatedServer,

/// <summary>
/// Indicates that the player has been authenticated during Offline mode.
/// </summary>
Offline,
}
}
37 changes: 37 additions & 0 deletions EXILED/Exiled.API/Enums/HazardType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// -----------------------------------------------------------------------
// <copyright file="HazardType.cs" company="Exiled Team">
// Copyright (c) Exiled Team. All rights reserved.
// Licensed under the CC BY-SA 3.0 license.
// </copyright>
// -----------------------------------------------------------------------

namespace Exiled.API.Enums
{
using Exiled.API.Features.Hazards;

/// <summary>
/// Unique identifier for a <see cref="Hazard"/>.
/// </summary>
public enum HazardType
{
/// <summary>
/// SCP-939 amnestic cloud.
/// </summary>
AmnesticCloud,

/// <summary>
/// Sinkhole spawned at start of round.
/// </summary>
Sinkhole,

/// <summary>
/// SCP-173 tantrum.
/// </summary>
Tantrum,

/// <summary>
/// Should never happen
/// </summary>
Unknown,
}
}
47 changes: 47 additions & 0 deletions EXILED/Exiled.API/Enums/ScenesType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// -----------------------------------------------------------------------
// <copyright file="ScenesType.cs" company="Exiled Team">
// Copyright (c) Exiled Team. All rights reserved.
// Licensed under the CC BY-SA 3.0 license.
// </copyright>
// -----------------------------------------------------------------------

namespace Exiled.API.Enums
{
/// <summary>
/// Unique identifier for the different types of Scenes the client and server can load.
/// </summary>
public enum ScenesType
{
/// <summary>
/// The facility itself.
/// </summary>
Facility,

/// <summary>
/// The current main menu.
/// ! Will cause crash when trying joining servers !
/// </summary>
NewMainMenu,

/// <summary>
/// The old main menu.
/// </summary>
MainMenuRemastered,

/// <summary>
/// The old server list.
/// </summary>
FastMenu,

/// <summary>
/// The loading Screen.
/// ! Will cause crash when trying joining servers !
/// </summary>
PreLoader,

/// <summary>
/// A black menu before loading the <see cref="NewMainMenu"/>.
/// </summary>
Loader,
}
}
30 changes: 30 additions & 0 deletions EXILED/Exiled.API/Enums/UncuffReason.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// -----------------------------------------------------------------------
// <copyright file="UncuffReason.cs" company="Exiled Team">
// Copyright (c) Exiled Team. All rights reserved.
// Licensed under the CC BY-SA 3.0 license.
// </copyright>
// -----------------------------------------------------------------------

namespace Exiled.API.Enums
{
/// <summary>
/// Reasons that player gets uncuffed.
/// </summary>
public enum UncuffReason
{
/// <summary>
/// Uncuffed by a player.
/// </summary>
Player,

/// <summary>
/// Uncuffed due to the distance between cuffer and target.
/// </summary>
OutOfRange,

/// <summary>
/// Uncuffed due to the cuffer no longer alive.
/// </summary>
CufferDied,
}
}
63 changes: 63 additions & 0 deletions EXILED/Exiled.API/Extensions/BitwiseExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// -----------------------------------------------------------------------
// <copyright file="BitwiseExtensions.cs" company="Exiled Team">
// Copyright (c) Exiled Team. All rights reserved.
// Licensed under the CC BY-SA 3.0 license.
// </copyright>
// -----------------------------------------------------------------------

namespace Exiled.API.Extensions
{
using System;

/// <summary>
/// Extensions for bitwise operations.
/// </summary>
public static class BitwiseExtensions
{
/// <summary>
/// Adds the specified flags to the given enum value.
/// </summary>
/// <typeparam name="T">The type of the enum.</typeparam>
/// <param name="flags">The enum value to add flags to.</param>
/// <param name="newFlags">The flags to add.</param>
/// <returns>The enum value with the specified flags added.</returns>
public static T AddFlags<T>(this T flags, params T[] newFlags)
where T : Enum => flags.ModifyFlags(true, newFlags);

/// <summary>
/// Removes the specified flags from the given enum value.
/// </summary>
/// <typeparam name="T">The type of the enum.</typeparam>
/// <param name="flags">The enum value to remove flags from.</param>
/// <param name="oldFlags">The flags to remove.</param>
/// <returns>The enum value with the specified flags removed.</returns>
public static T RemoveFlags<T>(this T flags, params T[] oldFlags)
where T : Enum => flags.ModifyFlags(false, oldFlags);

/// <summary>
/// Sets the specified flag to the given value, default is true.
/// </summary>
/// <param name="flags">The flags enum to modify.</param>
/// <param name="value">The value to set the flag to.</param>
/// <param name="changeFlags">The flags to modify.</param>
/// <typeparam name="T">The type of the enum.</typeparam>
/// <returns>The flags enum with the flag set to the given value.</returns>
public static T ModifyFlags<T>(this T flags, bool value, params T[] changeFlags)
where T : Enum
{
long currentValue = Convert.ToInt64(flags);

foreach (T flag in changeFlags)
{
long flagValue = Convert.ToInt64(flag);

if (value)
currentValue |= flagValue;
else
currentValue &= ~flagValue;
}

return (T)Enum.ToObject(typeof(T), currentValue);
}
}
}
Loading

0 comments on commit 1c84e5c

Please sign in to comment.