diff --git a/KruacentExiled/CustomRoles/CR/Human/Alzheimer.cs b/KruacentExiled/CustomRoles/CR/Human/Alzheimer.cs index 734312f..11c4e71 100644 --- a/KruacentExiled/CustomRoles/CR/Human/Alzheimer.cs +++ b/KruacentExiled/CustomRoles/CR/Human/Alzheimer.cs @@ -100,9 +100,25 @@ private void CreateSpawnHint(Player player) ISCPPreferences trueSCP = Spawn.GetSCP(Player.Get(randomscp)); + + + List allOtherRole; + + int numberscp = Player.Enumerable.Count(p => SCPTeam.IsSCP(p.ReferenceHub)); + if (numberscp == 0) return; + + if (numberscp <= 1) + { + allOtherRole = Spawn.allRoles.Where(s => s != trueSCP && !s.IsSupport).ToList(); + } + else + { + allOtherRole = Spawn.allRoles.Where(s => s != trueSCP).ToList(); + + } KELog.Debug(trueSCP.SCPId); - List allOtherRole = Spawn.allRoles.Where(s => s != trueSCP).ToList(); + ISCPPreferences fakeSCP1 = allOtherRole.PullRandomItem(); KELog.Debug(fakeSCP1.SCPId); diff --git a/KruacentExiled/MainPlugin.cs b/KruacentExiled/MainPlugin.cs index 45a7507..6ee10c2 100644 --- a/KruacentExiled/MainPlugin.cs +++ b/KruacentExiled/MainPlugin.cs @@ -9,7 +9,7 @@ internal class MainPlugin : Plugin private KEPlugin[] plugins; public override string Author => "Patrique & OmerGS"; - public override Version Version { get; } = new Version(2, 0, 0); + public override Version Version { get; } = new Version(2, 0, 1); public static MainPlugin Instance { get; private set; } diff --git a/KruacentExiled/Map/Others/BlackoutNDoor/Handlers/Handler.cs b/KruacentExiled/Map/Others/BlackoutNDoor/Handlers/Handler.cs index 580cf3c..c93fee0 100644 --- a/KruacentExiled/Map/Others/BlackoutNDoor/Handlers/Handler.cs +++ b/KruacentExiled/Map/Others/BlackoutNDoor/Handlers/Handler.cs @@ -161,6 +161,21 @@ private void LaunchEvent() EventHandle.OnPreEvent(preEv); + if(preEv.IsAllowed) + { + if (Warhead.IsInProgress) + { + preEv.IsAllowed = false; + } + + + if (zone == ZoneType.LightContainment && Exiled.API.Features.Map.DecontaminationState == DecontaminationState.Countdown) + { + preEv.IsAllowed = false; + } + } + + if (preEv.IsAllowed && Zones.Contains(zone.GetZone())) {