Skip to content

Commit

Permalink
Fix Error from #394
Browse files Browse the repository at this point in the history
commit 99a84fd
Author: Yamato <louismonneyron5@yahoo.com>
Date:   Thu Jan 16 18:39:19 2025 +0100

    Everything is Obsolete

commit a4af0c9
Author: Yamato <louismonneyron5@yahoo.com>
Date:   Thu Jan 16 18:21:28 2025 +0100

    also revert IsAvailableHoliday since it's impossible to get it's instance

commit a4dfb3e
Author: Yamato <louismonneyron5@yahoo.com>
Date:   Thu Jan 16 18:13:20 2025 +0100

    revert change

commit b468988
Author: Yamato <louismonneyron5@yahoo.com>
Date:   Thu Jan 16 18:11:02 2025 +0100

    Fix Error

commit 235d7aa
Author: Yamato <louismonneyron5@yahoo.com>
Date:   Thu Jan 16 18:09:06 2025 +0100

    Using Obsolete

commit fba9eda
Merge: 5598231 c6816f9
Author: Yamato <66829532+louis1706@users.noreply.github.com>
Date:   Thu Jan 16 16:59:53 2025 +0100

    Merge branch 'xmas-2024' into Only-availaible-for-Christmas-and-AprilFools

commit 5598231
Author: Yamato <louismonneyron5@yahoo.com>
Date:   Wed Jan 15 12:25:57 2025 +0100

    Only availaible for Christmas and AprilFools
  • Loading branch information
louis1706 committed Jan 16, 2025
1 parent c6816f9 commit fb89fe9
Show file tree
Hide file tree
Showing 23 changed files with 54 additions and 20 deletions.
4 changes: 4 additions & 0 deletions EXILED/Exiled.API/Enums/EffectType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,21 +263,25 @@ public enum EffectType
/// <summary>
/// Makes you a flamingo.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
BecomingFlamingo,

/// <summary>
/// Makes you a Child after eating Cake.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
Scp559,

/// <summary>
/// Scp956 found you.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
Scp956Target,

/// <summary>
/// you are snowed.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
Snowed,
}
}
6 changes: 3 additions & 3 deletions EXILED/Exiled.API/Extensions/EffectTypeExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ public static class EffectTypeExtension
{ EffectType.AntiScp207, typeof(AntiScp207) },
{ EffectType.Scanned, typeof(Scanned) },
{ EffectType.SilentWalk, typeof(SilentWalk) },
#pragma warning disable CS0618
{ EffectType.Marshmallow, typeof(MarshmallowEffect) },
#pragma warning restore CS0618
{ EffectType.Strangled, typeof(Strangled) },
{ EffectType.Ghostly, typeof(Ghostly) },
{ EffectType.FogControl, typeof(FogControl) },
Expand All @@ -78,10 +75,13 @@ public static class EffectTypeExtension
{ EffectType.SeveredEyes, typeof(SeveredEyes) },
{ EffectType.PitDeath, typeof(PitDeath) },
{ EffectType.Blurred, typeof(Blurred) },
#pragma warning disable CS0618
{ EffectType.Marshmallow, typeof(MarshmallowEffect) },
{ EffectType.BecomingFlamingo, typeof(BecomingFlamingo) },
{ EffectType.Scp559, typeof(Scp559Effect) },
{ EffectType.Scp956Target, typeof(Scp956Target) },
{ EffectType.Snowed, typeof(Snowed) },
#pragma warning restore CS0618
});

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions EXILED/Exiled.API/Features/Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ internal static void ClearCache()
Firearm.BaseCodesValue.Clear();
Firearm.AvailableAttachmentsValue.Clear();

#pragma warning disable CS0618
Scp559.CakeToWrapper.Clear();
#pragma warning restore CS0618

