mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
Remove UseVanillaVentButton as it's unnecessary
This commit is contained in:
1 parent
c1d0bb5d26
commit
90921ff786
5 files changed
+6
-14
No files matched your search
@@ -18,8 +18,7 @@ public class NeutralKillerRole : ImpostorRole, ICustomRole
|
|||||||
{
|
{
|
||||||
UseVanillaKillButton = true,
|
UseVanillaKillButton = true,
|
||||||
CanGetKilled = true,
|
CanGetKilled = true,
|
||||||
GetsVentData = true,
|
CanUseVent = true,
|
||||||
UseVanillaVentButton = true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public RoleOptionsGroup RoleOptionsGroup { get; } = new("Outcast", Color.gray);
|
public RoleOptionsGroup RoleOptionsGroup { get; } = new("Outcast", Color.gray);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public static class HudManagerPatches
|
|||||||
if (role is ICustomRole customRole)
|
if (role is ICustomRole customRole)
|
||||||
{
|
{
|
||||||
__instance.KillButton.ToggleVisible(isActive && customRole.Configuration.UseVanillaKillButton && !flag);
|
__instance.KillButton.ToggleVisible(isActive && customRole.Configuration.UseVanillaKillButton && !flag);
|
||||||
__instance.ImpostorVentButton.ToggleVisible(isActive && (customRole.Configuration.CanUseVent || customRole.Configuration.UseVanillaVentButton) && !flag);
|
__instance.ImpostorVentButton.ToggleVisible(isActive && (customRole.Configuration.CanUseVent) && !flag);
|
||||||
__instance.SabotageButton.gameObject.SetActive(isActive && customRole.Configuration.CanUseSabotage);
|
__instance.SabotageButton.gameObject.SetActive(isActive && customRole.Configuration.CanUseSabotage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ internal static class VentCanUsePatch
|
|||||||
var @object = pc.Object;
|
var @object = pc.Object;
|
||||||
var role = @object.Data.Role;
|
var role = @object.Data.Role;
|
||||||
|
|
||||||
var canVent = role is ICustomRole customRole ? customRole.Configuration.CanUseVent || customRole.Configuration.GetsVentData || customRole.Configuration.UseVanillaVentButton : role.CanVent;
|
var canVent = role is ICustomRole customRole ? customRole.Configuration.CanUseVent || customRole.Configuration.GetsVentData : role.CanVent;
|
||||||
couldUse = canVent;
|
couldUse = canVent;
|
||||||
|
|
||||||
var modifiers = @object.GetModifierComponent().ActiveModifiers;
|
var modifiers = @object.GetModifierComponent().ActiveModifiers;
|
||||||
|
|||||||
@@ -39,8 +39,7 @@ public record struct CustomRoleConfiguration
|
|||||||
GhostRole = role.Team is ModdedRoleTeams.Impostor ? RoleTypes.ImpostorGhost : RoleTypes.CrewmateGhost;
|
GhostRole = role.Team is ModdedRoleTeams.Impostor ? RoleTypes.ImpostorGhost : RoleTypes.CrewmateGhost;
|
||||||
CanGetKilled = roleBehaviour?.IsDead == false && role.Team is not ModdedRoleTeams.Impostor;
|
CanGetKilled = roleBehaviour?.IsDead == false && role.Team is not ModdedRoleTeams.Impostor;
|
||||||
UseVanillaKillButton = role.Team is ModdedRoleTeams.Impostor;
|
UseVanillaKillButton = role.Team is ModdedRoleTeams.Impostor;
|
||||||
GetsVentData = role.Team is ModdedRoleTeams.Impostor;
|
CanUseVent = role.Team is ModdedRoleTeams.Impostor;
|
||||||
UseVanillaVentButton = role.Team is ModdedRoleTeams.Impostor;
|
|
||||||
CanUseSabotage = role.Team is ModdedRoleTeams.Impostor;
|
CanUseSabotage = role.Team is ModdedRoleTeams.Impostor;
|
||||||
TasksCountForProgress = role.Team is ModdedRoleTeams.Crewmate;
|
TasksCountForProgress = role.Team is ModdedRoleTeams.Crewmate;
|
||||||
HideSettings = roleBehaviour?.IsDead == true;
|
HideSettings = roleBehaviour?.IsDead == true;
|
||||||
@@ -110,9 +109,8 @@ public record struct CustomRoleConfiguration
|
|||||||
public bool UseVanillaKillButton { get; set; }
|
public bool UseVanillaKillButton { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether the role can use vents.
|
/// Gets or sets a value indicating whether the role can use vents. Also sends vanilla vent data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Obsolete("The equivalent of having both GetsVentData and UseVanillaVentButton as true. Only remains for compatability.")]
|
|
||||||
public bool CanUseVent { get; set; }
|
public bool CanUseVent { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -120,11 +118,6 @@ public record struct CustomRoleConfiguration
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool GetsVentData { get; set; }
|
public bool GetsVentData { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether the role can use the vanilla vent button.
|
|
||||||
/// </summary>
|
|
||||||
public bool UseVanillaVentButton { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether the role can use the sabotage button.
|
/// Gets or sets a value indicating whether the role can use the sabotage button.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public static class CustomRoleManager
|
|||||||
roleBehaviour.CanBeKilled = customRole.Configuration.CanGetKilled;
|
roleBehaviour.CanBeKilled = customRole.Configuration.CanGetKilled;
|
||||||
roleBehaviour.CanUseKillButton = customRole.Configuration.UseVanillaKillButton;
|
roleBehaviour.CanUseKillButton = customRole.Configuration.UseVanillaKillButton;
|
||||||
roleBehaviour.TasksCountTowardProgress = customRole.Configuration.TasksCountForProgress;
|
roleBehaviour.TasksCountTowardProgress = customRole.Configuration.TasksCountForProgress;
|
||||||
roleBehaviour.CanVent = customRole.Configuration.CanUseVent || customRole.Configuration.GetsVentData || customRole.Configuration.UseVanillaVentButton;
|
roleBehaviour.CanVent = customRole.Configuration.CanUseVent || customRole.Configuration.GetsVentData;
|
||||||
roleBehaviour.DefaultGhostRole = customRole.Configuration.GhostRole;
|
roleBehaviour.DefaultGhostRole = customRole.Configuration.GhostRole;
|
||||||
roleBehaviour.MaxCount = customRole.Configuration.MaxRoleCount;
|
roleBehaviour.MaxCount = customRole.Configuration.MaxRoleCount;
|
||||||
roleBehaviour.RoleScreenshot = customRole.Configuration.OptionsScreenshot?.LoadAsset();
|
roleBehaviour.RoleScreenshot = customRole.Configuration.OptionsScreenshot?.LoadAsset();
|
||||||
|
|||||||
Reference in new issue
Block a user