Skip to content

Commit 9ce7995

Browse files
committed
Fixed holiday-only effects and obsoleted the Hubert Moon prefab
1 parent a5cfd45 commit 9ce7995

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

LabExtended/API/Containers/EffectContainer.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using LabApi.Events.Arguments.PlayerEvents;
2020

2121
using UnityEngine;
22+
2223
using InventorySystem.Items.MarshmallowMan;
2324
// ReSharper disable UnusedAutoPropertyAccessor.Local
2425

@@ -560,6 +561,9 @@ internal EffectContainer(PlayerEffectsController controller, ExPlayer player)
560561
if (!warnedMissing.Add(prop.PropertyType))
561562
continue;
562563

564+
if (typeof(IHolidayEffect).IsAssignableFrom(prop.PropertyType))
565+
continue;
566+
563567
ApiLog.Error("LabExtended", $"Missing effect for property &3{prop.Name}&r (&1{prop.PropertyType.FullName}&r)");
564568
}
565569
}

LabExtended/API/ExMap.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,14 @@ public static bool IsHubertSkyboxActive
124124
}
125125

126126
/// <summary>
127-
/// Spawns a Hubert Moon instance.
128-
/// </summary>
129-
/// <returns>The spawned Hubert Moon instance.</returns>
130-
public static HubertMoon SpawnHubertMoon()
131-
=> PrefabList.HubertMoon.Spawn<HubertMoon>();
127+
/// Spawns an instance of Hubert Moon if available.
128+
/// </summary>
129+
/// <remarks>This method is obsolete. Hubert Moon is no longer available in the game and this method will
130+
/// always return <see langword="null"/>.</remarks>
131+
/// <returns>A <see cref="HubertMoon"/> instance if Hubert Moon is available; otherwise, <see langword="null"/>.</returns>
132+
[Obsolete("Hubert Moon is no longer available in the game.")]
133+
public static HubertMoon? SpawnHubertMoon()
134+
=> null;
132135
#endregion
133136

134137
/// <summary>

LabExtended/API/Prefabs/PrefabList.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using LabExtended.Core;
22
using LabExtended.Extensions;
3+
34
using MapGeneration.Holidays;
5+
46
using Mirror;
57

68
namespace LabExtended.API.Prefabs;
@@ -484,7 +486,8 @@ public static IReadOnlyDictionary<string, PrefabDefinition> AllPrefabs
484486
/// <summary>
485487
/// Gets the prefab of Hubert Moon.
486488
/// </summary>
487-
public static PrefabDefinition HubertMoon { get; } = new("Hubert Moon");
489+
[Obsolete("Hubert Moon has been removed from the game due to the end of Halloween.", true)]
490+
public static PrefabDefinition? HubertMoon { get; }
488491

489492
/// <summary>
490493
/// Gets the prefab of an elevator's gate.

0 commit comments

Comments
 (0)