various fixes

This commit is contained in:
Gurge44 committed 2025-09-15 11:29:52 +02:00
1 parent ba1d79cce1
commit dcacd73c03
20 files changed
+52 -52

No files matched your search

+4 -2
View File
@@ -85,6 +85,9 @@ internal static class ExtendedPlayerControl
public static bool CanUseVent(this PlayerControl player, int ventId)
{
int? closestVentId = player.GetClosestVent()?.Id;
if (player.inVent && closestVentId == ventId) return true;
switch (Options.CurrentGameMode)
{
case CustomGameMode.RoomRush:
@@ -96,9 +99,8 @@ internal static class ExtendedPlayerControl
}
if (player.Is(CustomRoles.Trainee) && MeetingStates.FirstMeeting) return false;
if (player.Is(CustomRoles.Blocked) && player.GetClosestVent()?.Id != ventId) return false;
if (player.Is(CustomRoles.Blocked) && closestVentId != ventId) return false;
if (!GameStates.IsInTask || ExileController.Instance || AntiBlackout.SkipTasks || Main.Invisible.Contains(player.PlayerId)) return false;
if (player.inVent && player.GetClosestVent()?.Id == ventId) return true;
return (player.CanUseImpostorVentButton() || player.GetRoleTypes() == RoleTypes.Engineer) && Main.PlayerStates.Values.All(x => x.Role.CanUseVent(player, ventId));
}