mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
fix
This commit is contained in:
1 parent
d30c645a37
commit
bd73f4cef5
6 files changed
+367
-372
No files matched your search
@@ -292,7 +292,7 @@ public sealed class PlayerGameOptionsSender(PlayerControl player) : GameOptionsS
|
||||
switch (role)
|
||||
{
|
||||
case CustomRoles.Alchemist when ((Alchemist)state.Role).VisionPotionActive:
|
||||
opt.SetVisionV2();
|
||||
opt.SetVision(false);
|
||||
|
||||
if (Utils.IsActive(SystemTypes.Electrical))
|
||||
opt.SetFloat(FloatOptionNames.CrewLightMod, Alchemist.VisionOnLightsOut.GetFloat() * 5);
|
||||
|
||||
@@ -338,12 +338,6 @@ public static class Utils
|
||||
if (IsActive(SystemTypes.Electrical)) opt.SetFloat(FloatOptionNames.ImpostorLightMod, opt.GetFloat(FloatOptionNames.ImpostorLightMod) / 5);
|
||||
}
|
||||
|
||||
public static void SetVisionV2(this IGameOptions opt)
|
||||
{
|
||||
opt.SetFloat(FloatOptionNames.ImpostorLightMod, opt.GetFloat(FloatOptionNames.CrewLightMod));
|
||||
if (IsActive(SystemTypes.Electrical)) opt.SetFloat(FloatOptionNames.ImpostorLightMod, opt.GetFloat(FloatOptionNames.ImpostorLightMod) / 5);
|
||||
}
|
||||
|
||||
private static void TargetDies(PlayerControl killer, PlayerControl target)
|
||||
{
|
||||
if (target.IsAlive() || GameStates.IsMeeting) return;
|
||||
|
||||
+2
-3
@@ -347,8 +347,7 @@ internal static class HudManagerPatch
|
||||
if ((usesPetInsteadOfKill && player.Is(CustomRoles.Nimble) && player.GetRoleTypes() == RoleTypes.Engineer) || player.Is(CustomRoles.GM))
|
||||
__instance.AbilityButton.SetEnabled();
|
||||
|
||||
if ((player.inVent || player.MyPhysics.Animations.IsPlayingEnterVentAnimation()) && !state.Role.CanUseSabotage(player))
|
||||
__instance.SabotageButton.ToggleVisible(false);
|
||||
__instance.SabotageButton.ToggleVisible(player.GetRoleTypes() is RoleTypes.ImpostorGhost or RoleTypes.Impostor or RoleTypes.Phantom or RoleTypes.Shapeshifter);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -616,7 +615,7 @@ internal static class SetHudActivePatch
|
||||
|
||||
__instance.KillButton?.ToggleVisible(player.CanUseKillButton());
|
||||
__instance.ImpostorVentButton?.ToggleVisible(player.CanUseImpostorVentButton());
|
||||
__instance.SabotageButton?.ToggleVisible(player.CanUseSabotage());
|
||||
__instance.SabotageButton?.ToggleVisible(player.GetRoleTypes() is RoleTypes.ImpostorGhost or RoleTypes.Impostor or RoleTypes.Phantom or RoleTypes.Shapeshifter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1966,12 +1966,12 @@ internal static class FixedUpdatePatch
|
||||
public static void LoversSuicide(byte deathId = 0x7f, bool exile = false, bool force = false, bool guess = false)
|
||||
{
|
||||
if (Options.CurrentGameMode != CustomGameMode.Standard) return;
|
||||
if (Lovers.LoverDieConsequence.GetValue() == 0 || Main.IsLoversDead || (!Main.LoversPlayers.Exists(player => !player.IsAlive() && player.PlayerId == deathId) && !force)) return;
|
||||
if (Lovers.LoverDieConsequence.GetValue() == 0 || Main.IsLoversDead || (Main.LoversPlayers.FindAll(x => x.IsAlive()).Count != 1 && !force)) return;
|
||||
|
||||
PlayerControl partnerPlayer = Main.LoversPlayers.FirstOrDefault(player => player.PlayerId != deathId && player.IsAlive());
|
||||
if (partnerPlayer == null) return;
|
||||
|
||||
Main.IsLoversDead = true;
|
||||
PlayerControl partnerPlayer = Main.LoversPlayers.FirstOrDefault(player => player.PlayerId != deathId && player.IsAlive());
|
||||
|
||||
if (partnerPlayer == null) return;
|
||||
|
||||
if (Lovers.LoverDieConsequence.GetValue() == 2)
|
||||
{
|
||||
|
||||
+358
-358
File diff suppressed because it is too large.
Load diff
@@ -42,6 +42,8 @@ internal class Transporter : RoleBase
|
||||
try
|
||||
{
|
||||
opt.SetVision(false);
|
||||
opt.SetFloat(FloatOptionNames.CrewLightMod, Main.DefaultCrewmateVision);
|
||||
opt.SetFloat(FloatOptionNames.ImpostorLightMod, Main.DefaultCrewmateVision);
|
||||
AURoleOptions.ShapeshifterCooldown = AbilityCooldown.GetFloat();
|
||||
AURoleOptions.ShapeshifterDuration = 1f;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user