mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
getting rid of IDE warnings
This commit is contained in:
1 parent
65e533c268
commit
8b55463fa0
17 files changed
+25
-52
No files matched your search
@@ -15,6 +15,6 @@ public class CustomRole : ImpostorRole, ICustomRole
|
||||
public ModdedRoleTeams Team => ModdedRoleTeams.Impostor;
|
||||
public LoadableAsset<Sprite> OptionsScreenshot => MiraAssets.Banner;
|
||||
|
||||
[ModdedNumberOption("Testing level", min: 3, max: 9, roleType: typeof(CustomRole))] public float testingLevel { get; set; } = 4;
|
||||
[ModdedNumberOption("Testing level", min: 3, max: 9, roleType: typeof(CustomRole))] public float TestingLevel { get; set; } = 4;
|
||||
|
||||
}
|
||||
@@ -15,6 +15,6 @@ public class CustomRole2 : CrewmateRole, ICustomRole
|
||||
public ModdedRoleTeams Team => ModdedRoleTeams.Crewmate;
|
||||
public LoadableAsset<Sprite> OptionsScreenshot => MiraAssets.Banner;
|
||||
|
||||
[ModdedToggleOption("Teleportation ability", roleType: typeof(CustomRole2))] public bool teleport { get; set; } = true;
|
||||
[ModdedToggleOption("Teleportation ability", roleType: typeof(CustomRole2))] public bool Teleport { get; set; } = true;
|
||||
|
||||
}
|
||||
@@ -11,9 +11,9 @@ public class CustomRoleSettings : IModdedOptionGroup
|
||||
|
||||
public Type AdvancedRole => typeof(CustomRole);
|
||||
|
||||
[ModdedNumberOption("amogus", min: 3, max: 9)] public float amogus { get; set; } = 1;
|
||||
[ModdedNumberOption("amogus", min: 3, max: 9)] public float Amogus { get; set; } = 1;
|
||||
|
||||
[ModdedEnumOption("dwayne the rock johnson", typeof(TestEnum))] public TestEnum dwayneTheRockJohnson { get; set; } = TestEnum.Hello;
|
||||
[ModdedEnumOption("dwayne the rock johnson", typeof(TestEnum))] public TestEnum DwayneTheRockJohnson { get; set; } = TestEnum.Hello;
|
||||
|
||||
public ModdedToggleOption testToggle { get; } = new ("test toggle", false);
|
||||
public ModdedToggleOption TestToggle { get; } = new ("test toggle", false);
|
||||
}
|
||||
@@ -10,19 +10,19 @@ public class ExampleOptions : IModdedOptionGroup
|
||||
public Color GroupColor => Color.red;
|
||||
|
||||
[ModdedToggleOption("Use Thing")]
|
||||
public bool useThing { get; set; } = false;
|
||||
public bool UseThing { get; set; } = false;
|
||||
|
||||
[ModdedToggleOption("Use another thing")]
|
||||
public bool useAnotherThing { get; set; } = true;
|
||||
public bool UseAnotherThing { get; set; } = true;
|
||||
|
||||
[ModdedNumberOption("Sussy level", min: 0, max: 10)]
|
||||
public float sussyLevel { get; set; } = 4f;
|
||||
public float SussyLevel { get; set; } = 4f;
|
||||
|
||||
[ModdedStringOption("Sus choices", ["hello", "hello 2", "hello 3"])]
|
||||
public int susChoices { get; set; } = 2;
|
||||
public int SusChoices { get; set; } = 2;
|
||||
|
||||
[ModdedEnumOption("Enum test", typeof(TestEnum))]
|
||||
public TestEnum enumTest { get; set; } = TestEnum.Bye;
|
||||
public TestEnum EnumTest { get; set; } = TestEnum.Bye;
|
||||
}
|
||||
|
||||
public enum TestEnum
|
||||
|
||||
@@ -4,6 +4,6 @@ namespace MiraAPI.Example;
|
||||
|
||||
public class SomeRandomNonGroupClass
|
||||
{
|
||||
[ModdedStringOption("Yeah, idk", ["Idk 1", "idk 2", "idk 3", "idk 4"])] public static int yeaIdk { get; set; } = 3;
|
||||
[ModdedNumberOption("Aw man", min: 45, max: 95)] public float sussyLevel { get; set; } = 63;
|
||||
[ModdedStringOption("Yeah, idk", ["Idk 1", "idk 2", "idk 3", "idk 4"])] public static int YeaIdk { get; set; } = 3;
|
||||
[ModdedNumberOption("Aw man", min: 45, max: 95)] public float SussyLevel { get; set; } = 63;
|
||||
}
|
||||
@@ -49,7 +49,7 @@ public static class CustomGameModeManager
|
||||
{
|
||||
if (!typeof(CustomGameMode).IsAssignableFrom(gameModeType))
|
||||
{
|
||||
Logger<MiraApiPlugin>.Warning($"{gameModeType?.Name} does not inherit CustomGameMode!");
|
||||
Logger<MiraApiPlugin>.Warning($"{gameModeType.Name} does not inherit CustomGameMode!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using HarmonyLib;
|
||||
using InnerNet;
|
||||
using MiraAPI.GameModes;
|
||||
|
||||
namespace MiraAPI.Patches.GameModes;
|
||||
|
||||
/*
|
||||
[HarmonyPatch]
|
||||
public static class ConsolePatches
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using HarmonyLib;
|
||||
using MiraAPI.GameModes;
|
||||
|
||||
namespace MiraAPI.Patches.GameModes;
|
||||
|
||||
|
||||
/*
|
||||
[HarmonyPatch(typeof(DeadBody))]
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using HarmonyLib;
|
||||
using MiraAPI.GameModes;
|
||||
|
||||
namespace MiraAPI.Patches.GameModes;
|
||||
|
||||
|
||||
/*
|
||||
[HarmonyPatch]
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using HarmonyLib;
|
||||
using MiraAPI.GameModes;
|
||||
|
||||
namespace MiraAPI.Patches.GameModes;
|
||||
|
||||
|
||||
/*
|
||||
/// <summary>
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using HarmonyLib;
|
||||
using MiraAPI.GameModes;
|
||||
|
||||
namespace MiraAPI.Patches.GameModes;
|
||||
|
||||
|
||||
/*
|
||||
[HarmonyPatch(typeof(MapBehaviour))]
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using HarmonyLib;
|
||||
using MiraAPI.GameModes;
|
||||
|
||||
namespace MiraAPI.Patches.GameModes;
|
||||
|
||||
|
||||
/*
|
||||
[HarmonyPatch(typeof(KillAnimation))]
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using HarmonyLib;
|
||||
using MiraAPI.GameModes;
|
||||
using MiraAPI.Roles;
|
||||
using MiraAPI.Utilities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MiraAPI.Patches.GameModes;
|
||||
|
||||
|
||||
/*
|
||||
[HarmonyPatch(typeof(Vent))]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using HarmonyLib;
|
||||
using InnerNet;
|
||||
using MiraAPI.GameModes;
|
||||
using MiraAPI.Hud;
|
||||
using MiraAPI.Roles;
|
||||
using Reactor.Utilities.Extensions;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using HarmonyLib;
|
||||
using MiraAPI.GameModes;
|
||||
using MiraAPI.Roles;
|
||||
using MiraAPI.Utilities;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -21,7 +21,7 @@ public static class PlayerControlPatches
|
||||
|
||||
foreach (var button in CustomButtonManager.CustomButtons)
|
||||
{
|
||||
if (!button.Enabled(__instance.Data.Role))
|
||||
if (!button.Enabled(__instance.Data?.Role))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -160,23 +160,23 @@ public static class TaskAdderPatch
|
||||
RoleBehaviour roleBehaviour = DestroyableSingleton<RoleManager>.Instance.AllRoles[m];
|
||||
if (roleBehaviour.Role != RoleTypes.ImpostorGhost && roleBehaviour.Role != RoleTypes.CrewmateGhost && !CustomRoleManager.CustomRoles.ContainsKey((ushort)roleBehaviour.Role))
|
||||
{
|
||||
TaskAddButton taskAddButton2 = Object.Instantiate<TaskAddButton>(__instance.RoleButton);
|
||||
TaskAddButton taskAddButton2 = Object.Instantiate(__instance.RoleButton);
|
||||
taskAddButton2.SafePositionWorld = __instance.SafePositionWorld;
|
||||
taskAddButton2.Text.text = "Be_" + roleBehaviour.NiceName + ".exe";
|
||||
__instance.AddFileAsChild(RolesFolder, taskAddButton2, ref num, ref num2, ref num3);
|
||||
taskAddButton2.Role = roleBehaviour;
|
||||
if (taskAddButton2 != null && taskAddButton2.Button != null)
|
||||
{
|
||||
ControllerManager.Instance.AddSelectableUiElement(taskAddButton2.Button, false);
|
||||
ControllerManager.Instance.AddSelectableUiElement(taskAddButton2.Button);
|
||||
if (m == 0 && __instance.restorePreviousSelectionFound != null)
|
||||
{
|
||||
ControllerManager.Instance.SetDefaultSelection(__instance.restorePreviousSelectionFound, null);
|
||||
ControllerManager.Instance.SetDefaultSelection(__instance.restorePreviousSelectionFound);
|
||||
__instance.restorePreviousSelectionByFolderName = string.Empty;
|
||||
__instance.restorePreviousSelectionFound = null;
|
||||
}
|
||||
else if (m == 0)
|
||||
{
|
||||
ControllerManager.Instance.SetDefaultSelection(taskAddButton2.Button, null);
|
||||
ControllerManager.Instance.SetDefaultSelection(taskAddButton2.Button);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user