mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-21 05:37:32 +00:00
fix merge stuff
This commit is contained in:
1 parent
284a0f58b1
commit
9177d5b456
11 files changed
+16
-17
No files matched your search
@@ -12,7 +12,7 @@ public class ChameloenRole : CrewmateRole, ICustomRole
|
||||
public Color RoleColor => Palette.AcceptedGreen;
|
||||
public ModdedRoleTeams Team => ModdedRoleTeams.Crewmate;
|
||||
|
||||
public CustomRoleConfiguration Configuration => new CustomRoleConfiguration(this)
|
||||
public CustomRoleConfiguration Configuration => new(this)
|
||||
{
|
||||
OptionsScreenshot = ExampleAssets.Banner,
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace MiraAPI.GameModes;
|
||||
/// <summary>
|
||||
/// Base class for custom gamemodes.
|
||||
/// </summary>
|
||||
[MiraDisable]
|
||||
[MiraIgnore]
|
||||
public abstract class AbstractGameMode
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace MiraAPI.GameModes;
|
||||
/// <summary>
|
||||
/// The default game mode.
|
||||
/// </summary>
|
||||
[MiraDisable]
|
||||
[MiraIgnore]
|
||||
public class DefaultMode : AbstractGameMode
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace MiraAPI.GameOptions;
|
||||
/// <summary>
|
||||
/// Base class for option groups. An option group is a collection of options that are displayed together in the options menu.
|
||||
/// </summary>
|
||||
[MiraDisable]
|
||||
[MiraIgnore]
|
||||
public abstract class AbstractOptionGroup
|
||||
{
|
||||
internal List<IModdedOption> Options { get; } = [];
|
||||
|
||||
@@ -3,6 +3,7 @@ using MiraAPI.Events.Mira;
|
||||
using MiraAPI.PluginLoading;
|
||||
using MiraAPI.Utilities.Assets;
|
||||
using System;
|
||||
using MiraAPI.Patches;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.UI;
|
||||
@@ -13,7 +14,7 @@ namespace MiraAPI.Hud;
|
||||
/// <summary>
|
||||
/// Class for making custom action buttons. More customizable than the default Action/Ability buttons in the base game.
|
||||
/// </summary>
|
||||
[MiraDisable]
|
||||
[MiraIgnore]
|
||||
public abstract class CustomActionButton
|
||||
{
|
||||
/// <summary>
|
||||
@@ -438,7 +439,7 @@ public abstract class CustomActionButton
|
||||
/// Custom action button that has a target object.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the target object.</typeparam>
|
||||
[MiraDisable]
|
||||
[MiraIgnore]
|
||||
public abstract class CustomActionButton<T> : CustomActionButton where T : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace MiraAPI.Modifiers;
|
||||
/// <summary>
|
||||
/// Base class for all modifiers.
|
||||
/// </summary>
|
||||
[MiraDisable]
|
||||
[MiraIgnore]
|
||||
public abstract class BaseModifier
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace MiraAPI.Modifiers.Types;
|
||||
/// <summary>
|
||||
/// The base class for a game modifier. Game modifiers are applied at the start of the game on top of the player's role.
|
||||
/// </summary>
|
||||
[MiraDisable]
|
||||
[MiraIgnore]
|
||||
public abstract class GameModifier : BaseModifier
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace MiraAPI.Modifiers.Types;
|
||||
/// <summary>
|
||||
/// The base class for all timed modifiers. Timed modifiers have a duration and can be started and stopped.
|
||||
/// </summary>
|
||||
[MiraDisable]
|
||||
[MiraIgnore]
|
||||
public abstract class TimedModifier : BaseModifier
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -280,7 +280,7 @@ public static class LobbyViewPanePatches
|
||||
viewSettingsInfoPanelRoleVariant.transform.localPosition = new Vector3(num2, num, -2f);
|
||||
|
||||
var advancedRoleOptions = SelectedMod.Options
|
||||
.Where(x => x.AdvancedRole == customRole.GetType() && (x.AdvancedMode is null || x.AdvancedMode == customRole.AssociatedGameMode))
|
||||
.Where(x => x.AdvancedRole == customRole.GetType() && (x.AdvancedMode is null || x.AdvancedMode == customRole.Configuration.AssociatedGameMode))
|
||||
.ToList();
|
||||
|
||||
if (!flag && advancedRoleOptions.Count > 0)
|
||||
|
||||
@@ -62,6 +62,7 @@ internal static class RoleSettingMenuPatches
|
||||
var num3 = 0;
|
||||
|
||||
var roleGroups = GameSettingMenuPatches.SelectedMod?.CustomRoles.Values.OfType<ICustomRole>()
|
||||
.Where(x => !x.Configuration.HideSettings)
|
||||
.ToLookup(x => x.Configuration.RoleGroup);
|
||||
|
||||
if (roleGroups is null)
|
||||
@@ -76,8 +77,7 @@ internal static class RoleSettingMenuPatches
|
||||
|
||||
foreach (var grouping in sortedRoleGroups)
|
||||
{
|
||||
if (!grouping.Any(role => role.AssociatedGameMode is null || role.AssociatedGameMode ==
|
||||
CustomGameModeManager.ActiveMode?.GetType()))
|
||||
if (grouping.All(role => role.Configuration.AssociatedGameMode != CustomGameModeManager.ActiveMode?.GetType()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -147,11 +147,13 @@ internal static class RoleSettingMenuPatches
|
||||
{
|
||||
header.gameObject.Destroy();
|
||||
}
|
||||
|
||||
CategoryHeaderEditRoles.Clear();
|
||||
foreach (var option in RoleOptionSettings)
|
||||
{
|
||||
option.gameObject.Destroy();
|
||||
}
|
||||
|
||||
RoleOptionSettings.Clear();
|
||||
__instance.SetQuotaTab();
|
||||
}));
|
||||
@@ -162,6 +164,7 @@ internal static class RoleSettingMenuPatches
|
||||
num -= 0.4f;
|
||||
}
|
||||
}
|
||||
|
||||
__instance.scrollBar.CalculateAndSetYBounds(__instance.roleChances.Count + 5, 1f, 6f, 0.43f);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -50,11 +50,6 @@ public interface ICustomRole
|
||||
/// </summary>
|
||||
MiraPluginInfo ParentMod => CustomRoleManager.FindParentMod(this);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the game mode this role is a part of.
|
||||
/// </summary>
|
||||
Type AssociatedGameMode => typeof(DefaultMode);
|
||||
|
||||
/// <summary>
|
||||
/// This method runs on the PlayerControl.FixedUpdate method for ALL players with this role.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user