mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
fix evader
This commit is contained in:
1 parent
2227b6b390
commit
4f7ceda998
1 file changed
+24
-20
+24
-20
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user