Skip to content

Commit 8ea89d3

Browse files
committed
Added missing prefabs and effects
1 parent 68064f3 commit 8ea89d3

File tree

2 files changed

+75
-11
lines changed

2 files changed

+75
-11
lines changed

LabExtended/API/Containers/EffectContainer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,11 @@ static EffectContainer()
428428
/// </summary>
429429
public Scp559Effect Scp559 { get; private set; }
430430

431+
/// <summary>
432+
/// Gets the player's <see cref="Scp956Target"/> effect.
433+
/// </summary>
434+
public Scp956Target Scp956 { get; private set; }
435+
431436
/// <summary>
432437
/// Gets the player's <see cref="global::Snowed"/> effect.
433438
/// </summary>

LabExtended/API/Prefabs/PrefabList.cs

Lines changed: 70 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,10 @@ public static IReadOnlyDictionary<string, PrefabDefinition> AllPrefabs
299299
#endregion
300300

301301
#region Weapons
302-
303302
/// <summary>
304303
/// Gets the prefab of a Jailbird.
305304
/// </summary>
306-
public static PrefabDefinition Jailbird { get; } = new(!HolidayUtils.IsHolidayActive(HolidayType.Halloween)
307-
? "JailbirdPickup"
308-
: "JailbirdPickup Halloween");
305+
public static PrefabDefinition Jailbird { get; } = new(GetHolidaySuffix("JailbirdPickup", true, false));
309306

310307
/// <summary>
311308
/// Gets the prefab of a Micro-HID.
@@ -345,14 +342,10 @@ public static IReadOnlyDictionary<string, PrefabDefinition> AllPrefabs
345342
/// <summary>
346343
/// Gets the prefab of an SCP-018 projectile.
347344
/// </summary>
348-
public static PrefabDefinition Scp018Projectile { get; } = new(!HolidayUtils.IsHolidayActive(HolidayType.Halloween)
349-
? "Scp018Projectile"
350-
: "Scp018Projectile Halloween");
351-
345+
public static PrefabDefinition Scp018Projectile { get; } = new(GetHolidaySuffix("Scp018Projectile", true, true));
352346
#endregion
353347

354348
#region Spawnable Map Prefabs
355-
356349
/// <summary>
357350
/// Gets the sport version of the shooting target.
358351
/// </summary>
@@ -487,7 +480,7 @@ public static IReadOnlyDictionary<string, PrefabDefinition> AllPrefabs
487480
/// Gets the prefab of Hubert Moon.
488481
/// </summary>
489482
[Obsolete("Hubert Moon has been removed from the game due to the end of Halloween.", true)]
490-
public static PrefabDefinition? HubertMoon { get; }
483+
public static PrefabDefinition? HubertMoon { get; } = null;
491484

492485
/// <summary>
493486
/// Gets the prefab of an elevator's gate.
@@ -573,7 +566,6 @@ public static IReadOnlyDictionary<string, PrefabDefinition> AllPrefabs
573566
/// Gets the prefab of a gate door.
574567
/// </summary>
575568
public static PrefabDefinition GateDoor { get; } = new("Spawnable Unsecured Pryable GateDoor");
576-
577569
#endregion
578570

579571
#region Halloween Prefabs
@@ -587,4 +579,71 @@ public static IReadOnlyDictionary<string, PrefabDefinition> AllPrefabs
587579
/// </summary>
588580
public static PrefabDefinition BrownCandyTantrum { get; } = new("TantrumObj (Brown Candy)");
589581
#endregion
582+
583+
#region Christmas Prefabs
584+
/// <summary>
585+
/// Gets the SCP-559 (cake) prefab.
586+
/// </summary>
587+
public static PrefabDefinition Scp559 { get; } = new("SCP-559 Cake");
588+
589+
/// <summary>
590+
/// Gets the prefab of the SCP-021-J bottle of water.
591+
/// </summary>
592+
public static PrefabDefinition Scp021J { get; } = new("SCP021JPickup");
593+
594+
/// <summary>
595+
/// Gets the SCP-956 (pinata) prefab.
596+
/// </summary>
597+
public static PrefabDefinition Scp956 { get; } = new("SCP-956");
598+
599+
/// <summary>
600+
/// Gets the SCP-2536 (christmas tree) prefab.
601+
/// </summary>
602+
public static PrefabDefinition Scp2536 { get; } = new("SCP-2536 Tree");
603+
604+
/// <summary>
605+
/// Gets the snowpile prefab.
606+
/// </summary>
607+
public static PrefabDefinition Snowpile { get; } = new("Snowpile");
608+
609+
/// <summary>
610+
/// Gets the snowball prefab.
611+
/// </summary>
612+
public static PrefabDefinition Snowball { get; } = new("SnowballProjectile");
613+
614+
/// <summary>
615+
/// Gets the coal pickup prefab.
616+
/// </summary>
617+
public static PrefabDefinition Coal { get; } = new("CoalPickup");
618+
619+
/// <summary>
620+
/// Gets the coal projectile prefab.
621+
/// </summary>
622+
public static PrefabDefinition CoalProjectile { get; } = new("CoalProjectile");
623+
624+
/// <summary>
625+
/// Gets the SCP-2536 projectile (ball) prefab.
626+
/// </summary>
627+
public static PrefabDefinition Scp2536Projectile { get; } = new("Scp2536Projectile");
628+
629+
/// <summary>
630+
/// Gets the prefab of the tape player.
631+
/// </summary>
632+
public static PrefabDefinition TapePlayer { get; } = new("TapePlayerPickup");
633+
#endregion
634+
635+
// A helper function used to suffix the name of the current holiday (if active)
636+
private static string GetHolidaySuffix(string prefab, bool allowHalloween, bool allowChristmas)
637+
{
638+
var isHalloween = allowHalloween && HolidayUtils.IsHolidayActive(HolidayType.Halloween);
639+
var isChristmas = allowChristmas && HolidayUtils.IsHolidayActive(HolidayType.Christmas);
640+
641+
if (isHalloween)
642+
return string.Concat(prefab, " ", "Halloween");
643+
644+
if (isChristmas)
645+
return string.Concat(prefab, " ", "Christmas");
646+
647+
return prefab;
648+
}
590649
}

0 commit comments

Comments
 (0)