fix evader

This commit is contained in:
Gurge44 committed 2026-08-25 16:44:34 +02:00
1 parent 2227b6b390
commit 4f7ceda998
1 file changed
+24 -20
+24 -20
View File
@@ -231,36 +231,40 @@ internal static class UpdateSystemPatch
}
}
if (ShipStatusSystem.AllSabotage.Contains(systemType) && !Utils.IsActive(systemType))
// LateTask is needed because 2-part sabotages such as O2 aren't immediately deactivated when both consoles are completed, only after the next FixedUpdate
LateTask.New(() =>
{
bool petcd = !Options.UsePhantomBasis.GetBool();
List<PlayerControl> pcs = Main.CachedAlivePlayerControls();
for (var index = 0; index < pcs.Count; index++)
if (ShipStatusSystem.AllSabotage.Contains(systemType) && !Utils.IsActive(systemType))
{
PlayerControl pc = pcs[index];
bool petcd = !Options.UsePhantomBasis.GetBool();
try
List<PlayerControl> pcs = Main.CachedAlivePlayerControls();
for (var index = 0; index < pcs.Count; index++)
{
switch (pc.GetCustomRole())
PlayerControl pc = pcs[index];
try
{
case CustomRoles.Wiper:
switch (pc.GetCustomRole())
{
if (petcd) pc.AddAbilityCD();
else pc.RpcResetAbilityCooldown();
break;
}
case CustomRoles.Evader:
{
pc.RpcMakeVisible();
break;
case CustomRoles.Wiper:
{
if (petcd) pc.AddAbilityCD();
else pc.RpcResetAbilityCooldown();
break;
}
case CustomRoles.Evader:
{
pc.RpcMakeVisible();
break;
}
}
}
catch (Exception e) { Utils.ThrowException(e); }
}
catch (Exception e) { Utils.ThrowException(e); }
}
}
}, 0.1f);
}
public static void CheckAndOpenDoorsRange(ShipStatus __instance, int amount, int min, int max)