Coffee.BaseToWrapper.Clear();
}
Expand Down
2 changes: 2 additions & 0 deletions EXILED/Exiled.API/Features/Roles/Role.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ public virtual void Set(RoleTypeId newRole, SpawnReason reason, RoleSpawnFlags s
FilmmakerGameRole filmmakerRole => new FilmMakerRole(filmmakerRole),
NoneGameRole noneRole => new NoneRole(noneRole),
DestroyedGameRole destroyedRole => new DestroyedRole(destroyedRole),
#pragma warning disable CS0618 // Le type ou le membre est obsolète
Scp1507GameRole scp1507 => new Scp1507Role(scp1507),
#pragma warning restore CS0618 // Le type ou le membre est obsolète
_ => throw new Exception($"Missing role found in Exiled.API.Features.Roles.Role::Create ({role?.RoleTypeId}). Please contact an Exiled developer."),
};
}
Expand Down
12 changes: 2 additions & 10 deletions EXILED/Exiled.API/Features/Roles/Scp1507Role.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,20 @@

namespace Exiled.API.Features.Roles
{
using System;
using System.Collections.Generic;

using Exiled.API.Enums;
using Exiled.API.Features.Pools;

using PlayerRoles;
using PlayerRoles.PlayableScps;
using PlayerRoles.PlayableScps.HumeShield;
using PlayerRoles.PlayableScps.Scp939;
using PlayerRoles.PlayableScps.Scp939.Mimicry;
using PlayerRoles.PlayableScps.Scp939.Ripples;
using PlayerRoles.Subroutines;

using RelativePositioning;

using UnityEngine;

using Scp1507GameRole = PlayerRoles.PlayableScps.Scp1507.Scp1507Role;

/// <summary>
/// Defines a role that represents SCP-1507.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
public class Scp1507Role : FpcRole, ISubroutinedScpRole, IHumeShieldRole, ISpawnableScp
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions EXILED/Exiled.API/Features/Scp559.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace Exiled.API.Features
/// <summary>
/// Represents a cake.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
public class Scp559 : IWrapper<Scp559Cake>, IPosition
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions EXILED/Exiled.Events/EventArgs/Interfaces/IScp1507Event.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@

namespace Exiled.Events.EventArgs.Interfaces
{
using System;

using Exiled.API.Features.Roles;

/// <summary>
/// Event args used for all <see cref="Scp1507Role"/> related events.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
public interface IScp1507Event : IPlayerEvent
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions EXILED/Exiled.Events/EventArgs/Interfaces/IScp559Event.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@

namespace Exiled.Events.EventArgs.Interfaces
{
using System;

/// <summary>
/// Defines the base contract for all <see cref="Scp559Cake"/> related events.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
public interface IScp559Event : IExiledEvent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

namespace Exiled.Events.EventArgs.Scp1507
{
using System;

using Exiled.API.Features;
using Exiled.API.Features.Doors;
using Exiled.API.Features.Roles;
Expand All @@ -16,6 +18,7 @@ namespace Exiled.Events.EventArgs.Scp1507
/// <summary>
/// Contains all information before SCP-1507 attacks door.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
public class AttackingDoorEventArgs : IScp1507Event, IDeniableEvent, IDoorEvent
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions EXILED/Exiled.Events/EventArgs/Scp1507/ScreamingEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@

namespace Exiled.Events.EventArgs.Scp1507
{
using System;

using Exiled.API.Features;
using Exiled.API.Features.Roles;
using Exiled.Events.EventArgs.Interfaces;

/// <summary>
/// Contains all information before SCP-1507 screams.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
public class ScreamingEventArgs : IScp1507Event, IDeniableEvent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace Exiled.Events.EventArgs.Scp1507
{
using System;
using System.Collections.Generic;
using System.Linq;

Expand All @@ -18,6 +19,7 @@ namespace Exiled.Events.EventArgs.Scp1507
/// <summary>
/// Contains all information before flamingos get spawned.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
public class SpawningFlamingosEventArgs : IDeniableEvent, IPlayerEvent
{
/// <summary>
Expand Down
4 changes: 3 additions & 1 deletion EXILED/Exiled.Events/EventArgs/Scp1507/UsingTapeEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@

namespace Exiled.Events.EventArgs.Scp1507
{
using System;

using Exiled.API.Features;
using Exiled.API.Features.Items;
using Exiled.API.Features.Roles;
using Exiled.Events.EventArgs.Interfaces;
using InventorySystem.Items;

/// <summary>
/// Contains all information before SCP-1507 screams.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
public class UsingTapeEventArgs : IPlayerEvent, IItemEvent, IDeniableEvent
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@

namespace Exiled.Events.EventArgs.Scp559
{
using System;

using Exiled.API.Features;
using Exiled.Events.EventArgs.Interfaces;

/// <summary>
/// Contains all information before a player interacts with SCP-559.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
public class InteractingScp559EventArgs : IScp559Event, IDeniableEvent, IPlayerEvent
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions EXILED/Exiled.Events/EventArgs/Scp559/SpawningEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@

namespace Exiled.Events.EventArgs.Scp559
{
using System;

using Exiled.API.Features;
using Exiled.Events.EventArgs.Interfaces;
using UnityEngine;

/// <summary>
/// Contains all information before SCP-559 spawns.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
public class SpawningEventArgs : IDeniableEvent, IScp559Event
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions EXILED/Exiled.Events/Handlers/Scp1507.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

namespace Exiled.Events.Handlers
{
using System;

using Exiled.Events.EventArgs.Scp1507;
using Exiled.Events.Features;

Expand All @@ -15,6 +17,7 @@ namespace Exiled.Events.Handlers
/// <summary>
/// SCP-1507 related events.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
public static class Scp1507
{
/// <summary>
Expand Down
4 changes: 4 additions & 0 deletions EXILED/Exiled.Events/Handlers/Scp559.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@

namespace Exiled.Events.Handlers
{
using System;

using Exiled.Events.EventArgs.Scp559;
using Exiled.Events.Features;

#pragma warning disable SA1623

/// <summary>
/// All SCP-559 related events.
/// </summary>
[Obsolete("Only availaible for Christmas and AprilFools.")]
public static class Scp559
{
/// <summary>
Expand Down
3 changes: 1 addition & 2 deletions EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@

namespace Exiled.Events.Patches.Events.Scp1507
{
#pragma warning disable CS0618
using System.Collections.Generic;
using System.Reflection.Emit;

using Exiled.API.Features;
using Exiled.API.Features.Doors;
using Exiled.API.Features.Pools;
using Exiled.Events.Attributes;
using Exiled.Events.EventArgs.Scp1507;
using HarmonyLib;
using Interactables.Interobjects.DoorUtils;
using PlayerRoles.PlayableScps.Scp1507;

using static HarmonyLib.AccessTools;
Expand Down
1 change: 1 addition & 0 deletions EXILED/Exiled.Events/Patches/Events/Scp1507/Scream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace Exiled.Events.Patches.Events.Scp1507
{
#pragma warning disable CS0618
using System.Collections.Generic;
using System.Reflection.Emit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace Exiled.Events.Patches.Events.Scp1507
{
#pragma warning disable CS0618
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
Expand Down
4 changes: 2 additions & 2 deletions EXILED/Exiled.Events/Patches/Events/Scp1507/TapeUsing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@

namespace Exiled.Events.Patches.Events.Scp1507
{
#pragma warning disable CS0618

using System.Collections.Generic;
using System.Reflection.Emit;

using Exiled.API.Features;
using Exiled.API.Features.Pools;
using Exiled.Events.Attributes;
using Exiled.Events.EventArgs.Scp1507;
using HarmonyLib;
using InventorySystem.Items.FlamingoTapePlayer;
using PlayerRoles.PlayableScps.Scp1507;

using static HarmonyLib.AccessTools;

Expand Down
1 change: 1 addition & 0 deletions EXILED/Exiled.Events/Patches/Events/Scp559/Interacting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace Exiled.Events.Patches.Events.Scp559
{
#pragma warning disable CS0618
using System.Collections.Generic;
using System.Reflection.Emit;

Expand Down
1 change: 1 addition & 0 deletions EXILED/Exiled.Events/Patches/Events/Scp559/Spawning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace Exiled.Events.Patches.Events.Scp559
{
#pragma warning disable CS0618
using System.Collections.Generic;
using System.Reflection.Emit;

Expand Down
5 changes: 3 additions & 2 deletions EXILED/Exiled.Events/Patches/Generic/Scp559List.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@

namespace Exiled.Events.Patches.Generic
{
#pragma warning disable SA1313
#pragma warning disable CS0618

using Exiled.API.Features;
using HarmonyLib;

#pragma warning disable SA1313

/// <summary>
/// Patches <see cref="Scp559Cake.Start"/>
/// to control <see cref="Scp559.List"/>.
Expand Down

0 comments on commit fb89fe9

Please sign in to comment.