File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
Patches/Functions/Holidays Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ public class ApiConfig
1414 /// </summary>
1515 [ Description ( "Sets the chance of SCP-559 using the Capybara model." ) ]
1616 public float ? Scp956CapybaraChance { get ; set ; } = null ;
17+
18+ /// <summary>
19+ /// Gets or sets a value indicating whether SCP-2536 spawning should be disabled.
20+ /// </summary>
21+ [ Description ( "Whether or not the SCP-2536 should be prevented from spawning." ) ]
22+ public bool Scp2536Disabled { get ; set ; }
1723
1824 /// <summary>
1925 /// Gets or sets the configuration settings for file storage.
Original file line number Diff line number Diff line change 1+ using Christmas . Scp2536 ;
2+
3+ using HarmonyLib ;
4+
5+ using LabExtended . Core ;
6+
7+ namespace LabExtended . Patches . Functions . Holidays
8+ {
9+ /// <summary>
10+ /// Prevents the SCP-2536 tree from spawning (if the Scp2536Disabled config is enabled) by failing the target locator.
11+ /// </summary>
12+ public static class Scp2536SpawnPreventionPatch
13+ {
14+ [ HarmonyPatch ( typeof ( Scp2536Controller ) , nameof ( Scp2536Controller . ServerFindTarget ) ) ]
15+ private static bool Prefix ( ref bool __result )
16+ {
17+ if ( ApiLoader . ApiConfig != null && ApiLoader . ApiConfig . Scp2536Disabled )
18+ {
19+ __result = false ;
20+ return false ;
21+ }
22+
23+ return true ;
24+ }
25+ }
26+ }
You can’t perform that action at this time.
0 commit comments